From c79783367adacb1e9447120871c9858267dfa14a Mon Sep 17 00:00:00 2001 From: Mo Firouz Date: Wed, 16 Oct 2024 11:41:10 +0100 Subject: [PATCH] Include generated Protobuf code in the repository to allow CI tools to build the codebase without Buf tooling. --- .gitignore | 9 +- CHANGELOG.md | 5 + .../java/com/google/api/AnnotationsProto.java | 77 + .../com/google/api/CustomHttpPattern.java | 701 + .../api/CustomHttpPatternOrBuilder.java | 51 + src/main/java/com/google/api/Http.java | 972 ++ .../java/com/google/api/HttpOrBuilder.java | 80 + src/main/java/com/google/api/HttpProto.java | 98 + src/main/java/com/google/api/HttpRule.java | 3395 ++++ .../com/google/api/HttpRuleOrBuilder.java | 337 + .../options/AnnotationsProto.java | 179 + .../protoc_gen_openapiv2/options/Contact.java | 913 ++ .../options/ContactOrBuilder.java | 75 + .../options/ExternalDocumentation.java | 743 + .../ExternalDocumentationOrBuilder.java | 55 + .../protoc_gen_openapiv2/options/Header.java | 1211 ++ .../options/HeaderOrBuilder.java | 115 + .../options/HeaderParameter.java | 1228 ++ .../options/HeaderParameterOrBuilder.java | 102 + .../protoc_gen_openapiv2/options/Info.java | 1939 +++ .../options/InfoOrBuilder.java | 213 + .../options/JSONSchema.java | 4786 ++++++ .../options/JSONSchemaOrBuilder.java | 464 + .../protoc_gen_openapiv2/options/License.java | 733 + .../options/LicenseOrBuilder.java | 51 + .../options/Openapiv2Proto.java | 617 + .../options/Operation.java | 3936 +++++ .../options/OperationOrBuilder.java | 541 + .../options/Parameters.java | 850 + .../options/ParametersOrBuilder.java | 60 + .../options/Response.java | 1835 +++ .../options/ResponseOrBuilder.java | 250 + .../protoc_gen_openapiv2/options/Schema.java | 1265 ++ .../options/SchemaOrBuilder.java | 117 + .../protoc_gen_openapiv2/options/Scheme.java | 156 + .../protoc_gen_openapiv2/options/Scopes.java | 715 + .../options/ScopesOrBuilder.java | 70 + .../options/SecurityDefinitions.java | 753 + .../options/SecurityDefinitionsOrBuilder.java | 70 + .../options/SecurityRequirement.java | 1371 ++ .../options/SecurityRequirementOrBuilder.java | 80 + .../options/SecurityScheme.java | 2531 +++ .../options/SecuritySchemeOrBuilder.java | 262 + .../protoc_gen_openapiv2/options/Swagger.java | 4315 +++++ .../options/SwaggerOrBuilder.java | 569 + .../protoc_gen_openapiv2/options/Tag.java | 1345 ++ .../options/TagOrBuilder.java | 148 + .../com/heroiclabs/nakama/api/Account.java | 2019 +++ .../heroiclabs/nakama/api/AccountApple.java | 860 + .../nakama/api/AccountAppleOrBuilder.java | 85 + .../heroiclabs/nakama/api/AccountCustom.java | 860 + .../nakama/api/AccountCustomOrBuilder.java | 85 + .../heroiclabs/nakama/api/AccountDevice.java | 860 + .../nakama/api/AccountDeviceOrBuilder.java | 85 + .../heroiclabs/nakama/api/AccountEmail.java | 1024 ++ .../nakama/api/AccountEmailOrBuilder.java | 105 + .../nakama/api/AccountFacebook.java | 860 + .../api/AccountFacebookInstantGame.java | 860 + .../AccountFacebookInstantGameOrBuilder.java | 85 + .../nakama/api/AccountFacebookOrBuilder.java | 85 + .../nakama/api/AccountGameCenter.java | 1599 ++ .../api/AccountGameCenterOrBuilder.java | 175 + .../heroiclabs/nakama/api/AccountGoogle.java | 860 + .../nakama/api/AccountGoogleOrBuilder.java | 85 + .../nakama/api/AccountOrBuilder.java | 196 + .../heroiclabs/nakama/api/AccountRefresh.java | 860 + .../nakama/api/AccountRefreshOrBuilder.java | 85 + .../heroiclabs/nakama/api/AccountSteam.java | 860 + .../nakama/api/AccountSteamOrBuilder.java | 85 + .../nakama/api/AddFriendsRequest.java | 855 + .../api/AddFriendsRequestOrBuilder.java | 93 + .../nakama/api/AddGroupUsersRequest.java | 778 + .../api/AddGroupUsersRequestOrBuilder.java | 72 + .../com/heroiclabs/nakama/api/ApiProto.java | 2017 +++ .../heroiclabs/nakama/api/ApigrpcProto.java | 333 + .../nakama/api/AuthenticateAppleRequest.java | 1011 ++ .../AuthenticateAppleRequestOrBuilder.java | 85 + .../nakama/api/AuthenticateCustomRequest.java | 1011 ++ .../AuthenticateCustomRequestOrBuilder.java | 85 + .../nakama/api/AuthenticateDeviceRequest.java | 1011 ++ .../AuthenticateDeviceRequestOrBuilder.java | 85 + .../nakama/api/AuthenticateEmailRequest.java | 1011 ++ .../AuthenticateEmailRequestOrBuilder.java | 85 + ...uthenticateFacebookInstantGameRequest.java | 1011 ++ ...teFacebookInstantGameRequestOrBuilder.java | 85 + .../api/AuthenticateFacebookRequest.java | 1244 ++ .../AuthenticateFacebookRequestOrBuilder.java | 112 + .../api/AuthenticateGameCenterRequest.java | 1011 ++ ...uthenticateGameCenterRequestOrBuilder.java | 85 + .../nakama/api/AuthenticateGoogleRequest.java | 1011 ++ .../AuthenticateGoogleRequestOrBuilder.java | 85 + .../nakama/api/AuthenticateSteamRequest.java | 1244 ++ .../AuthenticateSteamRequestOrBuilder.java | 112 + .../nakama/api/BanGroupUsersRequest.java | 778 + .../api/BanGroupUsersRequestOrBuilder.java | 72 + .../nakama/api/BlockFriendsRequest.java | 855 + .../api/BlockFriendsRequestOrBuilder.java | 93 + .../heroiclabs/nakama/api/ChannelMessage.java | 2789 ++++ .../nakama/api/ChannelMessageList.java | 1311 ++ .../api/ChannelMessageListOrBuilder.java | 115 + .../nakama/api/ChannelMessageOrBuilder.java | 299 + .../nakama/api/CreateGroupRequest.java | 1194 ++ .../api/CreateGroupRequestOrBuilder.java | 111 + .../nakama/api/DeleteFriendsRequest.java | 855 + .../api/DeleteFriendsRequestOrBuilder.java | 93 + .../nakama/api/DeleteGroupRequest.java | 537 + .../api/DeleteGroupRequestOrBuilder.java | 31 + .../api/DeleteLeaderboardRecordRequest.java | 537 + ...leteLeaderboardRecordRequestOrBuilder.java | 31 + .../api/DeleteNotificationsRequest.java | 614 + .../DeleteNotificationsRequestOrBuilder.java | 52 + .../nakama/api/DeleteStorageObjectId.java | 865 + .../api/DeleteStorageObjectIdOrBuilder.java | 71 + .../api/DeleteStorageObjectsRequest.java | 819 + .../DeleteStorageObjectsRequestOrBuilder.java | 55 + .../api/DeleteTournamentRecordRequest.java | 537 + ...eleteTournamentRecordRequestOrBuilder.java | 31 + .../nakama/api/DemoteGroupUsersRequest.java | 778 + .../api/DemoteGroupUsersRequestOrBuilder.java | 72 + .../java/com/heroiclabs/nakama/api/Event.java | 1184 ++ .../heroiclabs/nakama/api/EventOrBuilder.java | 122 + .../com/heroiclabs/nakama/api/Friend.java | 1251 ++ .../com/heroiclabs/nakama/api/FriendList.java | 983 ++ .../nakama/api/FriendListOrBuilder.java | 75 + .../nakama/api/FriendOrBuilder.java | 92 + .../nakama/api/FriendsOfFriendsList.java | 1805 +++ .../api/FriendsOfFriendsListOrBuilder.java | 75 + .../nakama/api/GetSubscriptionRequest.java | 537 + .../api/GetSubscriptionRequestOrBuilder.java | 31 + .../nakama/api/GetUsersRequest.java | 1096 ++ .../nakama/api/GetUsersRequestOrBuilder.java | 134 + .../java/com/heroiclabs/nakama/api/Group.java | 2392 +++ .../com/heroiclabs/nakama/api/GroupList.java | 983 ++ .../nakama/api/GroupListOrBuilder.java | 75 + .../heroiclabs/nakama/api/GroupOrBuilder.java | 252 + .../heroiclabs/nakama/api/GroupUserList.java | 2052 +++ .../nakama/api/GroupUserListOrBuilder.java | 75 + .../api/ImportFacebookFriendsRequest.java | 847 + ...ImportFacebookFriendsRequestOrBuilder.java | 65 + .../nakama/api/ImportSteamFriendsRequest.java | 847 + .../ImportSteamFriendsRequestOrBuilder.java | 65 + .../nakama/api/JoinGroupRequest.java | 537 + .../nakama/api/JoinGroupRequestOrBuilder.java | 31 + .../nakama/api/JoinTournamentRequest.java | 537 + .../api/JoinTournamentRequestOrBuilder.java | 31 + .../nakama/api/KickGroupUsersRequest.java | 778 + .../api/KickGroupUsersRequestOrBuilder.java | 72 + .../heroiclabs/nakama/api/Leaderboard.java | 1393 ++ .../nakama/api/LeaderboardList.java | 983 ++ .../nakama/api/LeaderboardListOrBuilder.java | 75 + .../nakama/api/LeaderboardOrBuilder.java | 137 + .../nakama/api/LeaderboardRecord.java | 2218 +++ .../nakama/api/LeaderboardRecordList.java | 1672 ++ .../api/LeaderboardRecordListOrBuilder.java | 149 + .../api/LeaderboardRecordOrBuilder.java | 229 + .../nakama/api/LeaveGroupRequest.java | 537 + .../api/LeaveGroupRequestOrBuilder.java | 31 + .../nakama/api/LinkFacebookRequest.java | 847 + .../api/LinkFacebookRequestOrBuilder.java | 65 + .../nakama/api/LinkSteamRequest.java | 847 + .../nakama/api/LinkSteamRequestOrBuilder.java | 65 + .../api/ListChannelMessagesRequest.java | 1175 ++ .../ListChannelMessagesRequestOrBuilder.java | 105 + .../api/ListFriendsOfFriendsRequest.java | 770 + .../ListFriendsOfFriendsRequestOrBuilder.java | 58 + .../nakama/api/ListFriendsRequest.java | 1011 ++ .../api/ListFriendsRequestOrBuilder.java | 85 + .../nakama/api/ListGroupUsersRequest.java | 1175 ++ .../api/ListGroupUsersRequestOrBuilder.java | 105 + .../nakama/api/ListGroupsRequest.java | 1572 ++ .../api/ListGroupsRequestOrBuilder.java | 152 + ...tLeaderboardRecordsAroundOwnerRequest.java | 1339 ++ ...ardRecordsAroundOwnerRequestOrBuilder.java | 125 + .../api/ListLeaderboardRecordsRequest.java | 1416 ++ ...istLeaderboardRecordsRequestOrBuilder.java | 146 + .../nakama/api/ListMatchesRequest.java | 1779 +++ .../api/ListMatchesRequestOrBuilder.java | 173 + .../nakama/api/ListNotificationsRequest.java | 778 + .../ListNotificationsRequestOrBuilder.java | 58 + .../nakama/api/ListStorageObjectsRequest.java | 1106 ++ .../ListStorageObjectsRequestOrBuilder.java | 98 + .../nakama/api/ListSubscriptionsRequest.java | 778 + .../ListSubscriptionsRequestOrBuilder.java | 58 + ...stTournamentRecordsAroundOwnerRequest.java | 1339 ++ ...entRecordsAroundOwnerRequestOrBuilder.java | 125 + .../api/ListTournamentRecordsRequest.java | 1416 ++ ...ListTournamentRecordsRequestOrBuilder.java | 146 + .../nakama/api/ListTournamentsRequest.java | 1710 ++ .../api/ListTournamentsRequestOrBuilder.java | 166 + .../nakama/api/ListUserGroupsRequest.java | 1175 ++ .../api/ListUserGroupsRequestOrBuilder.java | 105 + .../java/com/heroiclabs/nakama/api/Match.java | 1189 ++ .../com/heroiclabs/nakama/api/MatchList.java | 819 + .../nakama/api/MatchListOrBuilder.java | 55 + .../heroiclabs/nakama/api/MatchOrBuilder.java | 108 + .../nakama/api/MatchmakerCompletionStats.java | 751 + .../MatchmakerCompletionStatsOrBuilder.java | 41 + .../nakama/api/MatchmakerStats.java | 987 ++ .../nakama/api/MatchmakerStatsOrBuilder.java | 56 + .../com/heroiclabs/nakama/api/NakamaGrpc.java | 7381 +++++++++ .../heroiclabs/nakama/api/Notification.java | 1435 ++ .../nakama/api/NotificationList.java | 983 ++ .../nakama/api/NotificationListOrBuilder.java | 75 + .../nakama/api/NotificationOrBuilder.java | 138 + .../com/heroiclabs/nakama/api/Operator.java | 195 + .../nakama/api/PromoteGroupUsersRequest.java | 778 + .../PromoteGroupUsersRequestOrBuilder.java | 72 + .../heroiclabs/nakama/api/PurchaseList.java | 1147 ++ .../nakama/api/PurchaseListOrBuilder.java | 95 + .../nakama/api/ReadStorageObjectId.java | 865 + .../api/ReadStorageObjectIdOrBuilder.java | 71 + .../nakama/api/ReadStorageObjectsRequest.java | 819 + .../ReadStorageObjectsRequestOrBuilder.java | 55 + .../java/com/heroiclabs/nakama/api/Rpc.java | 865 + .../heroiclabs/nakama/api/RpcOrBuilder.java | 71 + .../com/heroiclabs/nakama/api/Session.java | 784 + .../nakama/api/SessionLogoutRequest.java | 701 + .../api/SessionLogoutRequestOrBuilder.java | 51 + .../nakama/api/SessionOrBuilder.java | 61 + .../nakama/api/SessionRefreshRequest.java | 860 + .../api/SessionRefreshRequestOrBuilder.java | 85 + .../heroiclabs/nakama/api/StorageObject.java | 1831 +++ .../nakama/api/StorageObjectAck.java | 1503 ++ .../nakama/api/StorageObjectAckOrBuilder.java | 145 + .../nakama/api/StorageObjectAcks.java | 819 + .../api/StorageObjectAcksOrBuilder.java | 55 + .../nakama/api/StorageObjectList.java | 983 ++ .../api/StorageObjectListOrBuilder.java | 75 + .../nakama/api/StorageObjectOrBuilder.java | 185 + .../heroiclabs/nakama/api/StorageObjects.java | 819 + .../nakama/api/StorageObjectsOrBuilder.java | 55 + .../nakama/api/StoreEnvironment.java | 161 + .../heroiclabs/nakama/api/StoreProvider.java | 178 + .../nakama/api/SubscriptionList.java | 1147 ++ .../nakama/api/SubscriptionListOrBuilder.java | 95 + .../com/heroiclabs/nakama/api/Tournament.java | 2844 ++++ .../heroiclabs/nakama/api/TournamentList.java | 983 ++ .../nakama/api/TournamentListOrBuilder.java | 75 + .../nakama/api/TournamentOrBuilder.java | 311 + .../nakama/api/TournamentRecordList.java | 1672 ++ .../api/TournamentRecordListOrBuilder.java | 149 + .../nakama/api/UpdateAccountRequest.java | 1779 +++ .../api/UpdateAccountRequestOrBuilder.java | 173 + .../nakama/api/UpdateGroupRequest.java | 1710 ++ .../api/UpdateGroupRequestOrBuilder.java | 166 + .../java/com/heroiclabs/nakama/api/User.java | 3308 ++++ .../heroiclabs/nakama/api/UserGroupList.java | 2052 +++ .../nakama/api/UserGroupListOrBuilder.java | 75 + .../heroiclabs/nakama/api/UserOrBuilder.java | 365 + .../java/com/heroiclabs/nakama/api/Users.java | 819 + .../heroiclabs/nakama/api/UsersOrBuilder.java | 55 + .../api/ValidatePurchaseAppleRequest.java | 778 + ...ValidatePurchaseAppleRequestOrBuilder.java | 58 + ...alidatePurchaseFacebookInstantRequest.java | 778 + ...rchaseFacebookInstantRequestOrBuilder.java | 58 + .../api/ValidatePurchaseGoogleRequest.java | 778 + ...alidatePurchaseGoogleRequestOrBuilder.java | 58 + .../api/ValidatePurchaseHuaweiRequest.java | 942 ++ ...alidatePurchaseHuaweiRequestOrBuilder.java | 78 + .../nakama/api/ValidatePurchaseResponse.java | 819 + .../ValidatePurchaseResponseOrBuilder.java | 55 + .../api/ValidateSubscriptionAppleRequest.java | 778 + ...dateSubscriptionAppleRequestOrBuilder.java | 58 + .../ValidateSubscriptionGoogleRequest.java | 778 + ...ateSubscriptionGoogleRequestOrBuilder.java | 58 + .../api/ValidateSubscriptionResponse.java | 566 + ...ValidateSubscriptionResponseOrBuilder.java | 26 + .../nakama/api/ValidatedPurchase.java | 2296 +++ .../api/ValidatedPurchaseOrBuilder.java | 247 + .../nakama/api/ValidatedSubscription.java | 2685 ++++ .../api/ValidatedSubscriptionOrBuilder.java | 294 + .../api/WriteLeaderboardRecordRequest.java | 1659 ++ ...riteLeaderboardRecordRequestOrBuilder.java | 58 + .../nakama/api/WriteStorageObject.java | 1503 ++ .../api/WriteStorageObjectOrBuilder.java | 145 + .../api/WriteStorageObjectsRequest.java | 819 + .../WriteStorageObjectsRequestOrBuilder.java | 55 + .../api/WriteTournamentRecordRequest.java | 1659 ++ ...WriteTournamentRecordRequestOrBuilder.java | 58 + .../com/heroiclabs/nakama/rtapi/Channel.java | 1881 +++ .../heroiclabs/nakama/rtapi/ChannelJoin.java | 1264 ++ .../nakama/rtapi/ChannelJoinOrBuilder.java | 95 + .../heroiclabs/nakama/rtapi/ChannelLeave.java | 537 + .../nakama/rtapi/ChannelLeaveOrBuilder.java | 31 + .../nakama/rtapi/ChannelMessageAck.java | 2461 +++ .../rtapi/ChannelMessageAckOrBuilder.java | 259 + .../nakama/rtapi/ChannelMessageRemove.java | 701 + .../rtapi/ChannelMessageRemoveOrBuilder.java | 51 + .../nakama/rtapi/ChannelMessageSend.java | 701 + .../rtapi/ChannelMessageSendOrBuilder.java | 51 + .../nakama/rtapi/ChannelMessageUpdate.java | 865 + .../rtapi/ChannelMessageUpdateOrBuilder.java | 71 + .../nakama/rtapi/ChannelOrBuilder.java | 182 + .../nakama/rtapi/ChannelPresenceEvent.java | 2081 +++ .../rtapi/ChannelPresenceEventOrBuilder.java | 199 + .../com/heroiclabs/nakama/rtapi/Envelope.java | 13135 ++++++++++++++++ .../nakama/rtapi/EnvelopeOrBuilder.java | 1348 ++ .../com/heroiclabs/nakama/rtapi/Error.java | 1181 ++ .../nakama/rtapi/ErrorOrBuilder.java | 95 + .../com/heroiclabs/nakama/rtapi/Match.java | 1623 ++ .../heroiclabs/nakama/rtapi/MatchCreate.java | 537 + .../nakama/rtapi/MatchCreateOrBuilder.java | 31 + .../heroiclabs/nakama/rtapi/MatchData.java | 1027 ++ .../nakama/rtapi/MatchDataOrBuilder.java | 88 + .../nakama/rtapi/MatchDataSend.java | 1232 ++ .../nakama/rtapi/MatchDataSendOrBuilder.java | 105 + .../heroiclabs/nakama/rtapi/MatchJoin.java | 1189 ++ .../nakama/rtapi/MatchJoinOrBuilder.java | 125 + .../heroiclabs/nakama/rtapi/MatchLeave.java | 537 + .../nakama/rtapi/MatchLeaveOrBuilder.java | 31 + .../nakama/rtapi/MatchOrBuilder.java | 149 + .../nakama/rtapi/MatchPresenceEvent.java | 1425 ++ .../rtapi/MatchPresenceEventOrBuilder.java | 119 + .../nakama/rtapi/MatchmakerAdd.java | 1556 ++ .../nakama/rtapi/MatchmakerAddOrBuilder.java | 184 + .../nakama/rtapi/MatchmakerMatched.java | 3252 ++++ .../rtapi/MatchmakerMatchedOrBuilder.java | 162 + .../nakama/rtapi/MatchmakerRemove.java | 537 + .../rtapi/MatchmakerRemoveOrBuilder.java | 31 + .../nakama/rtapi/MatchmakerTicket.java | 537 + .../rtapi/MatchmakerTicketOrBuilder.java | 31 + .../nakama/rtapi/Notifications.java | 819 + .../nakama/rtapi/NotificationsOrBuilder.java | 55 + .../com/heroiclabs/nakama/rtapi/Party.java | 1623 ++ .../heroiclabs/nakama/rtapi/PartyAccept.java | 778 + .../nakama/rtapi/PartyAcceptOrBuilder.java | 58 + .../heroiclabs/nakama/rtapi/PartyClose.java | 537 + .../nakama/rtapi/PartyCloseOrBuilder.java | 31 + .../heroiclabs/nakama/rtapi/PartyCreate.java | 538 + .../nakama/rtapi/PartyCreateOrBuilder.java | 31 + .../heroiclabs/nakama/rtapi/PartyData.java | 944 ++ .../nakama/rtapi/PartyDataOrBuilder.java | 78 + .../nakama/rtapi/PartyDataSend.java | 703 + .../nakama/rtapi/PartyDataSendOrBuilder.java | 51 + .../heroiclabs/nakama/rtapi/PartyJoin.java | 537 + .../nakama/rtapi/PartyJoinOrBuilder.java | 31 + .../nakama/rtapi/PartyJoinRequest.java | 983 ++ .../nakama/rtapi/PartyJoinRequestList.java | 537 + .../rtapi/PartyJoinRequestListOrBuilder.java | 31 + .../rtapi/PartyJoinRequestOrBuilder.java | 75 + .../heroiclabs/nakama/rtapi/PartyLeader.java | 778 + .../nakama/rtapi/PartyLeaderOrBuilder.java | 58 + .../heroiclabs/nakama/rtapi/PartyLeave.java | 537 + .../nakama/rtapi/PartyLeaveOrBuilder.java | 31 + .../nakama/rtapi/PartyMatchmakerAdd.java | 1720 ++ .../rtapi/PartyMatchmakerAddOrBuilder.java | 204 + .../nakama/rtapi/PartyMatchmakerRemove.java | 701 + .../rtapi/PartyMatchmakerRemoveOrBuilder.java | 51 + .../nakama/rtapi/PartyMatchmakerTicket.java | 701 + .../rtapi/PartyMatchmakerTicketOrBuilder.java | 51 + .../nakama/rtapi/PartyOrBuilder.java | 149 + .../nakama/rtapi/PartyPresenceEvent.java | 1425 ++ .../rtapi/PartyPresenceEventOrBuilder.java | 119 + .../heroiclabs/nakama/rtapi/PartyPromote.java | 778 + .../nakama/rtapi/PartyPromoteOrBuilder.java | 58 + .../heroiclabs/nakama/rtapi/PartyRemove.java | 778 + .../nakama/rtapi/PartyRemoveOrBuilder.java | 58 + .../com/heroiclabs/nakama/rtapi/Ping.java | 366 + .../nakama/rtapi/PingOrBuilder.java | 11 + .../com/heroiclabs/nakama/rtapi/Pong.java | 366 + .../nakama/rtapi/PongOrBuilder.java | 11 + .../nakama/rtapi/RealtimeProto.java | 989 ++ .../com/heroiclabs/nakama/rtapi/Status.java | 819 + .../heroiclabs/nakama/rtapi/StatusFollow.java | 855 + .../nakama/rtapi/StatusFollowOrBuilder.java | 93 + .../nakama/rtapi/StatusOrBuilder.java | 55 + .../nakama/rtapi/StatusPresenceEvent.java | 1261 ++ .../rtapi/StatusPresenceEventOrBuilder.java | 99 + .../nakama/rtapi/StatusUnfollow.java | 614 + .../nakama/rtapi/StatusUnfollowOrBuilder.java | 52 + .../heroiclabs/nakama/rtapi/StatusUpdate.java | 614 + .../nakama/rtapi/StatusUpdateOrBuilder.java | 38 + .../com/heroiclabs/nakama/rtapi/Stream.java | 947 ++ .../heroiclabs/nakama/rtapi/StreamData.java | 1094 ++ .../nakama/rtapi/StreamDataOrBuilder.java | 95 + .../nakama/rtapi/StreamOrBuilder.java | 81 + .../nakama/rtapi/StreamPresenceEvent.java | 1504 ++ .../rtapi/StreamPresenceEventOrBuilder.java | 126 + .../heroiclabs/nakama/rtapi/UserPresence.java | 1189 ++ .../nakama/rtapi/UserPresenceOrBuilder.java | 108 + .../satori/api/AuthenticateLogoutRequest.java | 701 + .../AuthenticateLogoutRequestOrBuilder.java | 51 + .../api/AuthenticateRefreshRequest.java | 537 + .../AuthenticateRefreshRequestOrBuilder.java | 31 + .../satori/api/AuthenticateRequest.java | 1184 ++ .../api/AuthenticateRequestOrBuilder.java | 151 + .../satori/api/DeleteMessageRequest.java | 537 + .../api/DeleteMessageRequestOrBuilder.java | 31 + .../java/com/heroiclabs/satori/api/Event.java | 1436 ++ .../heroiclabs/satori/api/EventOrBuilder.java | 154 + .../heroiclabs/satori/api/EventRequest.java | 819 + .../satori/api/EventRequestOrBuilder.java | 55 + .../com/heroiclabs/satori/api/Experiment.java | 701 + .../heroiclabs/satori/api/ExperimentList.java | 819 + .../satori/api/ExperimentListOrBuilder.java | 55 + .../satori/api/ExperimentOrBuilder.java | 51 + .../java/com/heroiclabs/satori/api/Flag.java | 784 + .../com/heroiclabs/satori/api/FlagList.java | 819 + .../satori/api/FlagListOrBuilder.java | 55 + .../heroiclabs/satori/api/FlagOrBuilder.java | 61 + .../satori/api/GetExperimentsRequest.java | 614 + .../api/GetExperimentsRequestOrBuilder.java | 52 + .../satori/api/GetFlagsRequest.java | 614 + .../satori/api/GetFlagsRequestOrBuilder.java | 52 + .../satori/api/GetLiveEventsRequest.java | 614 + .../api/GetLiveEventsRequestOrBuilder.java | 52 + .../satori/api/GetMessageListRequest.java | 694 + .../api/GetMessageListRequestOrBuilder.java | 51 + .../satori/api/GetMessageListResponse.java | 1311 ++ .../api/GetMessageListResponseOrBuilder.java | 115 + .../satori/api/IdentifyRequest.java | 1177 ++ .../satori/api/IdentifyRequestOrBuilder.java | 149 + .../com/heroiclabs/satori/api/LiveEvent.java | 1608 ++ .../heroiclabs/satori/api/LiveEventList.java | 819 + .../satori/api/LiveEventListOrBuilder.java | 55 + .../satori/api/LiveEventOrBuilder.java | 161 + .../com/heroiclabs/satori/api/Message.java | 1931 +++ .../satori/api/MessageOrBuilder.java | 215 + .../com/heroiclabs/satori/api/Properties.java | 1286 ++ .../satori/api/PropertiesOrBuilder.java | 173 + .../com/heroiclabs/satori/api/SatoriGrpc.java | 1619 ++ .../heroiclabs/satori/api/SatoriProto.java | 583 + .../com/heroiclabs/satori/api/Session.java | 942 ++ .../satori/api/SessionOrBuilder.java | 78 + .../satori/api/UpdateMessageRequest.java | 703 + .../api/UpdateMessageRequestOrBuilder.java | 51 + .../satori/api/UpdatePropertiesRequest.java | 1232 ++ .../api/UpdatePropertiesRequestOrBuilder.java | 146 + 428 files changed, 287875 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/google/api/AnnotationsProto.java create mode 100644 src/main/java/com/google/api/CustomHttpPattern.java create mode 100644 src/main/java/com/google/api/CustomHttpPatternOrBuilder.java create mode 100644 src/main/java/com/google/api/Http.java create mode 100644 src/main/java/com/google/api/HttpOrBuilder.java create mode 100644 src/main/java/com/google/api/HttpProto.java create mode 100644 src/main/java/com/google/api/HttpRule.java create mode 100644 src/main/java/com/google/api/HttpRuleOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Contact.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Header.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Info.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/License.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Operation.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Response.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Schema.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Tag.java create mode 100644 src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Account.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountApple.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountAppleOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountCustom.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountCustomOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountDevice.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountDeviceOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountEmail.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountEmailOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountFacebook.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGame.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGameOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountFacebookOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountGameCenter.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountGameCenterOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountGoogle.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountGoogleOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountRefresh.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountRefreshOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountSteam.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AccountSteamOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AddFriendsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AddFriendsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ApiProto.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ApigrpcProto.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ChannelMessage.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ChannelMessageList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ChannelMessageListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ChannelMessageOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/CreateGroupRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/CreateGroupRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectId.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectIdOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Event.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/EventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Friend.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/FriendList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/FriendListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/FriendOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GetUsersRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GetUsersRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Group.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GroupList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GroupListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GroupOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GroupUserList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/GroupUserListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/JoinGroupRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/JoinGroupRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Leaderboard.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaderboardList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaderboardListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaderboardOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaderboardRecord.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LinkSteamRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/LinkSteamRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListFriendsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListFriendsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListGroupsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListGroupsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListMatchesRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListMatchesRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Match.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/MatchList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/MatchListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/MatchOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStats.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStatsOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/MatchmakerStats.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/MatchmakerStatsOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/NakamaGrpc.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Notification.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/NotificationList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/NotificationListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/NotificationOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Operator.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/PurchaseList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/PurchaseListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectId.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectIdOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Rpc.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/RpcOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Session.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/SessionOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObject.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectAck.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectAckOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectAcks.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectAcksOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjects.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StorageObjectsOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StoreEnvironment.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/StoreProvider.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/SubscriptionList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/SubscriptionListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Tournament.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/TournamentList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/TournamentListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/TournamentOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/TournamentRecordList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/TournamentRecordListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/User.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UserGroupList.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UserGroupListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UserOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/Users.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/UsersOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponse.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponseOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponse.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponseOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatedPurchase.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatedPurchaseOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatedSubscription.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/ValidatedSubscriptionOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteStorageObject.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Channel.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoin.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoinOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeave.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeaveOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAck.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAckOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemove.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemoveOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSend.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSendOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdate.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdateOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEvent.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Envelope.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/EnvelopeOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Error.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/ErrorOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Match.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchCreate.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchCreateOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchData.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchDataOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSend.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSendOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchJoin.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchJoinOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchLeave.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchLeaveOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEvent.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAdd.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAddOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatched.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatchedOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemove.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemoveOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicket.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicketOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Notifications.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/NotificationsOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Party.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyAccept.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyAcceptOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyClose.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyCloseOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyCreate.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyCreateOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyData.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyDataOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSend.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSendOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyJoin.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequest.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestList.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyLeader.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaderOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyLeave.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaveOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAdd.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAddOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemove.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemoveOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicket.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicketOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEvent.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyPromote.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyPromoteOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyRemove.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PartyRemoveOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Ping.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PingOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Pong.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/PongOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/RealtimeProto.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Status.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusFollow.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusFollowOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEvent.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollow.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollowOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdate.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdateOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/Stream.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StreamData.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StreamDataOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StreamOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEvent.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/UserPresence.java create mode 100644 src/main/java/com/heroiclabs/nakama/rtapi/UserPresenceOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/AuthenticateRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/AuthenticateRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/DeleteMessageRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/DeleteMessageRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/Event.java create mode 100644 src/main/java/com/heroiclabs/satori/api/EventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/EventRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/EventRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/Experiment.java create mode 100644 src/main/java/com/heroiclabs/satori/api/ExperimentList.java create mode 100644 src/main/java/com/heroiclabs/satori/api/ExperimentListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/ExperimentOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/Flag.java create mode 100644 src/main/java/com/heroiclabs/satori/api/FlagList.java create mode 100644 src/main/java/com/heroiclabs/satori/api/FlagListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/FlagOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetExperimentsRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetExperimentsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetFlagsRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetFlagsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetMessageListRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetMessageListRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetMessageListResponse.java create mode 100644 src/main/java/com/heroiclabs/satori/api/GetMessageListResponseOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/IdentifyRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/IdentifyRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/LiveEvent.java create mode 100644 src/main/java/com/heroiclabs/satori/api/LiveEventList.java create mode 100644 src/main/java/com/heroiclabs/satori/api/LiveEventListOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/LiveEventOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/Message.java create mode 100644 src/main/java/com/heroiclabs/satori/api/MessageOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/Properties.java create mode 100644 src/main/java/com/heroiclabs/satori/api/PropertiesOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/SatoriGrpc.java create mode 100644 src/main/java/com/heroiclabs/satori/api/SatoriProto.java create mode 100644 src/main/java/com/heroiclabs/satori/api/Session.java create mode 100644 src/main/java/com/heroiclabs/satori/api/SessionOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/UpdateMessageRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/UpdateMessageRequestOrBuilder.java create mode 100644 src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequest.java create mode 100644 src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequestOrBuilder.java diff --git a/.gitignore b/.gitignore index 17dc585f..eb6d3e3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,9 @@ # Created by https://www.gitignore.io/api/git,java,macos,linux,gradle,eclipse,windows,sublimetext,intellij+all,intellij+iml -**/build - ## Downloaded code by the shell script **/proto -## Generated Java code by Buf -**/src/main/java/com/google/ -**/src/main/java/com/grpc/ -**/src/main/java/com/heroiclabs/nakama/api/ -**/src/main/java/com/heroiclabs/nakama/rtapi/ -**/src/main/java/com/heroiclabs/satori/api/ +**/build ### Custom ### .BINTRAY diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b053266..c697e25e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project are documented below. The format is based on [keep a changelog](http://keepachangelog.com/) and this project uses [semantic versioning](http://semver.org/). +## [2.5.1] - 2024-10-16 + +### Changed +- Include generated Protobuf code in the repository to allow CI tools to build the codebase without Buf tooling. + ## [2.5.0] - 2024-10-14 ### Added diff --git a/src/main/java/com/google/api/AnnotationsProto.java b/src/main/java/com/google/api/AnnotationsProto.java new file mode 100644 index 00000000..b3c7843c --- /dev/null +++ b/src/main/java/com/google/api/AnnotationsProto.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/annotations.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +public final class AnnotationsProto { + private AnnotationsProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AnnotationsProto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.google.api.AnnotationsProto.http); + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public static final int HTTP_FIELD_NUMBER = 72295728; + /** + *
+   * See `HttpRule`.
+   * 
+ * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, + com.google.api.HttpRule> http = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.google.api.HttpRule.class, + com.google.api.HttpRule.getDefaultInstance()); + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034google/api/annotations.proto\022\ngoogle.a" + + "pi\032\025google/api/http.proto\032 google/protob" + + "uf/descriptor.proto:K\n\004http\022\036.google.pro" + + "tobuf.MethodOptions\030\260\312\274\" \001(\0132\024.google.ap" + + "i.HttpRuleR\004httpB\256\001\n\016com.google.apiB\020Ann" + + "otationsProtoP\001ZAgoogle.golang.org/genpr" + + "oto/googleapis/api/annotations;annotatio" + + "ns\242\002\003GAX\252\002\nGoogle.Api\312\002\nGoogle\\Api\342\002\026Goo" + + "gle\\Api\\GPBMetadata\352\002\013Google::Apib\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.HttpProto.getDescriptor(), + com.google.protobuf.DescriptorProtos.getDescriptor(), + }); + http.internalInit(descriptor.getExtensions().get(0)); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.HttpProto.getDescriptor(); + com.google.protobuf.DescriptorProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/google/api/CustomHttpPattern.java b/src/main/java/com/google/api/CustomHttpPattern.java new file mode 100644 index 00000000..c4a942ca --- /dev/null +++ b/src/main/java/com/google/api/CustomHttpPattern.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/http.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +/** + *
+ * A custom pattern is used for defining custom HTTP verb.
+ * 
+ * + * Protobuf type {@code google.api.CustomHttpPattern} + */ +public final class CustomHttpPattern extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.CustomHttpPattern) + CustomHttpPatternOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + CustomHttpPattern.class.getName()); + } + // Use CustomHttpPattern.newBuilder() to construct. + private CustomHttpPattern(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CustomHttpPattern() { + kind_ = ""; + path_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); + } + + public static final int KIND_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + /** + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1 [json_name = "kind"]; + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1 [json_name = "kind"]; + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2 [json_name = "path"]; + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2 [json_name = "path"]; + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, path_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kind_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, path_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.CustomHttpPattern)) { + return super.equals(obj); + } + com.google.api.CustomHttpPattern other = (com.google.api.CustomHttpPattern) obj; + + if (!getKind() + .equals(other.getKind())) return false; + if (!getPath() + .equals(other.getPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.CustomHttpPattern parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomHttpPattern parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.CustomHttpPattern parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.google.api.CustomHttpPattern parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.google.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.CustomHttpPattern parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.google.api.CustomHttpPattern parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.api.CustomHttpPattern prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A custom pattern is used for defining custom HTTP verb.
+   * 
+ * + * Protobuf type {@code google.api.CustomHttpPattern} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.CustomHttpPattern) + com.google.api.CustomHttpPatternOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); + } + + // Construct using com.google.api.CustomHttpPattern.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kind_ = ""; + path_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + @java.lang.Override + public com.google.api.CustomHttpPattern getDefaultInstanceForType() { + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.CustomHttpPattern build() { + com.google.api.CustomHttpPattern result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.CustomHttpPattern buildPartial() { + com.google.api.CustomHttpPattern result = new com.google.api.CustomHttpPattern(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.CustomHttpPattern result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.path_ = path_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CustomHttpPattern) { + return mergeFrom((com.google.api.CustomHttpPattern)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomHttpPattern other) { + if (other == com.google.api.CustomHttpPattern.getDefaultInstance()) return this; + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object kind_ = ""; + /** + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1 [json_name = "kind"]; + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1 [json_name = "kind"]; + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1 [json_name = "kind"]; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1 [json_name = "kind"]; + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1 [json_name = "kind"]; + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2 [json_name = "path"]; + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2 [json_name = "path"]; + * @return The bytes for path. + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2 [json_name = "path"]; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + path_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2 [json_name = "path"]; + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2 [json_name = "path"]; + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.api.CustomHttpPattern) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern) + private static final com.google.api.CustomHttpPattern DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.CustomHttpPattern(); + } + + public static com.google.api.CustomHttpPattern getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomHttpPattern parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.CustomHttpPattern getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java b/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java new file mode 100644 index 00000000..5ba0f88f --- /dev/null +++ b/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/http.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +public interface CustomHttpPatternOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.CustomHttpPattern) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1 [json_name = "kind"]; + * @return The kind. + */ + java.lang.String getKind(); + /** + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1 [json_name = "kind"]; + * @return The bytes for kind. + */ + com.google.protobuf.ByteString + getKindBytes(); + + /** + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2 [json_name = "path"]; + * @return The path. + */ + java.lang.String getPath(); + /** + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2 [json_name = "path"]; + * @return The bytes for path. + */ + com.google.protobuf.ByteString + getPathBytes(); +} diff --git a/src/main/java/com/google/api/Http.java b/src/main/java/com/google/api/Http.java new file mode 100644 index 00000000..0326bf29 --- /dev/null +++ b/src/main/java/com/google/api/Http.java @@ -0,0 +1,972 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/http.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +/** + *
+ * Defines the HTTP configuration for an API service. It contains a list of
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+ * to one or more HTTP REST API methods.
+ * 
+ * + * Protobuf type {@code google.api.Http} + */ +public final class Http extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.Http) + HttpOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Http.class.getName()); + } + // Use Http.newBuilder() to construct. + private Http(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Http() { + rules_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List rules_; + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + @java.lang.Override + public com.google.api.HttpRule getRules(int index) { + return rules_.get(index); + } + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + @java.lang.Override + public com.google.api.HttpRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER = 2; + private boolean fullyDecodeReservedExpansion_ = false; + /** + *
+   * When set to true, URL path parameters will be fully URI-decoded except in
+   * cases of single segment matches in reserved expansion, where "%2F" will be
+   * left encoded.
+   *
+   * The default behavior is to not decode RFC 6570 reserved characters in multi
+   * segment matches.
+   * 
+ * + * bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"]; + * @return The fullyDecodeReservedExpansion. + */ + @java.lang.Override + public boolean getFullyDecodeReservedExpansion() { + return fullyDecodeReservedExpansion_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + if (fullyDecodeReservedExpansion_ != false) { + output.writeBool(2, fullyDecodeReservedExpansion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, rules_.get(i)); + } + if (fullyDecodeReservedExpansion_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, fullyDecodeReservedExpansion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.Http)) { + return super.equals(obj); + } + com.google.api.Http other = (com.google.api.Http) obj; + + if (!getRulesList() + .equals(other.getRulesList())) return false; + if (getFullyDecodeReservedExpansion() + != other.getFullyDecodeReservedExpansion()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (37 * hash) + FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFullyDecodeReservedExpansion()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Http parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Http parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Http parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Http parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Http parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.Http parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.Http parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.google.api.Http parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.google.api.Http parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Http parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.api.Http parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.google.api.Http parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.api.Http prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Defines the HTTP configuration for an API service. It contains a list of
+   * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+   * to one or more HTTP REST API methods.
+   * 
+ * + * Protobuf type {@code google.api.Http} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.Http) + com.google.api.HttpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + // Construct using com.google.api.Http.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + fullyDecodeReservedExpansion_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + @java.lang.Override + public com.google.api.Http getDefaultInstanceForType() { + return com.google.api.Http.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Http build() { + com.google.api.Http result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Http buildPartial() { + com.google.api.Http result = new com.google.api.Http(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Http result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Http result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fullyDecodeReservedExpansion_ = fullyDecodeReservedExpansion_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Http) { + return mergeFrom((com.google.api.Http)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Http other) { + if (other == com.google.api.Http.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (other.getFullyDecodeReservedExpansion() != false) { + setFullyDecodeReservedExpansion(other.getFullyDecodeReservedExpansion()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.api.HttpRule m = + input.readMessage( + com.google.api.HttpRule.parser(), + extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: { + fullyDecodeReservedExpansion_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> rulesBuilder_; + + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public com.google.api.HttpRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder setRules( + int index, com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder setRules( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder addRules(com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder addRules( + int index, com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder addRules( + com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder addRules( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public com.google.api.HttpRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public com.google.api.HttpRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public com.google.api.HttpRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.api.HttpRule.getDefaultInstance()); + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public com.google.api.HttpRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private boolean fullyDecodeReservedExpansion_ ; + /** + *
+     * When set to true, URL path parameters will be fully URI-decoded except in
+     * cases of single segment matches in reserved expansion, where "%2F" will be
+     * left encoded.
+     *
+     * The default behavior is to not decode RFC 6570 reserved characters in multi
+     * segment matches.
+     * 
+ * + * bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"]; + * @return The fullyDecodeReservedExpansion. + */ + @java.lang.Override + public boolean getFullyDecodeReservedExpansion() { + return fullyDecodeReservedExpansion_; + } + /** + *
+     * When set to true, URL path parameters will be fully URI-decoded except in
+     * cases of single segment matches in reserved expansion, where "%2F" will be
+     * left encoded.
+     *
+     * The default behavior is to not decode RFC 6570 reserved characters in multi
+     * segment matches.
+     * 
+ * + * bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"]; + * @param value The fullyDecodeReservedExpansion to set. + * @return This builder for chaining. + */ + public Builder setFullyDecodeReservedExpansion(boolean value) { + + fullyDecodeReservedExpansion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * When set to true, URL path parameters will be fully URI-decoded except in
+     * cases of single segment matches in reserved expansion, where "%2F" will be
+     * left encoded.
+     *
+     * The default behavior is to not decode RFC 6570 reserved characters in multi
+     * segment matches.
+     * 
+ * + * bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"]; + * @return This builder for chaining. + */ + public Builder clearFullyDecodeReservedExpansion() { + bitField0_ = (bitField0_ & ~0x00000002); + fullyDecodeReservedExpansion_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.api.Http) + } + + // @@protoc_insertion_point(class_scope:google.api.Http) + private static final com.google.api.Http DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.Http(); + } + + public static com.google.api.Http getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Http parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.Http getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/google/api/HttpOrBuilder.java b/src/main/java/com/google/api/HttpOrBuilder.java new file mode 100644 index 00000000..b98e9a52 --- /dev/null +++ b/src/main/java/com/google/api/HttpOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/http.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +public interface HttpOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.Http) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + java.util.List + getRulesList(); + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + com.google.api.HttpRule getRules(int index); + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + int getRulesCount(); + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + java.util.List + getRulesOrBuilderList(); + /** + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1 [json_name = "rules"]; + */ + com.google.api.HttpRuleOrBuilder getRulesOrBuilder( + int index); + + /** + *
+   * When set to true, URL path parameters will be fully URI-decoded except in
+   * cases of single segment matches in reserved expansion, where "%2F" will be
+   * left encoded.
+   *
+   * The default behavior is to not decode RFC 6570 reserved characters in multi
+   * segment matches.
+   * 
+ * + * bool fully_decode_reserved_expansion = 2 [json_name = "fullyDecodeReservedExpansion"]; + * @return The fullyDecodeReservedExpansion. + */ + boolean getFullyDecodeReservedExpansion(); +} diff --git a/src/main/java/com/google/api/HttpProto.java b/src/main/java/com/google/api/HttpProto.java new file mode 100644 index 00000000..dffcb7c2 --- /dev/null +++ b/src/main/java/com/google/api/HttpProto.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/http.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +public final class HttpProto { + private HttpProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + HttpProto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Http_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_Http_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_HttpRule_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_HttpRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomHttpPattern_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_api_CustomHttpPattern_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025google/api/http.proto\022\ngoogle.api\"y\n\004H" + + "ttp\022*\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" + + "R\005rules\022E\n\037fully_decode_reserved_expansi" + + "on\030\002 \001(\010R\034fullyDecodeReservedExpansion\"\332" + + "\002\n\010HttpRule\022\032\n\010selector\030\001 \001(\tR\010selector\022" + + "\022\n\003get\030\002 \001(\tH\000R\003get\022\022\n\003put\030\003 \001(\tH\000R\003put\022" + + "\024\n\004post\030\004 \001(\tH\000R\004post\022\030\n\006delete\030\005 \001(\tH\000R" + + "\006delete\022\026\n\005patch\030\006 \001(\tH\000R\005patch\0227\n\006custo" + + "m\030\010 \001(\0132\035.google.api.CustomHttpPatternH\000" + + "R\006custom\022\022\n\004body\030\007 \001(\tR\004body\022#\n\rresponse" + + "_body\030\014 \001(\tR\014responseBody\022E\n\023additional_" + + "bindings\030\013 \003(\0132\024.google.api.HttpRuleR\022ad" + + "ditionalBindingsB\t\n\007pattern\";\n\021CustomHtt" + + "pPattern\022\022\n\004kind\030\001 \001(\tR\004kind\022\022\n\004path\030\002 \001" + + "(\tR\004pathB\252\001\n\016com.google.apiB\tHttpProtoP\001" + + "ZAgoogle.golang.org/genproto/googleapis/" + + "api/annotations;annotations\370\001\001\242\002\003GAX\252\002\nG" + + "oogle.Api\312\002\nGoogle\\Api\342\002\026Google\\Api\\GPBM" + + "etadata\352\002\013Google::Apib\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_api_Http_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Http_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_Http_descriptor, + new java.lang.String[] { "Rules", "FullyDecodeReservedExpansion", }); + internal_static_google_api_HttpRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_HttpRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_HttpRule_descriptor, + new java.lang.String[] { "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "ResponseBody", "AdditionalBindings", "Pattern", }); + internal_static_google_api_CustomHttpPattern_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_CustomHttpPattern_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_api_CustomHttpPattern_descriptor, + new java.lang.String[] { "Kind", "Path", }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/google/api/HttpRule.java b/src/main/java/com/google/api/HttpRule.java new file mode 100644 index 00000000..48c752eb --- /dev/null +++ b/src/main/java/com/google/api/HttpRule.java @@ -0,0 +1,3395 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/http.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +/** + *
+ * gRPC Transcoding
+ *
+ * gRPC Transcoding is a feature for mapping between a gRPC method and one or
+ * more HTTP REST endpoints. It allows developers to build a single API service
+ * that supports both gRPC APIs and REST APIs. Many systems, including [Google
+ * APIs](https://github.com/googleapis/googleapis),
+ * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
+ * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
+ * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
+ * and use it for large scale production services.
+ *
+ * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
+ * how different portions of the gRPC request message are mapped to the URL
+ * path, URL query parameters, and HTTP request body. It also controls how the
+ * gRPC response message is mapped to the HTTP response body. `HttpRule` is
+ * typically specified as an `google.api.http` annotation on the gRPC method.
+ *
+ * Each mapping specifies a URL path template and an HTTP method. The path
+ * template may refer to one or more fields in the gRPC request message, as long
+ * as each field is a non-repeated field with a primitive (non-message) type.
+ * The path template controls how fields of the request message are mapped to
+ * the URL path.
+ *
+ * Example:
+ *
+ * service Messaging {
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
+ * option (google.api.http) = {
+ * get: "/v1/{name=messages/*}"
+ * };
+ * }
+ * }
+ * message GetMessageRequest {
+ * string name = 1; // Mapped to URL path.
+ * }
+ * message Message {
+ * string text = 1; // The resource content.
+ * }
+ *
+ * This enables an HTTP REST to gRPC mapping as below:
+ *
+ * - HTTP: `GET /v1/messages/123456`
+ * - gRPC: `GetMessage(name: "messages/123456")`
+ *
+ * Any fields in the request message which are not bound by the path template
+ * automatically become HTTP query parameters if there is no HTTP request body.
+ * For example:
+ *
+ * service Messaging {
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
+ * option (google.api.http) = {
+ * get:"/v1/messages/{message_id}"
+ * };
+ * }
+ * }
+ * message GetMessageRequest {
+ * message SubMessage {
+ * string subfield = 1;
+ * }
+ * string message_id = 1; // Mapped to URL path.
+ * int64 revision = 2;    // Mapped to URL query parameter `revision`.
+ * SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
+ * }
+ *
+ * This enables a HTTP JSON to RPC mapping as below:
+ *
+ * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
+ * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
+ * SubMessage(subfield: "foo"))`
+ *
+ * Note that fields which are mapped to URL query parameters must have a
+ * primitive type or a repeated primitive type or a non-repeated message type.
+ * In the case of a repeated type, the parameter can be repeated in the URL
+ * as `...?param=A&param=B`. In the case of a message type, each field of the
+ * message is mapped to a separate parameter, such as
+ * `...?foo.a=A&foo.b=B&foo.c=C`.
+ *
+ * For HTTP methods that allow a request body, the `body` field
+ * specifies the mapping. Consider a REST update method on the
+ * message resource collection:
+ *
+ * service Messaging {
+ * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+ * option (google.api.http) = {
+ * patch: "/v1/messages/{message_id}"
+ * body: "message"
+ * };
+ * }
+ * }
+ * message UpdateMessageRequest {
+ * string message_id = 1; // mapped to the URL
+ * Message message = 2;   // mapped to the body
+ * }
+ *
+ * The following HTTP JSON to RPC mapping is enabled, where the
+ * representation of the JSON in the request body is determined by
+ * protos JSON encoding:
+ *
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
+ * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+ *
+ * The special name `*` can be used in the body mapping to define that
+ * every field not bound by the path template should be mapped to the
+ * request body.  This enables the following alternative definition of
+ * the update method:
+ *
+ * service Messaging {
+ * rpc UpdateMessage(Message) returns (Message) {
+ * option (google.api.http) = {
+ * patch: "/v1/messages/{message_id}"
+ * body: "*"
+ * };
+ * }
+ * }
+ * message Message {
+ * string message_id = 1;
+ * string text = 2;
+ * }
+ *
+ *
+ * The following HTTP JSON to RPC mapping is enabled:
+ *
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
+ * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
+ *
+ * Note that when using `*` in the body mapping, it is not possible to
+ * have HTTP parameters, as all fields not bound by the path end in
+ * the body. This makes this option more rarely used in practice when
+ * defining REST APIs. The common usage of `*` is in custom methods
+ * which don't use the URL at all for transferring data.
+ *
+ * It is possible to define multiple HTTP methods for one RPC by using
+ * the `additional_bindings` option. Example:
+ *
+ * service Messaging {
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
+ * option (google.api.http) = {
+ * get: "/v1/messages/{message_id}"
+ * additional_bindings {
+ * get: "/v1/users/{user_id}/messages/{message_id}"
+ * }
+ * };
+ * }
+ * }
+ * message GetMessageRequest {
+ * string message_id = 1;
+ * string user_id = 2;
+ * }
+ *
+ * This enables the following two alternative HTTP JSON to RPC mappings:
+ *
+ * - HTTP: `GET /v1/messages/123456`
+ * - gRPC: `GetMessage(message_id: "123456")`
+ *
+ * - HTTP: `GET /v1/users/me/messages/123456`
+ * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
+ *
+ * Rules for HTTP mapping
+ *
+ * 1. Leaf request fields (recursive expansion nested messages in the request
+ * message) are classified into three categories:
+ * - Fields referred by the path template. They are passed via the URL path.
+ * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
+ * are passed via the HTTP
+ * request body.
+ * - All other fields are passed via the URL query parameters, and the
+ * parameter name is the field path in the request message. A repeated
+ * field can be represented as multiple query parameters under the same
+ * name.
+ * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
+ * query parameter, all fields
+ * are passed via URL path and HTTP request body.
+ * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
+ * request body, all
+ * fields are passed via URL path and URL query parameters.
+ *
+ * Path template syntax
+ *
+ * Template = "/" Segments [ Verb ] ;
+ * Segments = Segment { "/" Segment } ;
+ * Segment  = "*" | "**" | LITERAL | Variable ;
+ * Variable = "{" FieldPath [ "=" Segments ] "}" ;
+ * FieldPath = IDENT { "." IDENT } ;
+ * Verb     = ":" LITERAL ;
+ *
+ * The syntax `*` matches a single URL path segment. The syntax `**` matches
+ * zero or more URL path segments, which must be the last part of the URL path
+ * except the `Verb`.
+ *
+ * The syntax `Variable` matches part of the URL path as specified by its
+ * template. A variable template must not contain other variables. If a variable
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
+ * is equivalent to `{var=*}`.
+ *
+ * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
+ * contains any reserved character, such characters should be percent-encoded
+ * before the matching.
+ *
+ * If a variable contains exactly one path segment, such as `"{var}"` or
+ * `"{var=*}"`, when such a variable is expanded into a URL path on the client
+ * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
+ * server side does the reverse decoding. Such variables show up in the
+ * [Discovery
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
+ * `{var}`.
+ *
+ * If a variable contains multiple path segments, such as `"{var=foo/*}"`
+ * or `"{var=**}"`, when such a variable is expanded into a URL path on the
+ * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
+ * The server side does the reverse decoding, except "%2F" and "%2f" are left
+ * unchanged. Such variables show up in the
+ * [Discovery
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
+ * `{+var}`.
+ *
+ * Using gRPC API Service Configuration
+ *
+ * gRPC API Service Configuration (service config) is a configuration language
+ * for configuring a gRPC service to become a user-facing product. The
+ * service config is simply the YAML representation of the `google.api.Service`
+ * proto message.
+ *
+ * As an alternative to annotating your proto file, you can configure gRPC
+ * transcoding in your service config YAML files. You do this by specifying a
+ * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
+ * effect as the proto annotation. This can be particularly useful if you
+ * have a proto that is reused in multiple services. Note that any transcoding
+ * specified in the service config will override any matching transcoding
+ * configuration in the proto.
+ *
+ * The following example selects a gRPC method and applies an `HttpRule` to it:
+ *
+ * http:
+ * rules:
+ * - selector: example.v1.Messaging.GetMessage
+ * get: /v1/messages/{message_id}/{sub.subfield}
+ *
+ * Special notes
+ *
+ * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
+ * proto to JSON conversion must follow the [proto3
+ * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
+ *
+ * While the single segment variable follows the semantics of
+ * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
+ * Expansion, the multi segment variable **does not** follow RFC 6570 Section
+ * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
+ * does not expand special characters like `?` and `#`, which would lead
+ * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
+ * for multi segment variables.
+ *
+ * The path variables **must not** refer to any repeated or mapped field,
+ * because client libraries are not capable of handling such variable expansion.
+ *
+ * The path variables **must not** capture the leading "/" character. The reason
+ * is that the most common use case "{var}" does not capture the leading "/"
+ * character. For consistency, all path variables must share the same behavior.
+ *
+ * Repeated message fields must not be mapped to URL query parameters, because
+ * no client library can support such complicated mapping.
+ *
+ * If an API needs to use a JSON array for request or response body, it can map
+ * the request or response body to a repeated field. However, some gRPC
+ * Transcoding implementations may not support this feature.
+ * 
+ * + * Protobuf type {@code google.api.HttpRule} + */ +public final class HttpRule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:google.api.HttpRule) + HttpRuleOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + HttpRule.class.getName()); + } + // Use HttpRule.newBuilder() to construct. + private HttpRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HttpRule() { + selector_ = ""; + body_ = ""; + responseBody_ = ""; + additionalBindings_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + private int patternCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object pattern_; + public enum PatternCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GET(2), + PUT(3), + POST(4), + DELETE(5), + PATCH(6), + CUSTOM(8), + PATTERN_NOT_SET(0); + private final int value; + private PatternCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PatternCase valueOf(int value) { + return forNumber(value); + } + + public static PatternCase forNumber(int value) { + switch (value) { + case 2: return GET; + case 3: return PUT; + case 4: return POST; + case 5: return DELETE; + case 6: return PATCH; + case 8: return CUSTOM; + case 0: return PATTERN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PatternCase + getPatternCase() { + return PatternCase.forNumber( + patternCase_); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1 [json_name = "selector"]; + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1 [json_name = "selector"]; + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GET_FIELD_NUMBER = 2; + /** + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2 [json_name = "get"]; + * @return Whether the get field is set. + */ + public boolean hasGet() { + return patternCase_ == 2; + } + /** + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2 [json_name = "get"]; + * @return The get. + */ + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } + } + /** + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2 [json_name = "get"]; + * @return The bytes for get. + */ + public com.google.protobuf.ByteString + getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUT_FIELD_NUMBER = 3; + /** + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3 [json_name = "put"]; + * @return Whether the put field is set. + */ + public boolean hasPut() { + return patternCase_ == 3; + } + /** + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3 [json_name = "put"]; + * @return The put. + */ + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } + } + /** + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3 [json_name = "put"]; + * @return The bytes for put. + */ + public com.google.protobuf.ByteString + getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POST_FIELD_NUMBER = 4; + /** + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4 [json_name = "post"]; + * @return Whether the post field is set. + */ + public boolean hasPost() { + return patternCase_ == 4; + } + /** + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4 [json_name = "post"]; + * @return The post. + */ + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } + } + /** + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4 [json_name = "post"]; + * @return The bytes for post. + */ + public com.google.protobuf.ByteString + getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETE_FIELD_NUMBER = 5; + /** + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return Whether the delete field is set. + */ + public boolean hasDelete() { + return patternCase_ == 5; + } + /** + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return The delete. + */ + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } + } + /** + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return The bytes for delete. + */ + public com.google.protobuf.ByteString + getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATCH_FIELD_NUMBER = 6; + /** + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return Whether the patch field is set. + */ + public boolean hasPatch() { + return patternCase_ == 6; + } + /** + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return The patch. + */ + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } + } + /** + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return The bytes for patch. + */ + public com.google.protobuf.ByteString + getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_FIELD_NUMBER = 8; + /** + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return patternCase_ == 8; + } + /** + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + * @return The custom. + */ + @java.lang.Override + public com.google.api.CustomHttpPattern getCustom() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + /** + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + @java.lang.Override + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + public static final int BODY_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object body_ = ""; + /** + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7 [json_name = "body"]; + * @return The body. + */ + @java.lang.Override + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + body_ = s; + return s; + } + } + /** + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7 [json_name = "body"]; + * @return The bytes for body. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_BODY_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object responseBody_ = ""; + /** + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @return The responseBody. + */ + @java.lang.Override + public java.lang.String getResponseBody() { + java.lang.Object ref = responseBody_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseBody_ = s; + return s; + } + } + /** + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @return The bytes for responseBody. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResponseBodyBytes() { + java.lang.Object ref = responseBody_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + responseBody_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDITIONAL_BINDINGS_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List additionalBindings_; + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + @java.lang.Override + public java.util.List getAdditionalBindingsList() { + return additionalBindings_; + } + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + @java.lang.Override + public java.util.List + getAdditionalBindingsOrBuilderList() { + return additionalBindings_; + } + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + @java.lang.Override + public int getAdditionalBindingsCount() { + return additionalBindings_.size(); + } + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + @java.lang.Override + public com.google.api.HttpRule getAdditionalBindings(int index) { + return additionalBindings_.get(index); + } + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + @java.lang.Override + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index) { + return additionalBindings_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(selector_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); + } + if (patternCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pattern_); + } + if (patternCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pattern_); + } + if (patternCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pattern_); + } + if (patternCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pattern_); + } + if (patternCase_ == 6) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, pattern_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(body_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, body_); + } + if (patternCase_ == 8) { + output.writeMessage(8, (com.google.api.CustomHttpPattern) pattern_); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + output.writeMessage(11, additionalBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseBody_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, responseBody_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(selector_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); + } + if (patternCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pattern_); + } + if (patternCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pattern_); + } + if (patternCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pattern_); + } + if (patternCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pattern_); + } + if (patternCase_ == 6) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, pattern_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(body_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, body_); + } + if (patternCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.api.CustomHttpPattern) pattern_); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, additionalBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseBody_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, responseBody_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.HttpRule)) { + return super.equals(obj); + } + com.google.api.HttpRule other = (com.google.api.HttpRule) obj; + + if (!getSelector() + .equals(other.getSelector())) return false; + if (!getBody() + .equals(other.getBody())) return false; + if (!getResponseBody() + .equals(other.getResponseBody())) return false; + if (!getAdditionalBindingsList() + .equals(other.getAdditionalBindingsList())) return false; + if (!getPatternCase().equals(other.getPatternCase())) return false; + switch (patternCase_) { + case 2: + if (!getGet() + .equals(other.getGet())) return false; + break; + case 3: + if (!getPut() + .equals(other.getPut())) return false; + break; + case 4: + if (!getPost() + .equals(other.getPost())) return false; + break; + case 5: + if (!getDelete() + .equals(other.getDelete())) return false; + break; + case 6: + if (!getPatch() + .equals(other.getPatch())) return false; + break; + case 8: + if (!getCustom() + .equals(other.getCustom())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + hash = (37 * hash) + RESPONSE_BODY_FIELD_NUMBER; + hash = (53 * hash) + getResponseBody().hashCode(); + if (getAdditionalBindingsCount() > 0) { + hash = (37 * hash) + ADDITIONAL_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalBindingsList().hashCode(); + } + switch (patternCase_) { + case 2: + hash = (37 * hash) + GET_FIELD_NUMBER; + hash = (53 * hash) + getGet().hashCode(); + break; + case 3: + hash = (37 * hash) + PUT_FIELD_NUMBER; + hash = (53 * hash) + getPut().hashCode(); + break; + case 4: + hash = (37 * hash) + POST_FIELD_NUMBER; + hash = (53 * hash) + getPost().hashCode(); + break; + case 5: + hash = (37 * hash) + DELETE_FIELD_NUMBER; + hash = (53 * hash) + getDelete().hashCode(); + break; + case 6: + hash = (37 * hash) + PATCH_FIELD_NUMBER; + hash = (53 * hash) + getPatch().hashCode(); + break; + case 8: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.HttpRule parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.HttpRule parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.api.HttpRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.google.api.HttpRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.google.api.HttpRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.HttpRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.google.api.HttpRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.api.HttpRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * gRPC Transcoding
+   *
+   * gRPC Transcoding is a feature for mapping between a gRPC method and one or
+   * more HTTP REST endpoints. It allows developers to build a single API service
+   * that supports both gRPC APIs and REST APIs. Many systems, including [Google
+   * APIs](https://github.com/googleapis/googleapis),
+   * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
+   * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
+   * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
+   * and use it for large scale production services.
+   *
+   * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
+   * how different portions of the gRPC request message are mapped to the URL
+   * path, URL query parameters, and HTTP request body. It also controls how the
+   * gRPC response message is mapped to the HTTP response body. `HttpRule` is
+   * typically specified as an `google.api.http` annotation on the gRPC method.
+   *
+   * Each mapping specifies a URL path template and an HTTP method. The path
+   * template may refer to one or more fields in the gRPC request message, as long
+   * as each field is a non-repeated field with a primitive (non-message) type.
+   * The path template controls how fields of the request message are mapped to
+   * the URL path.
+   *
+   * Example:
+   *
+   * service Messaging {
+   * rpc GetMessage(GetMessageRequest) returns (Message) {
+   * option (google.api.http) = {
+   * get: "/v1/{name=messages/*}"
+   * };
+   * }
+   * }
+   * message GetMessageRequest {
+   * string name = 1; // Mapped to URL path.
+   * }
+   * message Message {
+   * string text = 1; // The resource content.
+   * }
+   *
+   * This enables an HTTP REST to gRPC mapping as below:
+   *
+   * - HTTP: `GET /v1/messages/123456`
+   * - gRPC: `GetMessage(name: "messages/123456")`
+   *
+   * Any fields in the request message which are not bound by the path template
+   * automatically become HTTP query parameters if there is no HTTP request body.
+   * For example:
+   *
+   * service Messaging {
+   * rpc GetMessage(GetMessageRequest) returns (Message) {
+   * option (google.api.http) = {
+   * get:"/v1/messages/{message_id}"
+   * };
+   * }
+   * }
+   * message GetMessageRequest {
+   * message SubMessage {
+   * string subfield = 1;
+   * }
+   * string message_id = 1; // Mapped to URL path.
+   * int64 revision = 2;    // Mapped to URL query parameter `revision`.
+   * SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
+   * }
+   *
+   * This enables a HTTP JSON to RPC mapping as below:
+   *
+   * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
+   * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
+   * SubMessage(subfield: "foo"))`
+   *
+   * Note that fields which are mapped to URL query parameters must have a
+   * primitive type or a repeated primitive type or a non-repeated message type.
+   * In the case of a repeated type, the parameter can be repeated in the URL
+   * as `...?param=A&param=B`. In the case of a message type, each field of the
+   * message is mapped to a separate parameter, such as
+   * `...?foo.a=A&foo.b=B&foo.c=C`.
+   *
+   * For HTTP methods that allow a request body, the `body` field
+   * specifies the mapping. Consider a REST update method on the
+   * message resource collection:
+   *
+   * service Messaging {
+   * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+   * option (google.api.http) = {
+   * patch: "/v1/messages/{message_id}"
+   * body: "message"
+   * };
+   * }
+   * }
+   * message UpdateMessageRequest {
+   * string message_id = 1; // mapped to the URL
+   * Message message = 2;   // mapped to the body
+   * }
+   *
+   * The following HTTP JSON to RPC mapping is enabled, where the
+   * representation of the JSON in the request body is determined by
+   * protos JSON encoding:
+   *
+   * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
+   * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+   *
+   * The special name `*` can be used in the body mapping to define that
+   * every field not bound by the path template should be mapped to the
+   * request body.  This enables the following alternative definition of
+   * the update method:
+   *
+   * service Messaging {
+   * rpc UpdateMessage(Message) returns (Message) {
+   * option (google.api.http) = {
+   * patch: "/v1/messages/{message_id}"
+   * body: "*"
+   * };
+   * }
+   * }
+   * message Message {
+   * string message_id = 1;
+   * string text = 2;
+   * }
+   *
+   *
+   * The following HTTP JSON to RPC mapping is enabled:
+   *
+   * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
+   * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
+   *
+   * Note that when using `*` in the body mapping, it is not possible to
+   * have HTTP parameters, as all fields not bound by the path end in
+   * the body. This makes this option more rarely used in practice when
+   * defining REST APIs. The common usage of `*` is in custom methods
+   * which don't use the URL at all for transferring data.
+   *
+   * It is possible to define multiple HTTP methods for one RPC by using
+   * the `additional_bindings` option. Example:
+   *
+   * service Messaging {
+   * rpc GetMessage(GetMessageRequest) returns (Message) {
+   * option (google.api.http) = {
+   * get: "/v1/messages/{message_id}"
+   * additional_bindings {
+   * get: "/v1/users/{user_id}/messages/{message_id}"
+   * }
+   * };
+   * }
+   * }
+   * message GetMessageRequest {
+   * string message_id = 1;
+   * string user_id = 2;
+   * }
+   *
+   * This enables the following two alternative HTTP JSON to RPC mappings:
+   *
+   * - HTTP: `GET /v1/messages/123456`
+   * - gRPC: `GetMessage(message_id: "123456")`
+   *
+   * - HTTP: `GET /v1/users/me/messages/123456`
+   * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
+   *
+   * Rules for HTTP mapping
+   *
+   * 1. Leaf request fields (recursive expansion nested messages in the request
+   * message) are classified into three categories:
+   * - Fields referred by the path template. They are passed via the URL path.
+   * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
+   * are passed via the HTTP
+   * request body.
+   * - All other fields are passed via the URL query parameters, and the
+   * parameter name is the field path in the request message. A repeated
+   * field can be represented as multiple query parameters under the same
+   * name.
+   * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
+   * query parameter, all fields
+   * are passed via URL path and HTTP request body.
+   * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
+   * request body, all
+   * fields are passed via URL path and URL query parameters.
+   *
+   * Path template syntax
+   *
+   * Template = "/" Segments [ Verb ] ;
+   * Segments = Segment { "/" Segment } ;
+   * Segment  = "*" | "**" | LITERAL | Variable ;
+   * Variable = "{" FieldPath [ "=" Segments ] "}" ;
+   * FieldPath = IDENT { "." IDENT } ;
+   * Verb     = ":" LITERAL ;
+   *
+   * The syntax `*` matches a single URL path segment. The syntax `**` matches
+   * zero or more URL path segments, which must be the last part of the URL path
+   * except the `Verb`.
+   *
+   * The syntax `Variable` matches part of the URL path as specified by its
+   * template. A variable template must not contain other variables. If a variable
+   * matches a single path segment, its template may be omitted, e.g. `{var}`
+   * is equivalent to `{var=*}`.
+   *
+   * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
+   * contains any reserved character, such characters should be percent-encoded
+   * before the matching.
+   *
+   * If a variable contains exactly one path segment, such as `"{var}"` or
+   * `"{var=*}"`, when such a variable is expanded into a URL path on the client
+   * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
+   * server side does the reverse decoding. Such variables show up in the
+   * [Discovery
+   * Document](https://developers.google.com/discovery/v1/reference/apis) as
+   * `{var}`.
+   *
+   * If a variable contains multiple path segments, such as `"{var=foo/*}"`
+   * or `"{var=**}"`, when such a variable is expanded into a URL path on the
+   * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
+   * The server side does the reverse decoding, except "%2F" and "%2f" are left
+   * unchanged. Such variables show up in the
+   * [Discovery
+   * Document](https://developers.google.com/discovery/v1/reference/apis) as
+   * `{+var}`.
+   *
+   * Using gRPC API Service Configuration
+   *
+   * gRPC API Service Configuration (service config) is a configuration language
+   * for configuring a gRPC service to become a user-facing product. The
+   * service config is simply the YAML representation of the `google.api.Service`
+   * proto message.
+   *
+   * As an alternative to annotating your proto file, you can configure gRPC
+   * transcoding in your service config YAML files. You do this by specifying a
+   * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
+   * effect as the proto annotation. This can be particularly useful if you
+   * have a proto that is reused in multiple services. Note that any transcoding
+   * specified in the service config will override any matching transcoding
+   * configuration in the proto.
+   *
+   * The following example selects a gRPC method and applies an `HttpRule` to it:
+   *
+   * http:
+   * rules:
+   * - selector: example.v1.Messaging.GetMessage
+   * get: /v1/messages/{message_id}/{sub.subfield}
+   *
+   * Special notes
+   *
+   * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
+   * proto to JSON conversion must follow the [proto3
+   * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   *
+   * While the single segment variable follows the semantics of
+   * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
+   * Expansion, the multi segment variable **does not** follow RFC 6570 Section
+   * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
+   * does not expand special characters like `?` and `#`, which would lead
+   * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
+   * for multi segment variables.
+   *
+   * The path variables **must not** refer to any repeated or mapped field,
+   * because client libraries are not capable of handling such variable expansion.
+   *
+   * The path variables **must not** capture the leading "/" character. The reason
+   * is that the most common use case "{var}" does not capture the leading "/"
+   * character. For consistency, all path variables must share the same behavior.
+   *
+   * Repeated message fields must not be mapped to URL query parameters, because
+   * no client library can support such complicated mapping.
+   *
+   * If an API needs to use a JSON array for request or response body, it can map
+   * the request or response body to a repeated field. However, some gRPC
+   * Transcoding implementations may not support this feature.
+   * 
+ * + * Protobuf type {@code google.api.HttpRule} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:google.api.HttpRule) + com.google.api.HttpRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + // Construct using com.google.api.HttpRule.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + if (customBuilder_ != null) { + customBuilder_.clear(); + } + body_ = ""; + responseBody_ = ""; + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + } else { + additionalBindings_ = null; + additionalBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + patternCase_ = 0; + pattern_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + @java.lang.Override + public com.google.api.HttpRule getDefaultInstanceForType() { + return com.google.api.HttpRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.HttpRule build() { + com.google.api.HttpRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.HttpRule buildPartial() { + com.google.api.HttpRule result = new com.google.api.HttpRule(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.HttpRule result) { + if (additionalBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.additionalBindings_ = additionalBindings_; + } else { + result.additionalBindings_ = additionalBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.HttpRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.body_ = body_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.responseBody_ = responseBody_; + } + } + + private void buildPartialOneofs(com.google.api.HttpRule result) { + result.patternCase_ = patternCase_; + result.pattern_ = this.pattern_; + if (patternCase_ == 8 && + customBuilder_ != null) { + result.pattern_ = customBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.HttpRule) { + return mergeFrom((com.google.api.HttpRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.HttpRule other) { + if (other == com.google.api.HttpRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBody().isEmpty()) { + body_ = other.body_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getResponseBody().isEmpty()) { + responseBody_ = other.responseBody_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (additionalBindingsBuilder_ == null) { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindings_.isEmpty()) { + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.addAll(other.additionalBindings_); + } + onChanged(); + } + } else { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindingsBuilder_.isEmpty()) { + additionalBindingsBuilder_.dispose(); + additionalBindingsBuilder_ = null; + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000200); + additionalBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAdditionalBindingsFieldBuilder() : null; + } else { + additionalBindingsBuilder_.addAllMessages(other.additionalBindings_); + } + } + } + switch (other.getPatternCase()) { + case GET: { + patternCase_ = 2; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PUT: { + patternCase_ = 3; + pattern_ = other.pattern_; + onChanged(); + break; + } + case POST: { + patternCase_ = 4; + pattern_ = other.pattern_; + onChanged(); + break; + } + case DELETE: { + patternCase_ = 5; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PATCH: { + patternCase_ = 6; + pattern_ = other.pattern_; + onChanged(); + break; + } + case CUSTOM: { + mergeCustom(other.getCustom()); + break; + } + case PATTERN_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 2; + pattern_ = s; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 3; + pattern_ = s; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 4; + pattern_ = s; + break; + } // case 34 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 5; + pattern_ = s; + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 6; + pattern_ = s; + break; + } // case 50 + case 58: { + body_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: { + input.readMessage( + getCustomFieldBuilder().getBuilder(), + extensionRegistry); + patternCase_ = 8; + break; + } // case 66 + case 90: { + com.google.api.HttpRule m = + input.readMessage( + com.google.api.HttpRule.parser(), + extensionRegistry); + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(m); + } else { + additionalBindingsBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: { + responseBody_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 98 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int patternCase_ = 0; + private java.lang.Object pattern_; + public PatternCase + getPatternCase() { + return PatternCase.forNumber( + patternCase_); + } + + public Builder clearPattern() { + patternCase_ = 0; + pattern_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1 [json_name = "selector"]; + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1 [json_name = "selector"]; + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString + getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1 [json_name = "selector"]; + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1 [json_name = "selector"]; + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1 [json_name = "selector"]; + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2 [json_name = "get"]; + * @return Whether the get field is set. + */ + @java.lang.Override + public boolean hasGet() { + return patternCase_ == 2; + } + /** + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2 [json_name = "get"]; + * @return The get. + */ + @java.lang.Override + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2 [json_name = "get"]; + * @return The bytes for get. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2 [json_name = "get"]; + * @param value The get to set. + * @return This builder for chaining. + */ + public Builder setGet( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + /** + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2 [json_name = "get"]; + * @return This builder for chaining. + */ + public Builder clearGet() { + if (patternCase_ == 2) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2 [json_name = "get"]; + * @param value The bytes for get to set. + * @return This builder for chaining. + */ + public Builder setGetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + + /** + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3 [json_name = "put"]; + * @return Whether the put field is set. + */ + @java.lang.Override + public boolean hasPut() { + return patternCase_ == 3; + } + /** + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3 [json_name = "put"]; + * @return The put. + */ + @java.lang.Override + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3 [json_name = "put"]; + * @return The bytes for put. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3 [json_name = "put"]; + * @param value The put to set. + * @return This builder for chaining. + */ + public Builder setPut( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + /** + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3 [json_name = "put"]; + * @return This builder for chaining. + */ + public Builder clearPut() { + if (patternCase_ == 3) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3 [json_name = "put"]; + * @param value The bytes for put to set. + * @return This builder for chaining. + */ + public Builder setPutBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + + /** + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4 [json_name = "post"]; + * @return Whether the post field is set. + */ + @java.lang.Override + public boolean hasPost() { + return patternCase_ == 4; + } + /** + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4 [json_name = "post"]; + * @return The post. + */ + @java.lang.Override + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4 [json_name = "post"]; + * @return The bytes for post. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4 [json_name = "post"]; + * @param value The post to set. + * @return This builder for chaining. + */ + public Builder setPost( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + /** + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4 [json_name = "post"]; + * @return This builder for chaining. + */ + public Builder clearPost() { + if (patternCase_ == 4) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4 [json_name = "post"]; + * @param value The bytes for post to set. + * @return This builder for chaining. + */ + public Builder setPostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + + /** + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return Whether the delete field is set. + */ + @java.lang.Override + public boolean hasDelete() { + return patternCase_ == 5; + } + /** + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return The delete. + */ + @java.lang.Override + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return The bytes for delete. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5 [json_name = "delete"]; + * @param value The delete to set. + * @return This builder for chaining. + */ + public Builder setDelete( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + /** + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return This builder for chaining. + */ + public Builder clearDelete() { + if (patternCase_ == 5) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5 [json_name = "delete"]; + * @param value The bytes for delete to set. + * @return This builder for chaining. + */ + public Builder setDeleteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + + /** + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return Whether the patch field is set. + */ + @java.lang.Override + public boolean hasPatch() { + return patternCase_ == 6; + } + /** + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return The patch. + */ + @java.lang.Override + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return The bytes for patch. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6 [json_name = "patch"]; + * @param value The patch to set. + * @return This builder for chaining. + */ + public Builder setPatch( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + /** + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return This builder for chaining. + */ + public Builder clearPatch() { + if (patternCase_ == 6) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6 [json_name = "patch"]; + * @param value The bytes for patch to set. + * @return This builder for chaining. + */ + public Builder setPatchBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> customBuilder_; + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return patternCase_ == 8; + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + * @return The custom. + */ + @java.lang.Override + public com.google.api.CustomHttpPattern getCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } else { + if (patternCase_ == 8) { + return customBuilder_.getMessage(); + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + public Builder setCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pattern_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + patternCase_ = 8; + return this; + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + public Builder setCustom( + com.google.api.CustomHttpPattern.Builder builderForValue) { + if (customBuilder_ == null) { + pattern_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + patternCase_ = 8; + return this; + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + public Builder mergeCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (patternCase_ == 8 && + pattern_ != com.google.api.CustomHttpPattern.getDefaultInstance()) { + pattern_ = com.google.api.CustomHttpPattern.newBuilder((com.google.api.CustomHttpPattern) pattern_) + .mergeFrom(value).buildPartial(); + } else { + pattern_ = value; + } + onChanged(); + } else { + if (patternCase_ == 8) { + customBuilder_.mergeFrom(value); + } else { + customBuilder_.setMessage(value); + } + } + patternCase_ = 8; + return this; + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + } else { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + } + customBuilder_.clear(); + } + return this; + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + public com.google.api.CustomHttpPattern.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + @java.lang.Override + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if ((patternCase_ == 8) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> + getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(patternCase_ == 8)) { + pattern_ = com.google.api.CustomHttpPattern.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder>( + (com.google.api.CustomHttpPattern) pattern_, + getParentForChildren(), + isClean()); + pattern_ = null; + } + patternCase_ = 8; + onChanged(); + return customBuilder_; + } + + private java.lang.Object body_ = ""; + /** + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7 [json_name = "body"]; + * @return The body. + */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + body_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7 [json_name = "body"]; + * @return The bytes for body. + */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7 [json_name = "body"]; + * @param value The body to set. + * @return This builder for chaining. + */ + public Builder setBody( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + body_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7 [json_name = "body"]; + * @return This builder for chaining. + */ + public Builder clearBody() { + body_ = getDefaultInstance().getBody(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7 [json_name = "body"]; + * @param value The bytes for body to set. + * @return This builder for chaining. + */ + public Builder setBodyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + body_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object responseBody_ = ""; + /** + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @return The responseBody. + */ + public java.lang.String getResponseBody() { + java.lang.Object ref = responseBody_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseBody_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @return The bytes for responseBody. + */ + public com.google.protobuf.ByteString + getResponseBodyBytes() { + java.lang.Object ref = responseBody_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + responseBody_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @param value The responseBody to set. + * @return This builder for chaining. + */ + public Builder setResponseBody( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + responseBody_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @return This builder for chaining. + */ + public Builder clearResponseBody() { + responseBody_ = getDefaultInstance().getResponseBody(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @param value The bytes for responseBody to set. + * @return This builder for chaining. + */ + public Builder setResponseBodyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + responseBody_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.util.List additionalBindings_ = + java.util.Collections.emptyList(); + private void ensureAdditionalBindingsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + additionalBindings_ = new java.util.ArrayList(additionalBindings_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> additionalBindingsBuilder_; + + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public java.util.List getAdditionalBindingsList() { + if (additionalBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(additionalBindings_); + } else { + return additionalBindingsBuilder_.getMessageList(); + } + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public int getAdditionalBindingsCount() { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.size(); + } else { + return additionalBindingsBuilder_.getCount(); + } + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public com.google.api.HttpRule getAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); + } else { + return additionalBindingsBuilder_.getMessage(index); + } + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder setAdditionalBindings( + int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder setAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder addAdditionalBindings(com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder addAdditionalBindings( + int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder addAdditionalBindings( + com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder addAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder addAllAdditionalBindings( + java.lang.Iterable values) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, additionalBindings_); + onChanged(); + } else { + additionalBindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder clearAdditionalBindings() { + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + additionalBindingsBuilder_.clear(); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public Builder removeAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.remove(index); + onChanged(); + } else { + additionalBindingsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public com.google.api.HttpRule.Builder getAdditionalBindingsBuilder( + int index) { + return getAdditionalBindingsFieldBuilder().getBuilder(index); + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); } else { + return additionalBindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public java.util.List + getAdditionalBindingsOrBuilderList() { + if (additionalBindingsBuilder_ != null) { + return additionalBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(additionalBindings_); + } + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder() { + return getAdditionalBindingsFieldBuilder().addBuilder( + com.google.api.HttpRule.getDefaultInstance()); + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder( + int index) { + return getAdditionalBindingsFieldBuilder().addBuilder( + index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + public java.util.List + getAdditionalBindingsBuilderList() { + return getAdditionalBindingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> + getAdditionalBindingsFieldBuilder() { + if (additionalBindingsBuilder_ == null) { + additionalBindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( + additionalBindings_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + additionalBindings_ = null; + } + return additionalBindingsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.api.HttpRule) + } + + // @@protoc_insertion_point(class_scope:google.api.HttpRule) + private static final com.google.api.HttpRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.api.HttpRule(); + } + + public static com.google.api.HttpRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.HttpRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/google/api/HttpRuleOrBuilder.java b/src/main/java/com/google/api/HttpRuleOrBuilder.java new file mode 100644 index 00000000..841c3879 --- /dev/null +++ b/src/main/java/com/google/api/HttpRuleOrBuilder.java @@ -0,0 +1,337 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/api/http.proto +// Protobuf Java Version: 4.28.2 + +package com.google.api; + +public interface HttpRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.api.HttpRule) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1 [json_name = "selector"]; + * @return The selector. + */ + java.lang.String getSelector(); + /** + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1 [json_name = "selector"]; + * @return The bytes for selector. + */ + com.google.protobuf.ByteString + getSelectorBytes(); + + /** + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2 [json_name = "get"]; + * @return Whether the get field is set. + */ + boolean hasGet(); + /** + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2 [json_name = "get"]; + * @return The get. + */ + java.lang.String getGet(); + /** + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2 [json_name = "get"]; + * @return The bytes for get. + */ + com.google.protobuf.ByteString + getGetBytes(); + + /** + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3 [json_name = "put"]; + * @return Whether the put field is set. + */ + boolean hasPut(); + /** + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3 [json_name = "put"]; + * @return The put. + */ + java.lang.String getPut(); + /** + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3 [json_name = "put"]; + * @return The bytes for put. + */ + com.google.protobuf.ByteString + getPutBytes(); + + /** + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4 [json_name = "post"]; + * @return Whether the post field is set. + */ + boolean hasPost(); + /** + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4 [json_name = "post"]; + * @return The post. + */ + java.lang.String getPost(); + /** + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4 [json_name = "post"]; + * @return The bytes for post. + */ + com.google.protobuf.ByteString + getPostBytes(); + + /** + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return Whether the delete field is set. + */ + boolean hasDelete(); + /** + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return The delete. + */ + java.lang.String getDelete(); + /** + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5 [json_name = "delete"]; + * @return The bytes for delete. + */ + com.google.protobuf.ByteString + getDeleteBytes(); + + /** + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return Whether the patch field is set. + */ + boolean hasPatch(); + /** + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return The patch. + */ + java.lang.String getPatch(); + /** + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6 [json_name = "patch"]; + * @return The bytes for patch. + */ + com.google.protobuf.ByteString + getPatchBytes(); + + /** + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + /** + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + * @return The custom. + */ + com.google.api.CustomHttpPattern getCustom(); + /** + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8 [json_name = "custom"]; + */ + com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder(); + + /** + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7 [json_name = "body"]; + * @return The body. + */ + java.lang.String getBody(); + /** + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7 [json_name = "body"]; + * @return The bytes for body. + */ + com.google.protobuf.ByteString + getBodyBytes(); + + /** + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @return The responseBody. + */ + java.lang.String getResponseBody(); + /** + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12 [json_name = "responseBody"]; + * @return The bytes for responseBody. + */ + com.google.protobuf.ByteString + getResponseBodyBytes(); + + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + java.util.List + getAdditionalBindingsList(); + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + com.google.api.HttpRule getAdditionalBindings(int index); + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + int getAdditionalBindingsCount(); + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + java.util.List + getAdditionalBindingsOrBuilderList(); + /** + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11 [json_name = "additionalBindings"]; + */ + com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( + int index); + + com.google.api.HttpRule.PatternCase getPatternCase(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java new file mode 100644 index 00000000..3cf3c163 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/AnnotationsProto.java @@ -0,0 +1,179 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/annotations.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public final class AnnotationsProto { + private AnnotationsProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AnnotationsProto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Schema); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Tag); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Field); + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public static final int OPENAPIV2_SWAGGER_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger> openapiv2Swagger = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance()); + public static final int OPENAPIV2_OPERATION_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, + com.grpc.gateway.protoc_gen_openapiv2.options.Operation> openapiv2Operation = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.grpc.gateway.protoc_gen_openapiv2.options.Operation.class, + com.grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance()); + public static final int OPENAPIV2_SCHEMA_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + com.grpc.gateway.protoc_gen_openapiv2.options.Schema> openapiv2Schema = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.grpc.gateway.protoc_gen_openapiv2.options.Schema.class, + com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()); + public static final int OPENAPIV2_TAG_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.ServiceOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.ServiceOptions, + com.grpc.gateway.protoc_gen_openapiv2.options.Tag> openapiv2Tag = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.grpc.gateway.protoc_gen_openapiv2.options.Tag.class, + com.grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); + public static final int OPENAPIV2_FIELD_FIELD_NUMBER = 1042; + /** + *
+   * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
+   *
+   * All IDs are the same, as assigned. It is okay that they are the same, as they extend
+   * different descriptor messages.
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema> openapiv2Field = com.google.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()); + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.protoc-gen-openapiv2/options/annotatio" + + "ns.proto\022)grpc.gateway.protoc_gen_openap" + + "iv2.options\032 google/protobuf/descriptor." + + "proto\032,protoc-gen-openapiv2/options/open" + + "apiv2.proto:~\n\021openapiv2_swagger\022\034.googl" + + "e.protobuf.FileOptions\030\222\010 \001(\01322.grpc.gat" + + "eway.protoc_gen_openapiv2.options.Swagge" + + "rR\020openapiv2Swagger:\206\001\n\023openapiv2_operat" + + "ion\022\036.google.protobuf.MethodOptions\030\222\010 \001" + + "(\01324.grpc.gateway.protoc_gen_openapiv2.o" + + "ptions.OperationR\022openapiv2Operation:~\n\020" + + "openapiv2_schema\022\037.google.protobuf.Messa" + + "geOptions\030\222\010 \001(\01321.grpc.gateway.protoc_g" + + "en_openapiv2.options.SchemaR\017openapiv2Sc" + + "hema:u\n\ropenapiv2_tag\022\037.google.protobuf." + + "ServiceOptions\030\222\010 \001(\0132..grpc.gateway.pro" + + "toc_gen_openapiv2.options.TagR\014openapiv2" + + "Tag:~\n\017openapiv2_field\022\035.google.protobuf" + + ".FieldOptions\030\222\010 \001(\01325.grpc.gateway.prot" + + "oc_gen_openapiv2.options.JSONSchemaR\016ope" + + "napiv2FieldB\311\002\n-com.grpc.gateway.protoc_" + + "gen_openapiv2.optionsB\020AnnotationsProtoP" + + "\001ZFgithub.com/grpc-ecosystem/grpc-gatewa" + + "y/v2/protoc-gen-openapiv2/options\242\002\004GGPO" + + "\252\002\'Grpc.Gateway.ProtocGenOpenapiv2.Optio" + + "ns\312\002\'Grpc\\Gateway\\ProtocGenOpenapiv2\\Opt" + + "ions\342\0023Grpc\\Gateway\\ProtocGenOpenapiv2\\O" + + "ptions\\GPBMetadata\352\002*Grpc::Gateway::Prot" + + "ocGenOpenapiv2::Optionsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DescriptorProtos.getDescriptor(), + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor(), + }); + openapiv2Swagger.internalInit(descriptor.getExtensions().get(0)); + openapiv2Operation.internalInit(descriptor.getExtensions().get(1)); + openapiv2Schema.internalInit(descriptor.getExtensions().get(2)); + openapiv2Tag.internalInit(descriptor.getExtensions().get(3)); + openapiv2Field.internalInit(descriptor.getExtensions().get(4)); + descriptor.resolveAllFeaturesImmutable(); + com.google.protobuf.DescriptorProtos.getDescriptor(); + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Contact.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Contact.java new file mode 100644 index 00000000..9babf0a1 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Contact.java @@ -0,0 +1,913 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Contact` is a representation of OpenAPI v2 specification's Contact object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
+ *
+ * Example:
+ *
+ * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ * info: {
+ * ...
+ * contact: {
+ * name: "gRPC-Gateway project";
+ * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ * email: "none@example.com";
+ * };
+ * ...
+ * };
+ * ...
+ * };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +public final class Contact extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact) + ContactOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Contact.class.getName()); + } + // Use Contact.newBuilder() to construct. + private Contact(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Contact() { + name_ = ""; + url_ = ""; + email_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Contact.class, com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, url_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, email_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, email_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Contact)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Contact other = (com.grpc.gateway.protoc_gen_openapiv2.options.Contact) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Contact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Contact` is a representation of OpenAPI v2 specification's Contact object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
+   *
+   * Example:
+   *
+   * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   * info: {
+   * ...
+   * contact: {
+   * name: "gRPC-Gateway project";
+   * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   * email: "none@example.com";
+   * };
+   * ...
+   * };
+   * ...
+   * };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact) + com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Contact.class, com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Contact.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + url_ = ""; + email_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Contact build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Contact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Contact buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Contact result = new com.grpc.gateway.protoc_gen_openapiv2.options.Contact(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Contact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.email_ = email_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Contact) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Contact)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Contact other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The identifying name of the contact person/organization.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The URL pointing to the contact information. MUST be in the format of a
+     * URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object email_ = ""; + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The email address of the contact person/organization. MUST be in the format
+     * of an email address.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Contact DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Contact(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Contact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Contact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java new file mode 100644 index 00000000..a9dbbdb2 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ContactOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface ContactOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Contact) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The identifying name of the contact person/organization.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The URL pointing to the contact information. MUST be in the format of a
+   * URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+   * The email address of the contact person/organization. MUST be in the format
+   * of an email address.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java new file mode 100644 index 00000000..bd1124b5 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.java @@ -0,0 +1,743 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `ExternalDocumentation` is a representation of OpenAPI v2 specification's
+ * ExternalDocumentation object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
+ *
+ * Example:
+ *
+ * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ * ...
+ * external_docs: {
+ * description: "More about gRPC-Gateway";
+ * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ * }
+ * ...
+ * };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +public final class ExternalDocumentation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + ExternalDocumentationOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ExternalDocumentation.class.getName()); + } + // Use ExternalDocumentation.newBuilder() to construct. + private ExternalDocumentation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ExternalDocumentation() { + description_ = ""; + url_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, url_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other = (com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) obj; + + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `ExternalDocumentation` is a representation of OpenAPI v2 specification's
+   * ExternalDocumentation object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
+   *
+   * Example:
+   *
+   * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   * ...
+   * external_docs: {
+   * description: "More about gRPC-Gateway";
+   * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   * }
+   * ...
+   * };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.class, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + url_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation build() { + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result = new com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A short description of the target documentation. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The URL for the target documentation. Value MUST be in the format
+     * of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExternalDocumentation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java new file mode 100644 index 00000000..81831a9c --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentationOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface ExternalDocumentationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description of the target documentation. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The URL for the target documentation. Value MUST be in the format
+   * of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Header.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Header.java new file mode 100644 index 00000000..9cbdb21d --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Header.java @@ -0,0 +1,1211 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Header` is a representation of OpenAPI v2 specification's Header object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header} + */ +public final class Header extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Header) + HeaderOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Header.class.getName()); + } + // Use Header.newBuilder() to construct. + private Header(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Header() { + description_ = ""; + type_ = ""; + format_ = ""; + default_ = ""; + pattern_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Header.class, com.grpc.gateway.protoc_gen_openapiv2.options.Header.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORMAT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } + } + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object default_ = ""; + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The default. + */ + @java.lang.Override + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } + } + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The bytes for default. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATTERN_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object pattern_ = ""; + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The pattern. + */ + @java.lang.Override + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } + } + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, format_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(default_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, default_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pattern_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, pattern_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, format_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(default_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, default_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pattern_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, pattern_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Header)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Header other = (com.grpc.gateway.protoc_gen_openapiv2.options.Header) obj; + + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getType() + .equals(other.getType())) return false; + if (!getFormat() + .equals(other.getFormat())) return false; + if (!getDefault() + .equals(other.getDefault())) return false; + if (!getPattern() + .equals(other.getPattern())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + getDefault().hashCode(); + hash = (37 * hash) + PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getPattern().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Header prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Header` is a representation of OpenAPI v2 specification's Header object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Header) + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Header.class, com.grpc.gateway.protoc_gen_openapiv2.options.Header.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Header.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + type_ = ""; + format_ = ""; + default_ = ""; + pattern_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Header build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Header result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Header buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Header result = new com.grpc.gateway.protoc_gen_openapiv2.options.Header(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Header result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.default_ = default_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pattern_ = pattern_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Header) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Header)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Header other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDefault().isEmpty()) { + default_ = other.default_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getPattern().isEmpty()) { + pattern_ = other.pattern_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 50: { + default_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 106: { + pattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * 
+ * + * string type = 2 [json_name = "type"]; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object format_ = ""; + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @return The bytes for format. + */ + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + format_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 3 [json_name = "format"]; + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object default_ = ""; + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @return The default. + */ + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @return The bytes for default. + */ + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @param value The default to set. + * @return This builder for chaining. + */ + public Builder setDefault( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @return This builder for chaining. + */ + public Builder clearDefault() { + default_ = getDefaultInstance().getDefault(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * `Default` Declares the value of the header that the server will use if none is provided.
+     * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+     * Unlike JSON Schema this value MUST conform to the defined type for the header.
+     * 
+ * + * string default = 6 [json_name = "default"]; + * @param value The bytes for default to set. + * @return This builder for chaining. + */ + public Builder setDefaultBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object pattern_ = ""; + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The pattern. + */ + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @param value The pattern to set. + * @return This builder for chaining. + */ + public Builder setPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pattern_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return This builder for chaining. + */ + public Builder clearPattern() { + pattern_ = getDefaultInstance().getPattern(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+     * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @param value The bytes for pattern to set. + * @return This builder for chaining. + */ + public Builder setPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pattern_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Header) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Header) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Header DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Header(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Header parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Header getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java new file mode 100644 index 00000000..394cd10f --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderOrBuilder.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface HeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Header) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * 
+ * + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The format. + */ + java.lang.String getFormat(); + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 3 [json_name = "format"]; + * @return The bytes for format. + */ + com.google.protobuf.ByteString + getFormatBytes(); + + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The default. + */ + java.lang.String getDefault(); + /** + *
+   * `Default` Declares the value of the header that the server will use if none is provided.
+   * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
+   * Unlike JSON Schema this value MUST conform to the defined type for the header.
+   * 
+ * + * string default = 6 [json_name = "default"]; + * @return The bytes for default. + */ + com.google.protobuf.ByteString + getDefaultBytes(); + + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The pattern. + */ + java.lang.String getPattern(); + /** + *
+   * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+   * 
+ * + * string pattern = 13 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + com.google.protobuf.ByteString + getPatternBytes(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java new file mode 100644 index 00000000..9d908980 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.java @@ -0,0 +1,1228 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `HeaderParameter` a HTTP header parameter.
+ * See: https://swagger.io/specification/v2/#parameter-object
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +public final class HeaderParameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + HeaderParameterOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + HeaderParameter.class.getName()); + } + // Use HeaderParameter.newBuilder() to construct. + private HeaderParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HeaderParameter() { + name_ = ""; + description_ = ""; + type_ = 0; + format_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.class, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder.class); + } + + /** + *
+   * `Type` is a supported HTTP header type.
+   * See https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * STRING = 1; + */ + STRING(1), + /** + * NUMBER = 2; + */ + NUMBER(2), + /** + * INTEGER = 3; + */ + INTEGER(3), + /** + * BOOLEAN = 4; + */ + BOOLEAN(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Type.class.getName()); + } + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + /** + * NUMBER = 2; + */ + public static final int NUMBER_VALUE = 2; + /** + * INTEGER = 3; + */ + public static final int INTEGER_VALUE = 3; + /** + * BOOLEAN = 4; + */ + public static final int BOOLEAN_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return STRING; + case 2: return NUMBER; + case 3: return INTEGER; + case 4: return BOOLEAN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type) + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_ = 0; + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType() { + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type result = com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.forNumber(type_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNRECOGNIZED : result; + } + + public static final int FORMAT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } + } + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUIRED_FIELD_NUMBER = 5; + private boolean required_ = false; + /** + *
+   * `Required` indicates if the header is optional
+   * 
+ * + * bool required = 5 [json_name = "required"]; + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (type_ != com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNKNOWN.getNumber()) { + output.writeEnum(3, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, format_); + } + if (required_ != false) { + output.writeBool(5, required_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (type_ != com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, format_); + } + if (required_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, required_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter other = (com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (type_ != other.type_) return false; + if (!getFormat() + .equals(other.getFormat())) return false; + if (getRequired() + != other.getRequired()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRequired()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `HeaderParameter` a HTTP header parameter.
+   * See: https://swagger.io/specification/v2/#parameter-object
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.class, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + type_ = 0; + format_ = ""; + required_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter build() { + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result = new com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.required_ = required_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getRequired() != false) { + setRequired(other.getRequired()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + required_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `Name` is the header name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the header.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType() { + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type result = com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.forNumber(type_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type.UNRECOGNIZED : result; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+     * See: https://swagger.io/specification/v2/#parameterType.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object format_ = ""; + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @return The bytes for format. + */ + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + format_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * `Format` The extending format for the previously mentioned type.
+     * 
+ * + * string format = 4 [json_name = "format"]; + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean required_ ; + /** + *
+     * `Required` indicates if the header is optional
+     * 
+ * + * bool required = 5 [json_name = "required"]; + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + /** + *
+     * `Required` indicates if the header is optional
+     * 
+ * + * bool required = 5 [json_name = "required"]; + * @param value The required to set. + * @return This builder for chaining. + */ + public Builder setRequired(boolean value) { + + required_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * `Required` indicates if the header is optional
+     * 
+ * + * bool required = 5 [json_name = "required"]; + * @return This builder for chaining. + */ + public Builder clearRequired() { + bitField0_ = (bitField0_ & ~0x00000010); + required_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeaderParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java new file mode 100644 index 00000000..59947619 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameterOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface HeaderParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * `Name` is the header name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * `Description` is a short description of the header.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+   * See: https://swagger.io/specification/v2/#parameterType.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3 [json_name = "type"]; + * @return The type. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type getType(); + + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The format. + */ + java.lang.String getFormat(); + /** + *
+   * `Format` The extending format for the previously mentioned type.
+   * 
+ * + * string format = 4 [json_name = "format"]; + * @return The bytes for format. + */ + com.google.protobuf.ByteString + getFormatBytes(); + + /** + *
+   * `Required` indicates if the header is optional
+   * 
+ * + * bool required = 5 [json_name = "required"]; + * @return The required. + */ + boolean getRequired(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Info.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Info.java new file mode 100644 index 00000000..3212f276 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Info.java @@ -0,0 +1,1939 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Info` is a representation of OpenAPI v2 specification's Info object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
+ *
+ * Example:
+ *
+ * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ * info: {
+ * title: "Echo API";
+ * version: "1.0";
+ * description: "";
+ * contact: {
+ * name: "gRPC-Gateway project";
+ * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ * email: "none@example.com";
+ * };
+ * license: {
+ * name: "BSD 3-Clause License";
+ * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+ * };
+ * };
+ * ...
+ * };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +public final class Info extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Info) + InfoOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Info.class.getName()); + } + // Use Info.newBuilder() to construct. + private Info(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Info() { + title_ = ""; + description_ = ""; + termsOfService_ = ""; + version_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Info.class, com.grpc.gateway.protoc_gen_openapiv2.options.Info.Builder.class); + } + + private int bitField0_; + public static final int TITLE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERMS_OF_SERVICE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object termsOfService_ = ""; + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The termsOfService. + */ + @java.lang.Override + public java.lang.String getTermsOfService() { + java.lang.Object ref = termsOfService_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + termsOfService_ = s; + return s; + } + } + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The bytes for termsOfService. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTermsOfServiceBytes() { + java.lang.Object ref = termsOfService_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + termsOfService_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTACT_FIELD_NUMBER = 4; + private com.grpc.gateway.protoc_gen_openapiv2.options.Contact contact_; + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return Whether the contact field is set. + */ + @java.lang.Override + public boolean hasContact() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return The contact. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Contact getContact() { + return contact_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder() { + return contact_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } + + public static final int LICENSE_FIELD_NUMBER = 5; + private com.grpc.gateway.protoc_gen_openapiv2.options.License license_; + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return Whether the license field is set. + */ + @java.lang.Override + public boolean hasLicense() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return The license. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.License getLicense() { + return license_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder() { + return license_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } + + public static final int VERSION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTENSIONS_FIELD_NUMBER = 7; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(termsOfService_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, termsOfService_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getContact()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getLicense()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, version_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 7); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(termsOfService_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, termsOfService_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getContact()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLicense()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, version_); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Info)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Info other = (com.grpc.gateway.protoc_gen_openapiv2.options.Info) obj; + + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getTermsOfService() + .equals(other.getTermsOfService())) return false; + if (hasContact() != other.hasContact()) return false; + if (hasContact()) { + if (!getContact() + .equals(other.getContact())) return false; + } + if (hasLicense() != other.hasLicense()) return false; + if (hasLicense()) { + if (!getLicense() + .equals(other.getLicense())) return false; + } + if (!getVersion() + .equals(other.getVersion())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TERMS_OF_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getTermsOfService().hashCode(); + if (hasContact()) { + hash = (37 * hash) + CONTACT_FIELD_NUMBER; + hash = (53 * hash) + getContact().hashCode(); + } + if (hasLicense()) { + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Info prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Info` is a representation of OpenAPI v2 specification's Info object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
+   *
+   * Example:
+   *
+   * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   * info: {
+   * title: "Echo API";
+   * version: "1.0";
+   * description: "";
+   * contact: {
+   * name: "gRPC-Gateway project";
+   * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   * email: "none@example.com";
+   * };
+   * license: {
+   * name: "BSD 3-Clause License";
+   * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+   * };
+   * };
+   * ...
+   * };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Info} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Info) + com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Info.class, com.grpc.gateway.protoc_gen_openapiv2.options.Info.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Info.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getContactFieldBuilder(); + getLicenseFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + description_ = ""; + termsOfService_ = ""; + contact_ = null; + if (contactBuilder_ != null) { + contactBuilder_.dispose(); + contactBuilder_ = null; + } + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + version_ = ""; + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Info build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Info result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Info buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Info result = new com.grpc.gateway.protoc_gen_openapiv2.options.Info(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Info result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.termsOfService_ = termsOfService_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.contact_ = contactBuilder_ == null + ? contact_ + : contactBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.license_ = licenseBuilder_ == null + ? license_ + : licenseBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Info) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Info)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Info other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTermsOfService().isEmpty()) { + termsOfService_ = other.termsOfService_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasContact()) { + mergeContact(other.getContact()); + } + if (other.hasLicense()) { + mergeLicense(other.getLicense()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000040; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + termsOfService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getContactFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getLicenseFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The title of the application.
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short description of the application. GFM syntax can be used for rich
+     * text representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object termsOfService_ = ""; + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The termsOfService. + */ + public java.lang.String getTermsOfService() { + java.lang.Object ref = termsOfService_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + termsOfService_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The bytes for termsOfService. + */ + public com.google.protobuf.ByteString + getTermsOfServiceBytes() { + java.lang.Object ref = termsOfService_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + termsOfService_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @param value The termsOfService to set. + * @return This builder for chaining. + */ + public Builder setTermsOfService( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + termsOfService_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return This builder for chaining. + */ + public Builder clearTermsOfService() { + termsOfService_ = getDefaultInstance().getTermsOfService(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The Terms of Service for the API.
+     * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @param value The bytes for termsOfService to set. + * @return This builder for chaining. + */ + public Builder setTermsOfServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + termsOfService_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.Contact contact_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Contact, com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder> contactBuilder_; + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return Whether the contact field is set. + */ + public boolean hasContact() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return The contact. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Contact getContact() { + if (contactBuilder_ == null) { + return contact_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } else { + return contactBuilder_.getMessage(); + } + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder setContact(com.grpc.gateway.protoc_gen_openapiv2.options.Contact value) { + if (contactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contact_ = value; + } else { + contactBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder setContact( + com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder builderForValue) { + if (contactBuilder_ == null) { + contact_ = builderForValue.build(); + } else { + contactBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder mergeContact(com.grpc.gateway.protoc_gen_openapiv2.options.Contact value) { + if (contactBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + contact_ != null && + contact_ != com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance()) { + getContactBuilder().mergeFrom(value); + } else { + contact_ = value; + } + } else { + contactBuilder_.mergeFrom(value); + } + if (contact_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public Builder clearContact() { + bitField0_ = (bitField0_ & ~0x00000008); + contact_ = null; + if (contactBuilder_ != null) { + contactBuilder_.dispose(); + contactBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder getContactBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getContactFieldBuilder().getBuilder(); + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder() { + if (contactBuilder_ != null) { + return contactBuilder_.getMessageOrBuilder(); + } else { + return contact_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.Contact.getDefaultInstance() : contact_; + } + } + /** + *
+     * The contact information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Contact, com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder> + getContactFieldBuilder() { + if (contactBuilder_ == null) { + contactBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Contact, com.grpc.gateway.protoc_gen_openapiv2.options.Contact.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder>( + getContact(), + getParentForChildren(), + isClean()); + contact_ = null; + } + return contactBuilder_; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.License license_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.License, com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder> licenseBuilder_; + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return Whether the license field is set. + */ + public boolean hasLicense() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return The license. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.License getLicense() { + if (licenseBuilder_ == null) { + return license_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } else { + return licenseBuilder_.getMessage(); + } + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder setLicense(com.grpc.gateway.protoc_gen_openapiv2.options.License value) { + if (licenseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + license_ = value; + } else { + licenseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder setLicense( + com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder builderForValue) { + if (licenseBuilder_ == null) { + license_ = builderForValue.build(); + } else { + licenseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder mergeLicense(com.grpc.gateway.protoc_gen_openapiv2.options.License value) { + if (licenseBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + license_ != null && + license_ != com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance()) { + getLicenseBuilder().mergeFrom(value); + } else { + license_ = value; + } + } else { + licenseBuilder_.mergeFrom(value); + } + if (license_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public Builder clearLicense() { + bitField0_ = (bitField0_ & ~0x00000010); + license_ = null; + if (licenseBuilder_ != null) { + licenseBuilder_.dispose(); + licenseBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder getLicenseBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLicenseFieldBuilder().getBuilder(); + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder() { + if (licenseBuilder_ != null) { + return licenseBuilder_.getMessageOrBuilder(); + } else { + return license_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance() : license_; + } + } + /** + *
+     * The license information for the exposed API.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.License, com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder> + getLicenseFieldBuilder() { + if (licenseBuilder_ == null) { + licenseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.License, com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder>( + getLicense(), + getParentForChildren(), + isClean()); + license_ = null; + } + return licenseBuilder_; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Provides the version of the application API (not to be confused
+     * with the specification version).
+     * 
+ * + * string version = 6 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000040; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000040; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000040; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Info) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Info) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Info DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Info(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Info parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Info getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java new file mode 100644 index 00000000..a72bccec --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/InfoOrBuilder.java @@ -0,0 +1,213 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface InfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Info) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title of the application.
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description of the application. GFM syntax can be used for rich
+   * text representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The termsOfService. + */ + java.lang.String getTermsOfService(); + /** + *
+   * The Terms of Service for the API.
+   * 
+ * + * string terms_of_service = 3 [json_name = "termsOfService"]; + * @return The bytes for termsOfService. + */ + com.google.protobuf.ByteString + getTermsOfServiceBytes(); + + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return Whether the contact field is set. + */ + boolean hasContact(); + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + * @return The contact. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Contact getContact(); + /** + *
+   * The contact information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ContactOrBuilder getContactOrBuilder(); + + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return Whether the license field is set. + */ + boolean hasLicense(); + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + * @return The license. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.License getLicense(); + /** + *
+   * The license information for the exposed API.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder getLicenseOrBuilder(); + + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Provides the version of the application API (not to be confused
+   * with the specification version).
+   * 
+ * + * string version = 6 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java new file mode 100644 index 00000000..2374dfec --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.java @@ -0,0 +1,4786 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `JSONSchema` represents properties from JSON Schema taken, and as used, in
+ * the OpenAPI v2 spec.
+ *
+ * This includes changes made by OpenAPI v2.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+ *
+ * See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
+ * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
+ *
+ * Example:
+ *
+ * message SimpleMessage {
+ * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
+ * json_schema: {
+ * title: "SimpleMessage"
+ * description: "A simple message."
+ * required: ["id"]
+ * }
+ * };
+ *
+ * // Id represents the message identifier.
+ * string id = 1; [
+ * (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ * description: "The unique identifier of the simple message."
+ * }];
+ * }
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +public final class JSONSchema extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + JSONSchemaOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + JSONSchema.class.getName()); + } + // Use JSONSchema.newBuilder() to construct. + private JSONSchema(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private JSONSchema() { + ref_ = ""; + title_ = ""; + description_ = ""; + default_ = ""; + example_ = ""; + pattern_ = ""; + required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = emptyIntList(); + format_ = ""; + enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 48: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder.class); + } + + /** + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes} + */ + public enum JSONSchemaSimpleTypes + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * ARRAY = 1; + */ + ARRAY(1), + /** + * BOOLEAN = 2; + */ + BOOLEAN(2), + /** + * INTEGER = 3; + */ + INTEGER(3), + /** + * NULL = 4; + */ + NULL(4), + /** + * NUMBER = 5; + */ + NUMBER(5), + /** + * OBJECT = 6; + */ + OBJECT(6), + /** + * STRING = 7; + */ + STRING(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + JSONSchemaSimpleTypes.class.getName()); + } + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * ARRAY = 1; + */ + public static final int ARRAY_VALUE = 1; + /** + * BOOLEAN = 2; + */ + public static final int BOOLEAN_VALUE = 2; + /** + * INTEGER = 3; + */ + public static final int INTEGER_VALUE = 3; + /** + * NULL = 4; + */ + public static final int NULL_VALUE = 4; + /** + * NUMBER = 5; + */ + public static final int NUMBER_VALUE = 5; + /** + * OBJECT = 6; + */ + public static final int OBJECT_VALUE = 6; + /** + * STRING = 7; + */ + public static final int STRING_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JSONSchemaSimpleTypes valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JSONSchemaSimpleTypes forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return ARRAY; + case 2: return BOOLEAN; + case 3: return INTEGER; + case 4: return NULL; + case 5: return NUMBER; + case 6: return OBJECT; + case 7: return STRING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + JSONSchemaSimpleTypes> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JSONSchemaSimpleTypes findValueByNumber(int number) { + return JSONSchemaSimpleTypes.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDescriptor().getEnumTypes().get(0); + } + + private static final JSONSchemaSimpleTypes[] VALUES = values(); + + public static JSONSchemaSimpleTypes valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JSONSchemaSimpleTypes(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes) + } + + public interface FieldConfigurationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The pathParamName. + */ + java.lang.String getPathParamName(); + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The bytes for pathParamName. + */ + com.google.protobuf.ByteString + getPathParamNameBytes(); + } + /** + *
+   * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
+   * These properties are not defined by OpenAPIv2, but they are used to control the generation.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ + public static final class FieldConfiguration extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + FieldConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + FieldConfiguration.class.getName()); + } + // Use FieldConfiguration.newBuilder() to construct. + private FieldConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FieldConfiguration() { + pathParamName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.class, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder.class); + } + + public static final int PATH_PARAM_NAME_FIELD_NUMBER = 47; + @SuppressWarnings("serial") + private volatile java.lang.Object pathParamName_ = ""; + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The pathParamName. + */ + @java.lang.Override + public java.lang.String getPathParamName() { + java.lang.Object ref = pathParamName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pathParamName_ = s; + return s; + } + } + /** + *
+     * Alternative parameter name when used as path parameter. If set, this will
+     * be used as the complete parameter name when this field is used as a path
+     * parameter. Use this to avoid having auto generated path parameter names
+     * for overlapping paths.
+     * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The bytes for pathParamName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathParamNameBytes() { + java.lang.Object ref = pathParamName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pathParamName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pathParamName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 47, pathParamName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pathParamName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(47, pathParamName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration other = (com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) obj; + + if (!getPathParamName() + .equals(other.getPathParamName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_PARAM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPathParamName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
+     * These properties are not defined by OpenAPIv2, but they are used to control the generation.
+     * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.class, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pathParamName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration build() { + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result = new com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pathParamName_ = pathParamName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance()) return this; + if (!other.getPathParamName().isEmpty()) { + pathParamName_ = other.pathParamName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 378: { + pathParamName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 378 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object pathParamName_ = ""; + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The pathParamName. + */ + public java.lang.String getPathParamName() { + java.lang.Object ref = pathParamName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pathParamName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return The bytes for pathParamName. + */ + public com.google.protobuf.ByteString + getPathParamNameBytes() { + java.lang.Object ref = pathParamName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pathParamName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @param value The pathParamName to set. + * @return This builder for chaining. + */ + public Builder setPathParamName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pathParamName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @return This builder for chaining. + */ + public Builder clearPathParamName() { + pathParamName_ = getDefaultInstance().getPathParamName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Alternative parameter name when used as path parameter. If set, this will
+       * be used as the complete parameter name when this field is used as a path
+       * parameter. Use this to avoid having auto generated path parameter names
+       * for overlapping paths.
+       * 
+ * + * string path_param_name = 47 [json_name = "pathParamName"]; + * @param value The bytes for pathParamName to set. + * @return This builder for chaining. + */ + public Builder setPathParamNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pathParamName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldConfiguration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int REF_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object ref_ = ""; + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   * `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The ref. + */ + @java.lang.Override + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } + } + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   * `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The bytes for ref. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object default_ = ""; + /** + * string default = 7 [json_name = "default"]; + * @return The default. + */ + @java.lang.Override + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } + } + /** + * string default = 7 [json_name = "default"]; + * @return The bytes for default. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_ONLY_FIELD_NUMBER = 8; + private boolean readOnly_ = false; + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + + public static final int EXAMPLE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object example_ = ""; + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The example. + */ + @java.lang.Override + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } + } + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The bytes for example. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MULTIPLE_OF_FIELD_NUMBER = 10; + private double multipleOf_ = 0D; + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return The multipleOf. + */ + @java.lang.Override + public double getMultipleOf() { + return multipleOf_; + } + + public static final int MAXIMUM_FIELD_NUMBER = 11; + private double maximum_ = 0D; + /** + *
+   * Maximum represents an inclusive upper limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return The maximum. + */ + @java.lang.Override + public double getMaximum() { + return maximum_; + } + + public static final int EXCLUSIVE_MAXIMUM_FIELD_NUMBER = 12; + private boolean exclusiveMaximum_ = false; + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return The exclusiveMaximum. + */ + @java.lang.Override + public boolean getExclusiveMaximum() { + return exclusiveMaximum_; + } + + public static final int MINIMUM_FIELD_NUMBER = 13; + private double minimum_ = 0D; + /** + *
+   * minimum represents an inclusive lower limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return The minimum. + */ + @java.lang.Override + public double getMinimum() { + return minimum_; + } + + public static final int EXCLUSIVE_MINIMUM_FIELD_NUMBER = 14; + private boolean exclusiveMinimum_ = false; + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return The exclusiveMinimum. + */ + @java.lang.Override + public boolean getExclusiveMinimum() { + return exclusiveMinimum_; + } + + public static final int MAX_LENGTH_FIELD_NUMBER = 15; + private long maxLength_ = 0L; + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return The maxLength. + */ + @java.lang.Override + public long getMaxLength() { + return maxLength_; + } + + public static final int MIN_LENGTH_FIELD_NUMBER = 16; + private long minLength_ = 0L; + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return The minLength. + */ + @java.lang.Override + public long getMinLength() { + return minLength_; + } + + public static final int PATTERN_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object pattern_ = ""; + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The pattern. + */ + @java.lang.Override + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MAX_ITEMS_FIELD_NUMBER = 20; + private long maxItems_ = 0L; + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + + public static final int MIN_ITEMS_FIELD_NUMBER = 21; + private long minItems_ = 0L; + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + + public static final int UNIQUE_ITEMS_FIELD_NUMBER = 22; + private boolean uniqueItems_ = false; + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return The uniqueItems. + */ + @java.lang.Override + public boolean getUniqueItems() { + return uniqueItems_; + } + + public static final int MAX_PROPERTIES_FIELD_NUMBER = 24; + private long maxProperties_ = 0L; + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; + } + + public static final int MIN_PROPERTIES_FIELD_NUMBER = 25; + private long minProperties_ = 0L; + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + + public static final int REQUIRED_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string required = 26 [json_name = "required"]; + * @return A list containing the required. + */ + public com.google.protobuf.ProtocolStringList + getRequiredList() { + return required_; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return The count of required. + */ + public int getRequiredCount() { + return required_.size(); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the element to return. + * @return The required at the given index. + */ + public java.lang.String getRequired(int index) { + return required_.get(index); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the value to return. + * @return The bytes of the required at the given index. + */ + public com.google.protobuf.ByteString + getRequiredBytes(int index) { + return required_.getByteString(index); + } + + public static final int ARRAY_FIELD_NUMBER = 34; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return A list containing the array. + */ + public com.google.protobuf.ProtocolStringList + getArrayList() { + return array_; + } + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return The count of array. + */ + public int getArrayCount() { + return array_.size(); + } + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the element to return. + * @return The array at the given index. + */ + public java.lang.String getArray(int index) { + return array_.get(index); + } + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the value to return. + * @return The bytes of the array at the given index. + */ + public com.google.protobuf.ByteString + getArrayBytes(int index) { + return array_.getByteString(index); + } + + public static final int TYPE_FIELD_NUMBER = 35; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList type_; + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes> type_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>() { + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes convert(int from) { + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes result = com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes.forNumber(from); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes.UNRECOGNIZED : result; + } + }; + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the type. + */ + @java.lang.Override + public java.util.List getTypeList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return The count of type. + */ + @java.lang.Override + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the element to return. + * @return The type at the given index. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index) { + return type_converter_.convert(type_.getInt(index)); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the enum numeric values on the wire for type. + */ + @java.lang.Override + public java.util.List + getTypeValueList() { + return type_; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of type at the given index. + */ + @java.lang.Override + public int getTypeValue(int index) { + return type_.getInt(index); + } + private int typeMemoizedSerializedSize; + + public static final int FORMAT_FIELD_NUMBER = 36; + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } + } + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENUM_FIELD_NUMBER = 46; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return A list containing the enum. + */ + public com.google.protobuf.ProtocolStringList + getEnumList() { + return enum_; + } + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return The count of enum. + */ + public int getEnumCount() { + return enum_.size(); + } + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the element to return. + * @return The enum at the given index. + */ + public java.lang.String getEnum(int index) { + return enum_.get(index); + } + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + public com.google.protobuf.ByteString + getEnumBytes(int index) { + return enum_.getByteString(index); + } + + public static final int FIELD_CONFIGURATION_FIELD_NUMBER = 1001; + private com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration fieldConfiguration_; + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return Whether the fieldConfiguration field is set. + */ + @java.lang.Override + public boolean hasFieldConfiguration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return The fieldConfiguration. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration() { + return fieldConfiguration_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder() { + return fieldConfiguration_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 48; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ref_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, ref_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(default_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, default_); + } + if (readOnly_ != false) { + output.writeBool(8, readOnly_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(example_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, example_); + } + if (java.lang.Double.doubleToRawLongBits(multipleOf_) != 0) { + output.writeDouble(10, multipleOf_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + output.writeDouble(11, maximum_); + } + if (exclusiveMaximum_ != false) { + output.writeBool(12, exclusiveMaximum_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + output.writeDouble(13, minimum_); + } + if (exclusiveMinimum_ != false) { + output.writeBool(14, exclusiveMinimum_); + } + if (maxLength_ != 0L) { + output.writeUInt64(15, maxLength_); + } + if (minLength_ != 0L) { + output.writeUInt64(16, minLength_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pattern_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 17, pattern_); + } + if (maxItems_ != 0L) { + output.writeUInt64(20, maxItems_); + } + if (minItems_ != 0L) { + output.writeUInt64(21, minItems_); + } + if (uniqueItems_ != false) { + output.writeBool(22, uniqueItems_); + } + if (maxProperties_ != 0L) { + output.writeUInt64(24, maxProperties_); + } + if (minProperties_ != 0L) { + output.writeUInt64(25, minProperties_); + } + for (int i = 0; i < required_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 26, required_.getRaw(i)); + } + for (int i = 0; i < array_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 34, array_.getRaw(i)); + } + if (getTypeList().size() > 0) { + output.writeUInt32NoTag(282); + output.writeUInt32NoTag(typeMemoizedSerializedSize); + } + for (int i = 0; i < type_.size(); i++) { + output.writeEnumNoTag(type_.getInt(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 36, format_); + } + for (int i = 0; i < enum_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 46, enum_.getRaw(i)); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 48); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1001, getFieldConfiguration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ref_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ref_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(default_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, default_); + } + if (readOnly_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, readOnly_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(example_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, example_); + } + if (java.lang.Double.doubleToRawLongBits(multipleOf_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(10, multipleOf_); + } + if (java.lang.Double.doubleToRawLongBits(maximum_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(11, maximum_); + } + if (exclusiveMaximum_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, exclusiveMaximum_); + } + if (java.lang.Double.doubleToRawLongBits(minimum_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(13, minimum_); + } + if (exclusiveMinimum_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(14, exclusiveMinimum_); + } + if (maxLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(15, maxLength_); + } + if (minLength_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(16, minLength_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pattern_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(17, pattern_); + } + if (maxItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(20, maxItems_); + } + if (minItems_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(21, minItems_); + } + if (uniqueItems_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(22, uniqueItems_); + } + if (maxProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(24, maxProperties_); + } + if (minProperties_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(25, minProperties_); + } + { + int dataSize = 0; + for (int i = 0; i < required_.size(); i++) { + dataSize += computeStringSizeNoTag(required_.getRaw(i)); + } + size += dataSize; + size += 2 * getRequiredList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < array_.size(); i++) { + dataSize += computeStringSizeNoTag(array_.getRaw(i)); + } + size += dataSize; + size += 2 * getArrayList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < type_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(type_.getInt(i)); + } + size += dataSize; + if (!getTypeList().isEmpty()) { size += 2; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }typeMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(36, format_); + } + { + int dataSize = 0; + for (int i = 0; i < enum_.size(); i++) { + dataSize += computeStringSizeNoTag(enum_.getRaw(i)); + } + size += dataSize; + size += 2 * getEnumList().size(); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(48, extensions__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1001, getFieldConfiguration()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema other = (com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) obj; + + if (!getRef() + .equals(other.getRef())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getDefault() + .equals(other.getDefault())) return false; + if (getReadOnly() + != other.getReadOnly()) return false; + if (!getExample() + .equals(other.getExample())) return false; + if (java.lang.Double.doubleToLongBits(getMultipleOf()) + != java.lang.Double.doubleToLongBits( + other.getMultipleOf())) return false; + if (java.lang.Double.doubleToLongBits(getMaximum()) + != java.lang.Double.doubleToLongBits( + other.getMaximum())) return false; + if (getExclusiveMaximum() + != other.getExclusiveMaximum()) return false; + if (java.lang.Double.doubleToLongBits(getMinimum()) + != java.lang.Double.doubleToLongBits( + other.getMinimum())) return false; + if (getExclusiveMinimum() + != other.getExclusiveMinimum()) return false; + if (getMaxLength() + != other.getMaxLength()) return false; + if (getMinLength() + != other.getMinLength()) return false; + if (!getPattern() + .equals(other.getPattern())) return false; + if (getMaxItems() + != other.getMaxItems()) return false; + if (getMinItems() + != other.getMinItems()) return false; + if (getUniqueItems() + != other.getUniqueItems()) return false; + if (getMaxProperties() + != other.getMaxProperties()) return false; + if (getMinProperties() + != other.getMinProperties()) return false; + if (!getRequiredList() + .equals(other.getRequiredList())) return false; + if (!getArrayList() + .equals(other.getArrayList())) return false; + if (!type_.equals(other.type_)) return false; + if (!getFormat() + .equals(other.getFormat())) return false; + if (!getEnumList() + .equals(other.getEnumList())) return false; + if (hasFieldConfiguration() != other.hasFieldConfiguration()) return false; + if (hasFieldConfiguration()) { + if (!getFieldConfiguration() + .equals(other.getFieldConfiguration())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REF_FIELD_NUMBER; + hash = (53 * hash) + getRef().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + getDefault().hashCode(); + hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReadOnly()); + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + hash = (37 * hash) + MULTIPLE_OF_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMultipleOf())); + hash = (37 * hash) + MAXIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaximum())); + hash = (37 * hash) + EXCLUSIVE_MAXIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExclusiveMaximum()); + hash = (37 * hash) + MINIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinimum())); + hash = (37 * hash) + EXCLUSIVE_MINIMUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExclusiveMinimum()); + hash = (37 * hash) + MAX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxLength()); + hash = (37 * hash) + MIN_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinLength()); + hash = (37 * hash) + PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getPattern().hashCode(); + hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxItems()); + hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinItems()); + hash = (37 * hash) + UNIQUE_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUniqueItems()); + hash = (37 * hash) + MAX_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxProperties()); + hash = (37 * hash) + MIN_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinProperties()); + if (getRequiredCount() > 0) { + hash = (37 * hash) + REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + getRequiredList().hashCode(); + } + if (getArrayCount() > 0) { + hash = (37 * hash) + ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getArrayList().hashCode(); + } + if (getTypeCount() > 0) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_.hashCode(); + } + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + if (getEnumCount() > 0) { + hash = (37 * hash) + ENUM_FIELD_NUMBER; + hash = (53 * hash) + getEnumList().hashCode(); + } + if (hasFieldConfiguration()) { + hash = (37 * hash) + FIELD_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getFieldConfiguration().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `JSONSchema` represents properties from JSON Schema taken, and as used, in
+   * the OpenAPI v2 spec.
+   *
+   * This includes changes made by OpenAPI v2.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   *
+   * See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
+   * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
+   *
+   * Example:
+   *
+   * message SimpleMessage {
+   * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
+   * json_schema: {
+   * title: "SimpleMessage"
+   * description: "A simple message."
+   * required: ["id"]
+   * }
+   * };
+   *
+   * // Id represents the message identifier.
+   * string id = 1; [
+   * (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+   * description: "The unique identifier of the simple message."
+   * }];
+   * }
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 48: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 48: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.class, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getFieldConfigurationFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ref_ = ""; + title_ = ""; + description_ = ""; + default_ = ""; + readOnly_ = false; + example_ = ""; + multipleOf_ = 0D; + maximum_ = 0D; + exclusiveMaximum_ = false; + minimum_ = 0D; + exclusiveMinimum_ = false; + maxLength_ = 0L; + minLength_ = 0L; + pattern_ = ""; + maxItems_ = 0L; + minItems_ = 0L; + uniqueItems_ = false; + maxProperties_ = 0L; + minProperties_ = 0L; + required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00200000); + format_ = ""; + enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + fieldConfiguration_ = null; + if (fieldConfigurationBuilder_ != null) { + fieldConfigurationBuilder_.dispose(); + fieldConfigurationBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema build() { + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result = new com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result) { + if (((bitField0_ & 0x00200000) != 0)) { + type_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00200000); + } + result.type_ = type_; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ref_ = ref_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.default_ = default_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readOnly_ = readOnly_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.example_ = example_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.multipleOf_ = multipleOf_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.maximum_ = maximum_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.exclusiveMaximum_ = exclusiveMaximum_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.minimum_ = minimum_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.exclusiveMinimum_ = exclusiveMinimum_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.maxLength_ = maxLength_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.minLength_ = minLength_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.pattern_ = pattern_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.maxItems_ = maxItems_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.minItems_ = minItems_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.uniqueItems_ = uniqueItems_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.maxProperties_ = maxProperties_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.minProperties_ = minProperties_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + required_.makeImmutable(); + result.required_ = required_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + array_.makeImmutable(); + result.array_ = array_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + enum_.makeImmutable(); + result.enum_ = enum_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x01000000) != 0)) { + result.fieldConfiguration_ = fieldConfigurationBuilder_ == null + ? fieldConfiguration_ + : fieldConfigurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()) return this; + if (!other.getRef().isEmpty()) { + ref_ = other.ref_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDefault().isEmpty()) { + default_ = other.default_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getReadOnly() != false) { + setReadOnly(other.getReadOnly()); + } + if (!other.getExample().isEmpty()) { + example_ = other.example_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getMultipleOf() != 0D) { + setMultipleOf(other.getMultipleOf()); + } + if (other.getMaximum() != 0D) { + setMaximum(other.getMaximum()); + } + if (other.getExclusiveMaximum() != false) { + setExclusiveMaximum(other.getExclusiveMaximum()); + } + if (other.getMinimum() != 0D) { + setMinimum(other.getMinimum()); + } + if (other.getExclusiveMinimum() != false) { + setExclusiveMinimum(other.getExclusiveMinimum()); + } + if (other.getMaxLength() != 0L) { + setMaxLength(other.getMaxLength()); + } + if (other.getMinLength() != 0L) { + setMinLength(other.getMinLength()); + } + if (!other.getPattern().isEmpty()) { + pattern_ = other.pattern_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getMaxItems() != 0L) { + setMaxItems(other.getMaxItems()); + } + if (other.getMinItems() != 0L) { + setMinItems(other.getMinItems()); + } + if (other.getUniqueItems() != false) { + setUniqueItems(other.getUniqueItems()); + } + if (other.getMaxProperties() != 0L) { + setMaxProperties(other.getMaxProperties()); + } + if (other.getMinProperties() != 0L) { + setMinProperties(other.getMinProperties()); + } + if (!other.required_.isEmpty()) { + if (required_.isEmpty()) { + required_ = other.required_; + bitField0_ |= 0x00080000; + } else { + ensureRequiredIsMutable(); + required_.addAll(other.required_); + } + onChanged(); + } + if (!other.array_.isEmpty()) { + if (array_.isEmpty()) { + array_ = other.array_; + bitField0_ |= 0x00100000; + } else { + ensureArrayIsMutable(); + array_.addAll(other.array_); + } + onChanged(); + } + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00200000); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + onChanged(); + } + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (!other.enum_.isEmpty()) { + if (enum_.isEmpty()) { + enum_ = other.enum_; + bitField0_ |= 0x00800000; + } else { + ensureEnumIsMutable(); + enum_.addAll(other.enum_); + } + onChanged(); + } + if (other.hasFieldConfiguration()) { + mergeFieldConfiguration(other.getFieldConfiguration()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x02000000; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + ref_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 42: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 42 + case 50: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + case 58: { + default_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 64: { + readOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 64 + case 74: { + example_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 81: { + multipleOf_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 81 + case 89: { + maximum_ = input.readDouble(); + bitField0_ |= 0x00000080; + break; + } // case 89 + case 96: { + exclusiveMaximum_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 96 + case 105: { + minimum_ = input.readDouble(); + bitField0_ |= 0x00000200; + break; + } // case 105 + case 112: { + exclusiveMinimum_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 112 + case 120: { + maxLength_ = input.readUInt64(); + bitField0_ |= 0x00000800; + break; + } // case 120 + case 128: { + minLength_ = input.readUInt64(); + bitField0_ |= 0x00001000; + break; + } // case 128 + case 138: { + pattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 138 + case 160: { + maxItems_ = input.readUInt64(); + bitField0_ |= 0x00004000; + break; + } // case 160 + case 168: { + minItems_ = input.readUInt64(); + bitField0_ |= 0x00008000; + break; + } // case 168 + case 176: { + uniqueItems_ = input.readBool(); + bitField0_ |= 0x00010000; + break; + } // case 176 + case 192: { + maxProperties_ = input.readUInt64(); + bitField0_ |= 0x00020000; + break; + } // case 192 + case 200: { + minProperties_ = input.readUInt64(); + bitField0_ |= 0x00040000; + break; + } // case 200 + case 210: { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequiredIsMutable(); + required_.add(s); + break; + } // case 210 + case 274: { + java.lang.String s = input.readStringRequireUtf8(); + ensureArrayIsMutable(); + array_.add(s); + break; + } // case 274 + case 280: { + int tmpRaw = input.readEnum(); + ensureTypeIsMutable(); + type_.addInt(tmpRaw); + break; + } // case 280 + case 282: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureTypeIsMutable(); + type_.addInt(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 282 + case 290: { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 290 + case 370: { + java.lang.String s = input.readStringRequireUtf8(); + ensureEnumIsMutable(); + enum_.add(s); + break; + } // case 370 + case 386: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x02000000; + break; + } // case 386 + case 8010: { + input.readMessage( + getFieldConfigurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 8010 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object ref_ = ""; + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     * `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The ref. + */ + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     * `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The bytes for ref. + */ + public com.google.protobuf.ByteString + getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     * `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @param value The ref to set. + * @return This builder for chaining. + */ + public Builder setRef( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ref_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     * `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return This builder for chaining. + */ + public Builder clearRef() { + ref_ = getDefaultInstance().getRef(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Ref is used to define an external reference to include in the message.
+     * This could be a fully qualified proto message reference, and that type must
+     * be imported into the protofile. If no message is identified, the Ref will
+     * be used verbatim in the output.
+     * For example:
+     * `ref: ".google.protobuf.Timestamp"`.
+     * 
+ * + * string ref = 3 [json_name = "ref"]; + * @param value The bytes for ref to set. + * @return This builder for chaining. + */ + public Builder setRefBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ref_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The title of the schema.
+     * 
+ * + * string title = 5 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A short description of the schema.
+     * 
+ * + * string description = 6 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object default_ = ""; + /** + * string default = 7 [json_name = "default"]; + * @return The default. + */ + public java.lang.String getDefault() { + java.lang.Object ref = default_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + default_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string default = 7 [json_name = "default"]; + * @return The bytes for default. + */ + public com.google.protobuf.ByteString + getDefaultBytes() { + java.lang.Object ref = default_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + default_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string default = 7 [json_name = "default"]; + * @param value The default to set. + * @return This builder for chaining. + */ + public Builder setDefault( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string default = 7 [json_name = "default"]; + * @return This builder for chaining. + */ + public Builder clearDefault() { + default_ = getDefaultInstance().getDefault(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string default = 7 [json_name = "default"]; + * @param value The bytes for default to set. + * @return This builder for chaining. + */ + public Builder setDefaultBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + default_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean readOnly_ ; + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @param value The readOnly to set. + * @return This builder for chaining. + */ + public Builder setReadOnly(boolean value) { + + readOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return This builder for chaining. + */ + public Builder clearReadOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + readOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object example_ = ""; + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @return The example. + */ + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @return The bytes for example. + */ + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @param value The example to set. + * @return This builder for chaining. + */ + public Builder setExample( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + example_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @return This builder for chaining. + */ + public Builder clearExample() { + example_ = getDefaultInstance().getExample(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * A free-form property to include a JSON example of this field. This is copied
+     * verbatim to the output swagger.json. Quotes must be escaped.
+     * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+     * 
+ * + * string example = 9 [json_name = "example"]; + * @param value The bytes for example to set. + * @return This builder for chaining. + */ + public Builder setExampleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + example_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private double multipleOf_ ; + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return The multipleOf. + */ + @java.lang.Override + public double getMultipleOf() { + return multipleOf_; + } + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @param value The multipleOf to set. + * @return This builder for chaining. + */ + public Builder setMultipleOf(double value) { + + multipleOf_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return This builder for chaining. + */ + public Builder clearMultipleOf() { + bitField0_ = (bitField0_ & ~0x00000040); + multipleOf_ = 0D; + onChanged(); + return this; + } + + private double maximum_ ; + /** + *
+     * Maximum represents an inclusive upper limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return The maximum. + */ + @java.lang.Override + public double getMaximum() { + return maximum_; + } + /** + *
+     * Maximum represents an inclusive upper limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @param value The maximum to set. + * @return This builder for chaining. + */ + public Builder setMaximum(double value) { + + maximum_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Maximum represents an inclusive upper limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return This builder for chaining. + */ + public Builder clearMaximum() { + bitField0_ = (bitField0_ & ~0x00000080); + maximum_ = 0D; + onChanged(); + return this; + } + + private boolean exclusiveMaximum_ ; + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return The exclusiveMaximum. + */ + @java.lang.Override + public boolean getExclusiveMaximum() { + return exclusiveMaximum_; + } + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @param value The exclusiveMaximum to set. + * @return This builder for chaining. + */ + public Builder setExclusiveMaximum(boolean value) { + + exclusiveMaximum_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return This builder for chaining. + */ + public Builder clearExclusiveMaximum() { + bitField0_ = (bitField0_ & ~0x00000100); + exclusiveMaximum_ = false; + onChanged(); + return this; + } + + private double minimum_ ; + /** + *
+     * minimum represents an inclusive lower limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return The minimum. + */ + @java.lang.Override + public double getMinimum() { + return minimum_; + } + /** + *
+     * minimum represents an inclusive lower limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @param value The minimum to set. + * @return This builder for chaining. + */ + public Builder setMinimum(double value) { + + minimum_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * minimum represents an inclusive lower limit for a numeric instance. The
+     * value of MUST be a number,
+     * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return This builder for chaining. + */ + public Builder clearMinimum() { + bitField0_ = (bitField0_ & ~0x00000200); + minimum_ = 0D; + onChanged(); + return this; + } + + private boolean exclusiveMinimum_ ; + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return The exclusiveMinimum. + */ + @java.lang.Override + public boolean getExclusiveMinimum() { + return exclusiveMinimum_; + } + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @param value The exclusiveMinimum to set. + * @return This builder for chaining. + */ + public Builder setExclusiveMinimum(boolean value) { + + exclusiveMinimum_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return This builder for chaining. + */ + public Builder clearExclusiveMinimum() { + bitField0_ = (bitField0_ & ~0x00000400); + exclusiveMinimum_ = false; + onChanged(); + return this; + } + + private long maxLength_ ; + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return The maxLength. + */ + @java.lang.Override + public long getMaxLength() { + return maxLength_; + } + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @param value The maxLength to set. + * @return This builder for chaining. + */ + public Builder setMaxLength(long value) { + + maxLength_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return This builder for chaining. + */ + public Builder clearMaxLength() { + bitField0_ = (bitField0_ & ~0x00000800); + maxLength_ = 0L; + onChanged(); + return this; + } + + private long minLength_ ; + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return The minLength. + */ + @java.lang.Override + public long getMinLength() { + return minLength_; + } + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @param value The minLength to set. + * @return This builder for chaining. + */ + public Builder setMinLength(long value) { + + minLength_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return This builder for chaining. + */ + public Builder clearMinLength() { + bitField0_ = (bitField0_ & ~0x00001000); + minLength_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object pattern_ = ""; + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The pattern. + */ + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @param value The pattern to set. + * @return This builder for chaining. + */ + public Builder setPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pattern_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @return This builder for chaining. + */ + public Builder clearPattern() { + pattern_ = getDefaultInstance().getPattern(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * string pattern = 17 [json_name = "pattern"]; + * @param value The bytes for pattern to set. + * @return This builder for chaining. + */ + public Builder setPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pattern_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private long maxItems_ ; + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return The maxItems. + */ + @java.lang.Override + public long getMaxItems() { + return maxItems_; + } + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @param value The maxItems to set. + * @return This builder for chaining. + */ + public Builder setMaxItems(long value) { + + maxItems_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return This builder for chaining. + */ + public Builder clearMaxItems() { + bitField0_ = (bitField0_ & ~0x00004000); + maxItems_ = 0L; + onChanged(); + return this; + } + + private long minItems_ ; + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return The minItems. + */ + @java.lang.Override + public long getMinItems() { + return minItems_; + } + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @param value The minItems to set. + * @return This builder for chaining. + */ + public Builder setMinItems(long value) { + + minItems_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return This builder for chaining. + */ + public Builder clearMinItems() { + bitField0_ = (bitField0_ & ~0x00008000); + minItems_ = 0L; + onChanged(); + return this; + } + + private boolean uniqueItems_ ; + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return The uniqueItems. + */ + @java.lang.Override + public boolean getUniqueItems() { + return uniqueItems_; + } + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @param value The uniqueItems to set. + * @return This builder for chaining. + */ + public Builder setUniqueItems(boolean value) { + + uniqueItems_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return This builder for chaining. + */ + public Builder clearUniqueItems() { + bitField0_ = (bitField0_ & ~0x00010000); + uniqueItems_ = false; + onChanged(); + return this; + } + + private long maxProperties_ ; + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return The maxProperties. + */ + @java.lang.Override + public long getMaxProperties() { + return maxProperties_; + } + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @param value The maxProperties to set. + * @return This builder for chaining. + */ + public Builder setMaxProperties(long value) { + + maxProperties_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return This builder for chaining. + */ + public Builder clearMaxProperties() { + bitField0_ = (bitField0_ & ~0x00020000); + maxProperties_ = 0L; + onChanged(); + return this; + } + + private long minProperties_ ; + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return The minProperties. + */ + @java.lang.Override + public long getMinProperties() { + return minProperties_; + } + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @param value The minProperties to set. + * @return This builder for chaining. + */ + public Builder setMinProperties(long value) { + + minProperties_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return This builder for chaining. + */ + public Builder clearMinProperties() { + bitField0_ = (bitField0_ & ~0x00040000); + minProperties_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureRequiredIsMutable() { + if (!required_.isModifiable()) { + required_ = new com.google.protobuf.LazyStringArrayList(required_); + } + bitField0_ |= 0x00080000; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return A list containing the required. + */ + public com.google.protobuf.ProtocolStringList + getRequiredList() { + required_.makeImmutable(); + return required_; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return The count of required. + */ + public int getRequiredCount() { + return required_.size(); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the element to return. + * @return The required at the given index. + */ + public java.lang.String getRequired(int index) { + return required_.get(index); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the value to return. + * @return The bytes of the required at the given index. + */ + public com.google.protobuf.ByteString + getRequiredBytes(int index) { + return required_.getByteString(index); + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index to set the value at. + * @param value The required to set. + * @return This builder for chaining. + */ + public Builder setRequired( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRequiredIsMutable(); + required_.set(index, value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param value The required to add. + * @return This builder for chaining. + */ + public Builder addRequired( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param values The required to add. + * @return This builder for chaining. + */ + public Builder addAllRequired( + java.lang.Iterable values) { + ensureRequiredIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, required_); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @return This builder for chaining. + */ + public Builder clearRequired() { + required_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000);; + onChanged(); + return this; + } + /** + * repeated string required = 26 [json_name = "required"]; + * @param value The bytes of the required to add. + * @return This builder for chaining. + */ + public Builder addRequiredBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureRequiredIsMutable(); + required_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureArrayIsMutable() { + if (!array_.isModifiable()) { + array_ = new com.google.protobuf.LazyStringArrayList(array_); + } + bitField0_ |= 0x00100000; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return A list containing the array. + */ + public com.google.protobuf.ProtocolStringList + getArrayList() { + array_.makeImmutable(); + return array_; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return The count of array. + */ + public int getArrayCount() { + return array_.size(); + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the element to return. + * @return The array at the given index. + */ + public java.lang.String getArray(int index) { + return array_.get(index); + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the value to return. + * @return The bytes of the array at the given index. + */ + public com.google.protobuf.ByteString + getArrayBytes(int index) { + return array_.getByteString(index); + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index to set the value at. + * @param value The array to set. + * @return This builder for chaining. + */ + public Builder setArray( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArrayIsMutable(); + array_.set(index, value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param value The array to add. + * @return This builder for chaining. + */ + public Builder addArray( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureArrayIsMutable(); + array_.add(value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param values The array to add. + * @return This builder for chaining. + */ + public Builder addAllArray( + java.lang.Iterable values) { + ensureArrayIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, array_); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return This builder for chaining. + */ + public Builder clearArray() { + array_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00100000);; + onChanged(); + return this; + } + /** + *
+     * Items in 'array' must be unique.
+     * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param value The bytes of the array to add. + * @return This builder for chaining. + */ + public Builder addArrayBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureArrayIsMutable(); + array_.add(value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList type_ = + emptyIntList(); + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00200000) != 0)) { + type_ = makeMutableCopy(type_); + bitField0_ |= 0x00200000; + } + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the type. + */ + public java.util.List getTypeList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return The count of type. + */ + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the element to return. + * @return The type at the given index. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index) { + return type_converter_.convert(type_.getInt(index)); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index to set the value at. + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param value The type to add. + * @return This builder for chaining. + */ + public Builder addType(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.addInt(value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param values The type to add. + * @return This builder for chaining. + */ + public Builder addAllType( + java.lang.Iterable values) { + ensureTypeIsMutable(); + for (com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes value : values) { + type_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the enum numeric values on the wire for type. + */ + public java.util.List + getTypeValueList() { + return java.util.Collections.unmodifiableList(type_); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of type at the given index. + */ + public int getTypeValue(int index) { + return type_.getInt(index); + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue( + int index, int value) { + ensureTypeIsMutable(); + type_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to add. + * @return This builder for chaining. + */ + public Builder addTypeValue(int value) { + ensureTypeIsMutable(); + type_.addInt(value); + onChanged(); + return this; + } + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param values The enum numeric values on the wire for type to add. + * @return This builder for chaining. + */ + public Builder addAllTypeValue( + java.lang.Iterable values) { + ensureTypeIsMutable(); + for (int value : values) { + type_.addInt(value); + } + onChanged(); + return this; + } + + private java.lang.Object format_ = ""; + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @return The bytes for format. + */ + public com.google.protobuf.ByteString + getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + format_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + /** + *
+     * `Format`
+     * 
+ * + * string format = 36 [json_name = "format"]; + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureEnumIsMutable() { + if (!enum_.isModifiable()) { + enum_ = new com.google.protobuf.LazyStringArrayList(enum_); + } + bitField0_ |= 0x00800000; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return A list containing the enum. + */ + public com.google.protobuf.ProtocolStringList + getEnumList() { + enum_.makeImmutable(); + return enum_; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return The count of enum. + */ + public int getEnumCount() { + return enum_.size(); + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the element to return. + * @return The enum at the given index. + */ + public java.lang.String getEnum(int index) { + return enum_.get(index); + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + public com.google.protobuf.ByteString + getEnumBytes(int index) { + return enum_.getByteString(index); + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index to set the value at. + * @param value The enum to set. + * @return This builder for chaining. + */ + public Builder setEnum( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnumIsMutable(); + enum_.set(index, value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param value The enum to add. + * @return This builder for chaining. + */ + public Builder addEnum( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param values The enum to add. + * @return This builder for chaining. + */ + public Builder addAllEnum( + java.lang.Iterable values) { + ensureEnumIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, enum_); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return This builder for chaining. + */ + public Builder clearEnum() { + enum_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000);; + onChanged(); + return this; + } + /** + *
+     * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+     * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param value The bytes of the enum to add. + * @return This builder for chaining. + */ + public Builder addEnumBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureEnumIsMutable(); + enum_.add(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration fieldConfiguration_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder> fieldConfigurationBuilder_; + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return Whether the fieldConfiguration field is set. + */ + public boolean hasFieldConfiguration() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return The fieldConfiguration. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration() { + if (fieldConfigurationBuilder_ == null) { + return fieldConfiguration_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } else { + return fieldConfigurationBuilder_.getMessage(); + } + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder setFieldConfiguration(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration value) { + if (fieldConfigurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldConfiguration_ = value; + } else { + fieldConfigurationBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder setFieldConfiguration( + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder builderForValue) { + if (fieldConfigurationBuilder_ == null) { + fieldConfiguration_ = builderForValue.build(); + } else { + fieldConfigurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder mergeFieldConfiguration(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration value) { + if (fieldConfigurationBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) && + fieldConfiguration_ != null && + fieldConfiguration_ != com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance()) { + getFieldConfigurationBuilder().mergeFrom(value); + } else { + fieldConfiguration_ = value; + } + } else { + fieldConfigurationBuilder_.mergeFrom(value); + } + if (fieldConfiguration_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public Builder clearFieldConfiguration() { + bitField0_ = (bitField0_ & ~0x01000000); + fieldConfiguration_ = null; + if (fieldConfigurationBuilder_ != null) { + fieldConfigurationBuilder_.dispose(); + fieldConfigurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder getFieldConfigurationBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getFieldConfigurationFieldBuilder().getBuilder(); + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder() { + if (fieldConfigurationBuilder_ != null) { + return fieldConfigurationBuilder_.getMessageOrBuilder(); + } else { + return fieldConfiguration_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.getDefaultInstance() : fieldConfiguration_; + } + } + /** + *
+     * Additional field level properties used when generating the OpenAPI v2 file.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder> + getFieldConfigurationFieldBuilder() { + if (fieldConfigurationBuilder_ == null) { + fieldConfigurationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder>( + getFieldConfiguration(), + getParentForChildren(), + isClean()); + fieldConfiguration_ = null; + } + return fieldConfigurationBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x02000000; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x02000000); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x02000000; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x02000000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x02000000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JSONSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java new file mode 100644 index 00000000..57c70b38 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/JSONSchemaOrBuilder.java @@ -0,0 +1,464 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface JSONSchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   * `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The ref. + */ + java.lang.String getRef(); + /** + *
+   * Ref is used to define an external reference to include in the message.
+   * This could be a fully qualified proto message reference, and that type must
+   * be imported into the protofile. If no message is identified, the Ref will
+   * be used verbatim in the output.
+   * For example:
+   * `ref: ".google.protobuf.Timestamp"`.
+   * 
+ * + * string ref = 3 [json_name = "ref"]; + * @return The bytes for ref. + */ + com.google.protobuf.ByteString + getRefBytes(); + + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title of the schema.
+   * 
+ * + * string title = 5 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description of the schema.
+   * 
+ * + * string description = 6 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * string default = 7 [json_name = "default"]; + * @return The default. + */ + java.lang.String getDefault(); + /** + * string default = 7 [json_name = "default"]; + * @return The bytes for default. + */ + com.google.protobuf.ByteString + getDefaultBytes(); + + /** + * bool read_only = 8 [json_name = "readOnly"]; + * @return The readOnly. + */ + boolean getReadOnly(); + + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The example. + */ + java.lang.String getExample(); + /** + *
+   * A free-form property to include a JSON example of this field. This is copied
+   * verbatim to the output swagger.json. Quotes must be escaped.
+   * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject  https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * string example = 9 [json_name = "example"]; + * @return The bytes for example. + */ + com.google.protobuf.ByteString + getExampleBytes(); + + /** + * double multiple_of = 10 [json_name = "multipleOf"]; + * @return The multipleOf. + */ + double getMultipleOf(); + + /** + *
+   * Maximum represents an inclusive upper limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double maximum = 11 [json_name = "maximum"]; + * @return The maximum. + */ + double getMaximum(); + + /** + * bool exclusive_maximum = 12 [json_name = "exclusiveMaximum"]; + * @return The exclusiveMaximum. + */ + boolean getExclusiveMaximum(); + + /** + *
+   * minimum represents an inclusive lower limit for a numeric instance. The
+   * value of MUST be a number,
+   * 
+ * + * double minimum = 13 [json_name = "minimum"]; + * @return The minimum. + */ + double getMinimum(); + + /** + * bool exclusive_minimum = 14 [json_name = "exclusiveMinimum"]; + * @return The exclusiveMinimum. + */ + boolean getExclusiveMinimum(); + + /** + * uint64 max_length = 15 [json_name = "maxLength"]; + * @return The maxLength. + */ + long getMaxLength(); + + /** + * uint64 min_length = 16 [json_name = "minLength"]; + * @return The minLength. + */ + long getMinLength(); + + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The pattern. + */ + java.lang.String getPattern(); + /** + * string pattern = 17 [json_name = "pattern"]; + * @return The bytes for pattern. + */ + com.google.protobuf.ByteString + getPatternBytes(); + + /** + * uint64 max_items = 20 [json_name = "maxItems"]; + * @return The maxItems. + */ + long getMaxItems(); + + /** + * uint64 min_items = 21 [json_name = "minItems"]; + * @return The minItems. + */ + long getMinItems(); + + /** + * bool unique_items = 22 [json_name = "uniqueItems"]; + * @return The uniqueItems. + */ + boolean getUniqueItems(); + + /** + * uint64 max_properties = 24 [json_name = "maxProperties"]; + * @return The maxProperties. + */ + long getMaxProperties(); + + /** + * uint64 min_properties = 25 [json_name = "minProperties"]; + * @return The minProperties. + */ + long getMinProperties(); + + /** + * repeated string required = 26 [json_name = "required"]; + * @return A list containing the required. + */ + java.util.List + getRequiredList(); + /** + * repeated string required = 26 [json_name = "required"]; + * @return The count of required. + */ + int getRequiredCount(); + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the element to return. + * @return The required at the given index. + */ + java.lang.String getRequired(int index); + /** + * repeated string required = 26 [json_name = "required"]; + * @param index The index of the value to return. + * @return The bytes of the required at the given index. + */ + com.google.protobuf.ByteString + getRequiredBytes(int index); + + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return A list containing the array. + */ + java.util.List + getArrayList(); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @return The count of array. + */ + int getArrayCount(); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the element to return. + * @return The array at the given index. + */ + java.lang.String getArray(int index); + /** + *
+   * Items in 'array' must be unique.
+   * 
+ * + * repeated string array = 34 [json_name = "array"]; + * @param index The index of the value to return. + * @return The bytes of the array at the given index. + */ + com.google.protobuf.ByteString + getArrayBytes(int index); + + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the type. + */ + java.util.List getTypeList(); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return The count of type. + */ + int getTypeCount(); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the element to return. + * @return The type at the given index. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes getType(int index); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @return A list containing the enum numeric values on the wire for type. + */ + java.util.List + getTypeValueList(); + /** + * repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35 [json_name = "type"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of type at the given index. + */ + int getTypeValue(int index); + + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The format. + */ + java.lang.String getFormat(); + /** + *
+   * `Format`
+   * 
+ * + * string format = 36 [json_name = "format"]; + * @return The bytes for format. + */ + com.google.protobuf.ByteString + getFormatBytes(); + + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return A list containing the enum. + */ + java.util.List + getEnumList(); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @return The count of enum. + */ + int getEnumCount(); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the element to return. + * @return The enum at the given index. + */ + java.lang.String getEnum(int index); + /** + *
+   * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
+   * 
+ * + * repeated string enum = 46 [json_name = "enum"]; + * @param index The index of the value to return. + * @return The bytes of the enum at the given index. + */ + com.google.protobuf.ByteString + getEnumBytes(int index); + + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return Whether the fieldConfiguration field is set. + */ + boolean hasFieldConfiguration(); + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + * @return The fieldConfiguration. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration getFieldConfiguration(); + /** + *
+   * Additional field level properties used when generating the OpenAPI v2 file.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001 [json_name = "fieldConfiguration"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfigurationOrBuilder getFieldConfigurationOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 48 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/License.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/License.java new file mode 100644 index 00000000..bfd53e6d --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/License.java @@ -0,0 +1,733 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `License` is a representation of OpenAPI v2 specification's License object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
+ *
+ * Example:
+ *
+ * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ * info: {
+ * ...
+ * license: {
+ * name: "BSD 3-Clause License";
+ * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+ * };
+ * ...
+ * };
+ * ...
+ * };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License} + */ +public final class License extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.License) + LicenseOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + License.class.getName()); + } + // Use License.newBuilder() to construct. + private License(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private License() { + name_ = ""; + url_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.License.class, com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, url_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.License)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.License other = (com.grpc.gateway.protoc_gen_openapiv2.options.License) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.License parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.License prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `License` is a representation of OpenAPI v2 specification's License object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
+   *
+   * Example:
+   *
+   * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   * info: {
+   * ...
+   * license: {
+   * name: "BSD 3-Clause License";
+   * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+   * };
+   * ...
+   * };
+   * ...
+   * };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.License) + com.grpc.gateway.protoc_gen_openapiv2.options.LicenseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.License.class, com.grpc.gateway.protoc_gen_openapiv2.options.License.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.License.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + url_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.License build() { + com.grpc.gateway.protoc_gen_openapiv2.options.License result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.License buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.License result = new com.grpc.gateway.protoc_gen_openapiv2.options.License(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.License result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.License) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.License)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.License other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.License.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The license name used for the API.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A URL to the license used for the API. MUST be in the format of a URL.
+     * 
+ * + * string url = 2 [json_name = "url"]; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.License) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.License) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.License DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.License(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public License parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.License getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java new file mode 100644 index 00000000..e73f9902 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/LicenseOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface LicenseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.License) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The license name used for the API.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * A URL to the license used for the API. MUST be in the format of a URL.
+   * 
+ * + * string url = 2 [json_name = "url"]; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java new file mode 100644 index 00000000..566dfd1d --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Openapiv2Proto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public final class Openapiv2Proto { + private Openapiv2Proto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Openapiv2Proto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,protoc-gen-openapiv2/options/openapiv2" + + ".proto\022)grpc.gateway.protoc_gen_openapiv" + + "2.options\032\034google/protobuf/struct.proto\"" + + "\263\010\n\007Swagger\022\030\n\007swagger\030\001 \001(\tR\007swagger\022C\n" + + "\004info\030\002 \001(\0132/.grpc.gateway.protoc_gen_op" + + "enapiv2.options.InfoR\004info\022\022\n\004host\030\003 \001(\t" + + "R\004host\022\033\n\tbase_path\030\004 \001(\tR\010basePath\022K\n\007s" + + "chemes\030\005 \003(\01621.grpc.gateway.protoc_gen_o" + + "penapiv2.options.SchemeR\007schemes\022\032\n\010cons" + + "umes\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010" + + "produces\022_\n\tresponses\030\n \003(\0132A.grpc.gatew" + + "ay.protoc_gen_openapiv2.options.Swagger." + + "ResponsesEntryR\tresponses\022q\n\024security_de" + + "finitions\030\013 \001(\0132>.grpc.gateway.protoc_ge" + + "n_openapiv2.options.SecurityDefinitionsR" + + "\023securityDefinitions\022Z\n\010security\030\014 \003(\0132>" + + ".grpc.gateway.protoc_gen_openapiv2.optio" + + "ns.SecurityRequirementR\010security\022B\n\004tags" + + "\030\r \003(\0132..grpc.gateway.protoc_gen_openapi" + + "v2.options.TagR\004tags\022e\n\rexternal_docs\030\016 " + + "\001(\0132@.grpc.gateway.protoc_gen_openapiv2." + + "options.ExternalDocumentationR\014externalD" + + "ocs\022b\n\nextensions\030\017 \003(\0132B.grpc.gateway.p" + + "rotoc_gen_openapiv2.options.Swagger.Exte" + + "nsionsEntryR\nextensions\032q\n\016ResponsesEntr" + + "y\022\020\n\003key\030\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grp" + + "c.gateway.protoc_gen_openapiv2.options.R" + + "esponseR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n" + + "\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." + + "protobuf.ValueR\005value:\0028\001J\004\010\010\020\tJ\004\010\t\020\n\"\326\007" + + "\n\tOperation\022\022\n\004tags\030\001 \003(\tR\004tags\022\030\n\007summa" + + "ry\030\002 \001(\tR\007summary\022 \n\013description\030\003 \001(\tR\013" + + "description\022e\n\rexternal_docs\030\004 \001(\0132@.grp" + + "c.gateway.protoc_gen_openapiv2.options.E" + + "xternalDocumentationR\014externalDocs\022!\n\014op" + + "eration_id\030\005 \001(\tR\013operationId\022\032\n\010consume" + + "s\030\006 \003(\tR\010consumes\022\032\n\010produces\030\007 \003(\tR\010pro" + + "duces\022a\n\tresponses\030\t \003(\0132C.grpc.gateway." + + "protoc_gen_openapiv2.options.Operation.R" + + "esponsesEntryR\tresponses\022K\n\007schemes\030\n \003(" + + "\01621.grpc.gateway.protoc_gen_openapiv2.op" + + "tions.SchemeR\007schemes\022\036\n\ndeprecated\030\013 \001(" + + "\010R\ndeprecated\022Z\n\010security\030\014 \003(\0132>.grpc.g" + + "ateway.protoc_gen_openapiv2.options.Secu" + + "rityRequirementR\010security\022d\n\nextensions\030" + + "\r \003(\0132D.grpc.gateway.protoc_gen_openapiv" + + "2.options.Operation.ExtensionsEntryR\next" + + "ensions\022U\n\nparameters\030\016 \001(\01325.grpc.gatew" + + "ay.protoc_gen_openapiv2.options.Paramete" + + "rsR\nparameters\032q\n\016ResponsesEntry\022\020\n\003key\030" + + "\001 \001(\tR\003key\022I\n\005value\030\002 \001(\01323.grpc.gateway" + + ".protoc_gen_openapiv2.options.ResponseR\005" + + "value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(" + + "\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf." + + "ValueR\005value:\0028\001J\004\010\010\020\t\"b\n\nParameters\022T\n\007" + + "headers\030\001 \003(\0132:.grpc.gateway.protoc_gen_" + + "openapiv2.options.HeaderParameterR\007heade" + + "rs\"\243\002\n\017HeaderParameter\022\022\n\004name\030\001 \001(\tR\004na" + + "me\022 \n\013description\030\002 \001(\tR\013description\022S\n\004" + + "type\030\003 \001(\0162?.grpc.gateway.protoc_gen_ope" + + "napiv2.options.HeaderParameter.TypeR\004typ" + + "e\022\026\n\006format\030\004 \001(\tR\006format\022\032\n\010required\030\005 " + + "\001(\010R\010required\"E\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006ST" + + "RING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003\022\013\n\007BOOLE" + + "AN\020\004J\004\010\006\020\007J\004\010\007\020\010\"\330\001\n\006Header\022 \n\013descripti" + + "on\030\001 \001(\tR\013description\022\022\n\004type\030\002 \001(\tR\004typ" + + "e\022\026\n\006format\030\003 \001(\tR\006format\022\030\n\007default\030\006 \001" + + "(\tR\007default\022\030\n\007pattern\030\r \001(\tR\007patternJ\004\010" + + "\004\020\005J\004\010\005\020\006J\004\010\007\020\010J\004\010\010\020\tJ\004\010\t\020\nJ\004\010\n\020\013J\004\010\013\020\014J" + + "\004\010\014\020\rJ\004\010\016\020\017J\004\010\017\020\020J\004\010\020\020\021J\004\010\021\020\022J\004\010\022\020\023\"\232\005\n\010" + + "Response\022 \n\013description\030\001 \001(\tR\013descripti" + + "on\022I\n\006schema\030\002 \001(\01321.grpc.gateway.protoc" + + "_gen_openapiv2.options.SchemaR\006schema\022Z\n" + + "\007headers\030\003 \003(\0132@.grpc.gateway.protoc_gen" + + "_openapiv2.options.Response.HeadersEntry" + + "R\007headers\022]\n\010examples\030\004 \003(\0132A.grpc.gatew" + + "ay.protoc_gen_openapiv2.options.Response" + + ".ExamplesEntryR\010examples\022c\n\nextensions\030\005" + + " \003(\0132C.grpc.gateway.protoc_gen_openapiv2" + + ".options.Response.ExtensionsEntryR\nexten" + + "sions\032m\n\014HeadersEntry\022\020\n\003key\030\001 \001(\tR\003key\022" + + "G\n\005value\030\002 \001(\01321.grpc.gateway.protoc_gen" + + "_openapiv2.options.HeaderR\005value:\0028\001\032;\n\r" + + "ExamplesEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value" + + "\030\002 \001(\tR\005value:\0028\001\032U\n\017ExtensionsEntry\022\020\n\003" + + "key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.p" + + "rotobuf.ValueR\005value:\0028\001\"\326\003\n\004Info\022\024\n\005tit" + + "le\030\001 \001(\tR\005title\022 \n\013description\030\002 \001(\tR\013de" + + "scription\022(\n\020terms_of_service\030\003 \001(\tR\016ter" + + "msOfService\022L\n\007contact\030\004 \001(\01322.grpc.gate" + + "way.protoc_gen_openapiv2.options.Contact" + + "R\007contact\022L\n\007license\030\005 \001(\01322.grpc.gatewa" + + "y.protoc_gen_openapiv2.options.LicenseR\007" + + "license\022\030\n\007version\030\006 \001(\tR\007version\022_\n\next" + + "ensions\030\007 \003(\0132?.grpc.gateway.protoc_gen_" + + "openapiv2.options.Info.ExtensionsEntryR\n" + + "extensions\032U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001" + + "(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google.protobuf" + + ".ValueR\005value:\0028\001\"E\n\007Contact\022\022\n\004name\030\001 \001" + + "(\tR\004name\022\020\n\003url\030\002 \001(\tR\003url\022\024\n\005email\030\003 \001(" + + "\tR\005email\"/\n\007License\022\022\n\004name\030\001 \001(\tR\004name\022" + + "\020\n\003url\030\002 \001(\tR\003url\"K\n\025ExternalDocumentati" + + "on\022 \n\013description\030\001 \001(\tR\013description\022\020\n\003" + + "url\030\002 \001(\tR\003url\"\252\002\n\006Schema\022V\n\013json_schema" + + "\030\001 \001(\01325.grpc.gateway.protoc_gen_openapi" + + "v2.options.JSONSchemaR\njsonSchema\022$\n\rdis" + + "criminator\030\002 \001(\tR\rdiscriminator\022\033\n\tread_" + + "only\030\003 \001(\010R\010readOnly\022e\n\rexternal_docs\030\005 " + + "\001(\0132@.grpc.gateway.protoc_gen_openapiv2." + + "options.ExternalDocumentationR\014externalD" + + "ocs\022\030\n\007example\030\006 \001(\tR\007exampleJ\004\010\004\020\005\"\327\n\n\n" + + "JSONSchema\022\020\n\003ref\030\003 \001(\tR\003ref\022\024\n\005title\030\005 " + + "\001(\tR\005title\022 \n\013description\030\006 \001(\tR\013descrip" + + "tion\022\030\n\007default\030\007 \001(\tR\007default\022\033\n\tread_o" + + "nly\030\010 \001(\010R\010readOnly\022\030\n\007example\030\t \001(\tR\007ex" + + "ample\022\037\n\013multiple_of\030\n \001(\001R\nmultipleOf\022\030" + + "\n\007maximum\030\013 \001(\001R\007maximum\022+\n\021exclusive_ma" + + "ximum\030\014 \001(\010R\020exclusiveMaximum\022\030\n\007minimum" + + "\030\r \001(\001R\007minimum\022+\n\021exclusive_minimum\030\016 \001" + + "(\010R\020exclusiveMinimum\022\035\n\nmax_length\030\017 \001(\004" + + "R\tmaxLength\022\035\n\nmin_length\030\020 \001(\004R\tminLeng" + + "th\022\030\n\007pattern\030\021 \001(\tR\007pattern\022\033\n\tmax_item" + + "s\030\024 \001(\004R\010maxItems\022\033\n\tmin_items\030\025 \001(\004R\010mi" + + "nItems\022!\n\014unique_items\030\026 \001(\010R\013uniqueItem" + + "s\022%\n\016max_properties\030\030 \001(\004R\rmaxProperties" + + "\022%\n\016min_properties\030\031 \001(\004R\rminProperties\022" + + "\032\n\010required\030\032 \003(\tR\010required\022\024\n\005array\030\" \003" + + "(\tR\005array\022_\n\004type\030# \003(\0162K.grpc.gateway.p" + + "rotoc_gen_openapiv2.options.JSONSchema.J" + + "SONSchemaSimpleTypesR\004type\022\026\n\006format\030$ \001" + + "(\tR\006format\022\022\n\004enum\030. \003(\tR\004enum\022z\n\023field_" + + "configuration\030\351\007 \001(\0132H.grpc.gateway.prot" + + "oc_gen_openapiv2.options.JSONSchema.Fiel" + + "dConfigurationR\022fieldConfiguration\022e\n\nex" + + "tensions\0300 \003(\0132E.grpc.gateway.protoc_gen" + + "_openapiv2.options.JSONSchema.Extensions" + + "EntryR\nextensions\032<\n\022FieldConfiguration\022" + + "&\n\017path_param_name\030/ \001(\tR\rpathParamName\032" + + "U\n\017ExtensionsEntry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005" + + "value\030\002 \001(\0132\026.google.protobuf.ValueR\005val" + + "ue:\0028\001\"w\n\025JSONSchemaSimpleTypes\022\013\n\007UNKNO" + + "WN\020\000\022\t\n\005ARRAY\020\001\022\013\n\007BOOLEAN\020\002\022\013\n\007INTEGER\020" + + "\003\022\010\n\004NULL\020\004\022\n\n\006NUMBER\020\005\022\n\n\006OBJECT\020\006\022\n\n\006S" + + "TRING\020\007J\004\010\001\020\002J\004\010\002\020\003J\004\010\004\020\005J\004\010\022\020\023J\004\010\023\020\024J\004\010" + + "\027\020\030J\004\010\033\020\034J\004\010\034\020\035J\004\010\035\020\036J\004\010\036\020\"J\004\010%\020*J\004\010*\020+J" + + "\004\010+\020.\"\331\002\n\003Tag\022\022\n\004name\030\001 \001(\tR\004name\022 \n\013des" + + "cription\030\002 \001(\tR\013description\022e\n\rexternal_" + + "docs\030\003 \001(\0132@.grpc.gateway.protoc_gen_ope" + + "napiv2.options.ExternalDocumentationR\014ex" + + "ternalDocs\022^\n\nextensions\030\004 \003(\0132>.grpc.ga" + + "teway.protoc_gen_openapiv2.options.Tag.E" + + "xtensionsEntryR\nextensions\032U\n\017Extensions" + + "Entry\022\020\n\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026" + + ".google.protobuf.ValueR\005value:\0028\001\"\367\001\n\023Se" + + "curityDefinitions\022h\n\010security\030\001 \003(\0132L.gr" + + "pc.gateway.protoc_gen_openapiv2.options." + + "SecurityDefinitions.SecurityEntryR\010secur" + + "ity\032v\n\rSecurityEntry\022\020\n\003key\030\001 \001(\tR\003key\022O" + + "\n\005value\030\002 \001(\01329.grpc.gateway.protoc_gen_" + + "openapiv2.options.SecuritySchemeR\005value:" + + "\0028\001\"\377\006\n\016SecurityScheme\022R\n\004type\030\001 \001(\0162>.g" + + "rpc.gateway.protoc_gen_openapiv2.options" + + ".SecurityScheme.TypeR\004type\022 \n\013descriptio" + + "n\030\002 \001(\tR\013description\022\022\n\004name\030\003 \001(\tR\004name" + + "\022L\n\002in\030\004 \001(\0162<.grpc.gateway.protoc_gen_o" + + "penapiv2.options.SecurityScheme.InR\002in\022R" + + "\n\004flow\030\005 \001(\0162>.grpc.gateway.protoc_gen_o" + + "penapiv2.options.SecurityScheme.FlowR\004fl" + + "ow\022+\n\021authorization_url\030\006 \001(\tR\020authoriza" + + "tionUrl\022\033\n\ttoken_url\030\007 \001(\tR\010tokenUrl\022I\n\006" + + "scopes\030\010 \001(\01321.grpc.gateway.protoc_gen_o" + + "penapiv2.options.ScopesR\006scopes\022i\n\nexten" + + "sions\030\t \003(\0132I.grpc.gateway.protoc_gen_op" + + "enapiv2.options.SecurityScheme.Extension" + + "sEntryR\nextensions\032U\n\017ExtensionsEntry\022\020\n" + + "\003key\030\001 \001(\tR\003key\022,\n\005value\030\002 \001(\0132\026.google." + + "protobuf.ValueR\005value:\0028\001\"K\n\004Type\022\020\n\014TYP" + + "E_INVALID\020\000\022\016\n\nTYPE_BASIC\020\001\022\020\n\014TYPE_API_" + + "KEY\020\002\022\017\n\013TYPE_OAUTH2\020\003\"1\n\002In\022\016\n\nIN_INVAL" + + "ID\020\000\022\014\n\010IN_QUERY\020\001\022\r\n\tIN_HEADER\020\002\"j\n\004Flo" + + "w\022\020\n\014FLOW_INVALID\020\000\022\021\n\rFLOW_IMPLICIT\020\001\022\021" + + "\n\rFLOW_PASSWORD\020\002\022\024\n\020FLOW_APPLICATION\020\003\022" + + "\024\n\020FLOW_ACCESS_CODE\020\004\"\366\002\n\023SecurityRequir" + + "ement\022\212\001\n\024security_requirement\030\001 \003(\0132W.g" + + "rpc.gateway.protoc_gen_openapiv2.options" + + ".SecurityRequirement.SecurityRequirement" + + "EntryR\023securityRequirement\0320\n\030SecurityRe" + + "quirementValue\022\024\n\005scope\030\001 \003(\tR\005scope\032\237\001\n" + + "\030SecurityRequirementEntry\022\020\n\003key\030\001 \001(\tR\003" + + "key\022m\n\005value\030\002 \001(\0132W.grpc.gateway.protoc" + + "_gen_openapiv2.options.SecurityRequireme" + + "nt.SecurityRequirementValueR\005value:\0028\001\"\226" + + "\001\n\006Scopes\022R\n\005scope\030\001 \003(\0132<.grpc.gateway." + + "protoc_gen_openapiv2.options.Scopes.Scop" + + "eEntryR\005scope\0328\n\nScopeEntry\022\020\n\003key\030\001 \001(\t" + + "R\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001*;\n\006Schem" + + "e\022\013\n\007UNKNOWN\020\000\022\010\n\004HTTP\020\001\022\t\n\005HTTPS\020\002\022\006\n\002W" + + "S\020\003\022\007\n\003WSS\020\004B\307\002\n-com.grpc.gateway.protoc" + + "_gen_openapiv2.optionsB\016Openapiv2ProtoP\001" + + "ZFgithub.com/grpc-ecosystem/grpc-gateway" + + "/v2/protoc-gen-openapiv2/options\242\002\004GGPO\252" + + "\002\'Grpc.Gateway.ProtocGenOpenapiv2.Option" + + "s\312\002\'Grpc\\Gateway\\ProtocGenOpenapiv2\\Opti" + + "ons\342\0023Grpc\\Gateway\\ProtocGenOpenapiv2\\Op" + + "tions\\GPBMetadata\352\002*Grpc::Gateway::Proto" + + "cGenOpenapiv2::Optionsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor, + new java.lang.String[] { "Swagger", "Info", "Host", "BasePath", "Schemes", "Consumes", "Produces", "Responses", "SecurityDefinitions", "Security", "Tags", "ExternalDocs", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor, + new java.lang.String[] { "Tags", "Summary", "Description", "ExternalDocs", "OperationId", "Consumes", "Produces", "Responses", "Schemes", "Deprecated", "Security", "Extensions", "Parameters", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor, + new java.lang.String[] { "Headers", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_descriptor, + new java.lang.String[] { "Name", "Description", "Type", "Format", "Required", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Header_descriptor, + new java.lang.String[] { "Description", "Type", "Format", "Default", "Pattern", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor, + new java.lang.String[] { "Description", "Schema", "Headers", "Examples", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor.getNestedTypes().get(2); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor, + new java.lang.String[] { "Title", "Description", "TermsOfService", "Contact", "License", "Version", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor, + new java.lang.String[] { "Name", "Url", "Email", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor, + new java.lang.String[] { "Name", "Url", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor, + new java.lang.String[] { "Description", "Url", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor, + new java.lang.String[] { "JsonSchema", "Discriminator", "ReadOnly", "ExternalDocs", "Example", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor, + new java.lang.String[] { "Ref", "Title", "Description", "Default", "ReadOnly", "Example", "MultipleOf", "Maximum", "ExclusiveMaximum", "Minimum", "ExclusiveMinimum", "MaxLength", "MinLength", "Pattern", "MaxItems", "MinItems", "UniqueItems", "MaxProperties", "MinProperties", "Required", "Array", "Type", "Format", "Enum", "FieldConfiguration", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration_descriptor, + new java.lang.String[] { "PathParamName", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor, + new java.lang.String[] { "Name", "Description", "ExternalDocs", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor, + new java.lang.String[] { "Security", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor, + new java.lang.String[] { "Type", "Description", "Name", "In", "Flow", "AuthorizationUrl", "TokenUrl", "Scopes", "Extensions", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor, + new java.lang.String[] { "SecurityRequirement", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor, + new java.lang.String[] { "Scope", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor.getNestedTypes().get(1); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor, + new java.lang.String[] { "Scope", }); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor = + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor.getNestedTypes().get(0); + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Operation.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Operation.java new file mode 100644 index 00000000..9ce4eef8 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Operation.java @@ -0,0 +1,3936 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Operation` is a representation of OpenAPI v2 specification's Operation object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
+ *
+ * Example:
+ *
+ * service EchoService {
+ * rpc Echo(SimpleMessage) returns (SimpleMessage) {
+ * option (google.api.http) = {
+ * get: "/v1/example/echo/{id}"
+ * };
+ *
+ * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ * summary: "Get a message.";
+ * operation_id: "getMessage";
+ * tags: "echo";
+ * responses: {
+ * key: "200"
+ * value: {
+ * description: "OK";
+ * }
+ * }
+ * };
+ * }
+ * }
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ +public final class Operation extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation) + OperationOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Operation.class.getName()); + } + // Use Operation.newBuilder() to construct. + private Operation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Operation() { + tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + summary_ = ""; + description_ = ""; + operationId_ = ""; + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + schemes_ = emptyIntList(); + security_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetResponses(); + case 13: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Operation.class, com.grpc.gateway.protoc_gen_openapiv2.options.Operation.Builder.class); + } + + private int bitField0_; + public static final int TAGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int SUMMARY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object summary_ = ""; + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The summary. + */ + @java.lang.Override + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } + } + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The bytes for summary. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 4; + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int OPERATION_ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object operationId_ = ""; + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The operationId. + */ + @java.lang.Override + public java.lang.String getOperationId() { + java.lang.Object ref = operationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operationId_ = s; + return s; + } + } + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The bytes for operationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOperationIdBytes() { + java.lang.Object ref = operationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSUMES_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + return consumes_; + } + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + + public static final int PRODUCES_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + return produces_; + } + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + + public static final int RESPONSES_FIELD_NUMBER = 9; + private static final class ResponsesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response> responses_; + private com.google.protobuf.MapField + internalGetResponses() { + if (responses_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResponsesDefaultEntryHolder.defaultEntry); + } + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().getMap().size(); + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().getMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getMap(); + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SCHEMES_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList schemes_; + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme> schemes_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme>() { + public com.grpc.gateway.protoc_gen_openapiv2.options.Scheme convert(int from) { + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme result = com.grpc.gateway.protoc_gen_openapiv2.options.Scheme.forNumber(from); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Scheme.UNRECOGNIZED : result; + } + }; + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + @java.lang.Override + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return The count of schemes. + */ + @java.lang.Override + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.getInt(index)); + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + @java.lang.Override + public java.util.List + getSchemesValueList() { + return schemes_; + } + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + @java.lang.Override + public int getSchemesValue(int index) { + return schemes_.getInt(index); + } + private int schemesMemoizedSerializedSize; + + public static final int DEPRECATED_FIELD_NUMBER = 11; + private boolean deprecated_ = false; + /** + *
+   * Declares this operation to be deprecated. Usage of the declared operation
+   * should be refrained. Default value is false.
+   * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return The deprecated. + */ + @java.lang.Override + public boolean getDeprecated() { + return deprecated_; + } + + public static final int SECURITY_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List security_; + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List getSecurityList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List + getSecurityOrBuilderList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public int getSecurityCount() { + return security_.size(); + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + return security_.get(index); + } + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + return security_.get(index); + } + + public static final int EXTENSIONS_FIELD_NUMBER = 13; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PARAMETERS_FIELD_NUMBER = 14; + private com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters_; + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return Whether the parameters field is set. + */ + @java.lang.Override + public boolean hasParameters() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return The parameters. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters() { + return parameters_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder() { + return parameters_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tags_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summary_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, summary_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, operationId_); + } + for (int i = 0; i < consumes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, consumes_.getRaw(i)); + } + for (int i = 0; i < produces_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, produces_.getRaw(i)); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetResponses(), + ResponsesDefaultEntryHolder.defaultEntry, + 9); + if (getSchemesList().size() > 0) { + output.writeUInt32NoTag(82); + output.writeUInt32NoTag(schemesMemoizedSerializedSize); + } + for (int i = 0; i < schemes_.size(); i++) { + output.writeEnumNoTag(schemes_.getInt(i)); + } + if (deprecated_ != false) { + output.writeBool(11, deprecated_); + } + for (int i = 0; i < security_.size(); i++) { + output.writeMessage(12, security_.get(i)); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 13); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(14, getParameters()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(summary_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, summary_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, operationId_); + } + { + int dataSize = 0; + for (int i = 0; i < consumes_.size(); i++) { + dataSize += computeStringSizeNoTag(consumes_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsumesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < produces_.size(); i++) { + dataSize += computeStringSizeNoTag(produces_.getRaw(i)); + } + size += dataSize; + size += 1 * getProducesList().size(); + } + for (java.util.Map.Entry entry + : internalGetResponses().getMap().entrySet()) { + com.google.protobuf.MapEntry + responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, responses__); + } + { + int dataSize = 0; + for (int i = 0; i < schemes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(schemes_.getInt(i)); + } + size += dataSize; + if (!getSchemesList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }schemesMemoizedSerializedSize = dataSize; + } + if (deprecated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, deprecated_); + } + for (int i = 0; i < security_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, security_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, extensions__); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Operation)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Operation other = (com.grpc.gateway.protoc_gen_openapiv2.options.Operation) obj; + + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (!getSummary() + .equals(other.getSummary())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!getOperationId() + .equals(other.getOperationId())) return false; + if (!getConsumesList() + .equals(other.getConsumesList())) return false; + if (!getProducesList() + .equals(other.getProducesList())) return false; + if (!internalGetResponses().equals( + other.internalGetResponses())) return false; + if (!schemes_.equals(other.schemes_)) return false; + if (getDeprecated() + != other.getDeprecated()) return false; + if (!getSecurityList() + .equals(other.getSecurityList())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (hasParameters() != other.hasParameters()) return false; + if (hasParameters()) { + if (!getParameters() + .equals(other.getParameters())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + hash = (37 * hash) + OPERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getOperationId().hashCode(); + if (getConsumesCount() > 0) { + hash = (37 * hash) + CONSUMES_FIELD_NUMBER; + hash = (53 * hash) + getConsumesList().hashCode(); + } + if (getProducesCount() > 0) { + hash = (37 * hash) + PRODUCES_FIELD_NUMBER; + hash = (53 * hash) + getProducesList().hashCode(); + } + if (!internalGetResponses().getMap().isEmpty()) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + internalGetResponses().hashCode(); + } + if (getSchemesCount() > 0) { + hash = (37 * hash) + SCHEMES_FIELD_NUMBER; + hash = (53 * hash) + schemes_.hashCode(); + } + hash = (37 * hash) + DEPRECATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeprecated()); + if (getSecurityCount() > 0) { + hash = (37 * hash) + SECURITY_FIELD_NUMBER; + hash = (53 * hash) + getSecurityList().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + if (hasParameters()) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Operation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Operation` is a representation of OpenAPI v2 specification's Operation object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
+   *
+   * Example:
+   *
+   * service EchoService {
+   * rpc Echo(SimpleMessage) returns (SimpleMessage) {
+   * option (google.api.http) = {
+   * get: "/v1/example/echo/{id}"
+   * };
+   *
+   * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+   * summary: "Get a message.";
+   * operation_id: "getMessage";
+   * tags: "echo";
+   * responses: {
+   * key: "200"
+   * value: {
+   * description: "OK";
+   * }
+   * }
+   * };
+   * }
+   * }
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation) + com.grpc.gateway.protoc_gen_openapiv2.options.OperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetResponses(); + case 13: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetMutableResponses(); + case 13: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Operation.class, com.grpc.gateway.protoc_gen_openapiv2.options.Operation.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Operation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getExternalDocsFieldBuilder(); + getSecurityFieldBuilder(); + getParametersFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + summary_ = ""; + description_ = ""; + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + operationId_ = ""; + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + internalGetMutableResponses().clear(); + schemes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000100); + deprecated_ = false; + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + } else { + security_ = null; + securityBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + internalGetMutableExtensions().clear(); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Operation build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Operation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Operation buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Operation result = new com.grpc.gateway.protoc_gen_openapiv2.options.Operation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.grpc.gateway.protoc_gen_openapiv2.options.Operation result) { + if (((bitField0_ & 0x00000100) != 0)) { + schemes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.schemes_ = schemes_; + if (securityBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + security_ = java.util.Collections.unmodifiableList(security_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.security_ = security_; + } else { + result.security_ = securityBuilder_.build(); + } + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Operation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.summary_ = summary_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.operationId_ = operationId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + consumes_.makeImmutable(); + result.consumes_ = consumes_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + produces_.makeImmutable(); + result.produces_ = produces_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.responses_ = internalGetResponses().build(ResponsesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.deprecated_ = deprecated_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.parameters_ = parametersBuilder_ == null + ? parameters_ + : parametersBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Operation) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Operation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Operation other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Operation.getDefaultInstance()) return this; + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ |= 0x00000001; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + if (!other.getOperationId().isEmpty()) { + operationId_ = other.operationId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.consumes_.isEmpty()) { + if (consumes_.isEmpty()) { + consumes_ = other.consumes_; + bitField0_ |= 0x00000020; + } else { + ensureConsumesIsMutable(); + consumes_.addAll(other.consumes_); + } + onChanged(); + } + if (!other.produces_.isEmpty()) { + if (produces_.isEmpty()) { + produces_ = other.produces_; + bitField0_ |= 0x00000040; + } else { + ensureProducesIsMutable(); + produces_.addAll(other.produces_); + } + onChanged(); + } + internalGetMutableResponses().mergeFrom( + other.internalGetResponses()); + bitField0_ |= 0x00000080; + if (!other.schemes_.isEmpty()) { + if (schemes_.isEmpty()) { + schemes_ = other.schemes_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureSchemesIsMutable(); + schemes_.addAll(other.schemes_); + } + onChanged(); + } + if (other.getDeprecated() != false) { + setDeprecated(other.getDeprecated()); + } + if (securityBuilder_ == null) { + if (!other.security_.isEmpty()) { + if (security_.isEmpty()) { + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureSecurityIsMutable(); + security_.addAll(other.security_); + } + onChanged(); + } + } else { + if (!other.security_.isEmpty()) { + if (securityBuilder_.isEmpty()) { + securityBuilder_.dispose(); + securityBuilder_ = null; + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000400); + securityBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSecurityFieldBuilder() : null; + } else { + securityBuilder_.addAllMessages(other.security_); + } + } + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000800; + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 10 + case 18: { + summary_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + operationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsumesIsMutable(); + consumes_.add(s); + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureProducesIsMutable(); + produces_.add(s); + break; + } // case 58 + case 74: { + com.google.protobuf.MapEntry + responses__ = input.readMessage( + ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableResponses().ensureBuilderMap().put( + responses__.getKey(), responses__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 80: { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.addInt(tmpRaw); + break; + } // case 80 + case 82: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.addInt(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 82 + case 88: { + deprecated_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 98: { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement m = + input.readMessage( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.parser(), + extensionRegistry); + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(m); + } else { + securityBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 114: { + input.readMessage( + getParametersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + tags_.makeImmutable(); + return tags_; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTagsIsMutable(); + tags_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object summary_ = ""; + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The summary. + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The bytes for summary. + */ + public com.google.protobuf.ByteString + getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @param value The summary to set. + * @return This builder for chaining. + */ + public Builder setSummary( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + summary_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return This builder for chaining. + */ + public Builder clearSummary() { + summary_ = getDefaultInstance().getSummary(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short summary of what the operation does. For maximum readability in the
+     * swagger-ui, this field SHOULD be less than 120 characters.
+     * 
+ * + * string summary = 2 [json_name = "summary"]; + * @param value The bytes for summary to set. + * @return This builder for chaining. + */ + public Builder setSummaryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + summary_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A verbose explanation of the operation behavior. GFM syntax can be used for
+     * rich text representation.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + externalDocs_ != null && + externalDocs_ != com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000008); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation for this operation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private java.lang.Object operationId_ = ""; + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The operationId. + */ + public java.lang.String getOperationId() { + java.lang.Object ref = operationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The bytes for operationId. + */ + public com.google.protobuf.ByteString + getOperationIdBytes() { + java.lang.Object ref = operationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + operationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @param value The operationId to set. + * @return This builder for chaining. + */ + public Builder setOperationId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + operationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return This builder for chaining. + */ + public Builder clearOperationId() { + operationId_ = getDefaultInstance().getOperationId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * Unique string used to identify the operation. The id MUST be unique among
+     * all operations described in the API. Tools and libraries MAY use the
+     * operationId to uniquely identify an operation, therefore, it is recommended
+     * to follow common programming naming conventions.
+     * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @param value The bytes for operationId to set. + * @return This builder for chaining. + */ + public Builder setOperationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + operationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureConsumesIsMutable() { + if (!consumes_.isModifiable()) { + consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_); + } + bitField0_ |= 0x00000020; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + consumes_.makeImmutable(); + return consumes_; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index to set the value at. + * @param value The consumes to set. + * @return This builder for chaining. + */ + public Builder setConsumes( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param values The consumes to add. + * @return This builder for chaining. + */ + public Builder addAllConsumes( + java.lang.Iterable values) { + ensureConsumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumes_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return This builder for chaining. + */ + public Builder clearConsumes() { + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can consume. This overrides the consumes
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The bytes of the consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureProducesIsMutable() { + if (!produces_.isModifiable()) { + produces_ = new com.google.protobuf.LazyStringArrayList(produces_); + } + bitField0_ |= 0x00000040; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + produces_.makeImmutable(); + return produces_; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index to set the value at. + * @param value The produces to set. + * @return This builder for chaining. + */ + public Builder setProduces( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The produces to add. + * @return This builder for chaining. + */ + public Builder addProduces( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param values The produces to add. + * @return This builder for chaining. + */ + public Builder addAllProduces( + java.lang.Iterable values) { + ensureProducesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, produces_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return This builder for chaining. + */ + public Builder clearProduces() { + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the operation can produce. This overrides the produces
+     * definition at the OpenAPI Object. An empty value MAY be used to clear the
+     * global definition. Value MUST be as described under Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The bytes of the produces to add. + * @return This builder for chaining. + */ + public Builder addProducesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private static final class ResponsesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response build(com.grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder val) { + if (val instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Response) { return (com.grpc.gateway.protoc_gen_openapiv2.options.Response) val; } + return ((com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ResponsesDefaultEntryHolder.defaultEntry; + } + }; + private static final ResponsesConverter responsesConverter = new ResponsesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.Response, com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder> responses_; + private com.google.protobuf.MapFieldBuilder + internalGetResponses() { + if (responses_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + return responses_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableResponses() { + if (responses_ == null) { + responses_ = new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + bitField0_ |= 0x00000080; + onChanged(); + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().ensureBuilderMap().size(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getImmutableMap(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + return map.containsKey(key) ? responsesConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return responsesConverter.build(map.get(key)); + } + public Builder clearResponses() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableResponses().clear(); + return this; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public Builder removeResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableResponses().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableResponses() { + bitField0_ |= 0x00000080; + return internalGetMutableResponses().ensureMessageMap(); + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public Builder putResponses( + java.lang.String key, + com.grpc.gateway.protoc_gen_openapiv2.options.Response value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableResponses().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public Builder putAllResponses( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableResponses().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * The list of possible responses as they are returned from executing this
+     * operation.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder putResponsesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableResponses().ensureBuilderMap(); + com.grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Response) { + entry = ((com.grpc.gateway.protoc_gen_openapiv2.options.Response) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) entry; + } + + private com.google.protobuf.Internal.IntList schemes_ = + emptyIntList(); + private void ensureSchemesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + schemes_ = makeMutableCopy(schemes_); + bitField0_ |= 0x00000100; + } + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return The count of schemes. + */ + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.getInt(index)); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemes( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param value The schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemes(com.grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.addInt(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param values The schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemes( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (com.grpc.gateway.protoc_gen_openapiv2.options.Scheme value : values) { + schemes_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return This builder for chaining. + */ + public Builder clearSchemes() { + schemes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + public java.util.List + getSchemesValueList() { + return java.util.Collections.unmodifiableList(schemes_); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + public int getSchemesValue(int index) { + return schemes_.getInt(index); + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemesValue( + int index, int value) { + ensureSchemesIsMutable(); + schemes_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param value The enum numeric value on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemesValue(int value) { + ensureSchemesIsMutable(); + schemes_.addInt(value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol for the operation. Values MUST be from the list:
+     * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+     * schemes definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param values The enum numeric values on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemesValue( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (int value : values) { + schemes_.addInt(value); + } + onChanged(); + return this; + } + + private boolean deprecated_ ; + /** + *
+     * Declares this operation to be deprecated. Usage of the declared operation
+     * should be refrained. Default value is false.
+     * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return The deprecated. + */ + @java.lang.Override + public boolean getDeprecated() { + return deprecated_; + } + /** + *
+     * Declares this operation to be deprecated. Usage of the declared operation
+     * should be refrained. Default value is false.
+     * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @param value The deprecated to set. + * @return This builder for chaining. + */ + public Builder setDeprecated(boolean value) { + + deprecated_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Declares this operation to be deprecated. Usage of the declared operation
+     * should be refrained. Default value is false.
+     * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return This builder for chaining. + */ + public Builder clearDeprecated() { + bitField0_ = (bitField0_ & ~0x00000200); + deprecated_ = false; + onChanged(); + return this; + } + + private java.util.List security_ = + java.util.Collections.emptyList(); + private void ensureSecurityIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + security_ = new java.util.ArrayList(security_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> securityBuilder_; + + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List getSecurityList() { + if (securityBuilder_ == null) { + return java.util.Collections.unmodifiableList(security_); + } else { + return securityBuilder_.getMessageList(); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public int getSecurityCount() { + if (securityBuilder_ == null) { + return security_.size(); + } else { + return securityBuilder_.getCount(); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + if (securityBuilder_ == null) { + return security_.get(index); + } else { + return securityBuilder_.getMessage(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.set(index, value); + onChanged(); + } else { + securityBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.set(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(value); + onChanged(); + } else { + securityBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(index, value); + onChanged(); + } else { + securityBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addAllSecurity( + java.lang.Iterable values) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, security_); + onChanged(); + } else { + securityBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder clearSecurity() { + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + securityBuilder_.clear(); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder removeSecurity(int index) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.remove(index); + onChanged(); + } else { + securityBuilder_.remove(index); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder getSecurityBuilder( + int index) { + return getSecurityFieldBuilder().getBuilder(index); + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + if (securityBuilder_ == null) { + return security_.get(index); } else { + return securityBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityOrBuilderList() { + if (securityBuilder_ != null) { + return securityBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(security_); + } + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder() { + return getSecurityFieldBuilder().addBuilder( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder( + int index) { + return getSecurityFieldBuilder().addBuilder( + index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for this operation. The
+     * list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements). This
+     * definition overrides any declared top-level security. To remove a top-level
+     * security declaration, an empty array can be used.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityBuilderList() { + return getSecurityFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> + getSecurityFieldBuilder() { + if (securityBuilder_ == null) { + securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>( + security_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + security_ = null; + } + return securityBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000800; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000800; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000800; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters, com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder> parametersBuilder_; + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return Whether the parameters field is set. + */ + public boolean hasParameters() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return The parameters. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder setParameters(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + } else { + parametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder setParameters( + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder builderForValue) { + if (parametersBuilder_ == null) { + parameters_ = builderForValue.build(); + } else { + parametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder mergeParameters(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + parameters_ != null && + parameters_ != com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance()) { + getParametersBuilder().mergeFrom(value); + } else { + parameters_ = value; + } + } else { + parametersBuilder_.mergeFrom(value); + } + if (parameters_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public Builder clearParameters() { + bitField0_ = (bitField0_ & ~0x00001000); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder getParametersBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getParametersFieldBuilder().getBuilder(); + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance() : parameters_; + } + } + /** + *
+     * Custom parameters such as HTTP request headers.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+     * and https://swagger.io/specification/v2/#parameter-object.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters, com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters, com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder>( + getParameters(), + getParentForChildren(), + isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Operation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Operation(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Operation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Operation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java new file mode 100644 index 00000000..1f841e9d --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/OperationOrBuilder.java @@ -0,0 +1,541 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface OperationOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Operation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return A list containing the tags. + */ + java.util.List + getTagsList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @return The count of tags. + */ + int getTagsCount(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated string tags = 1 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString + getTagsBytes(int index); + + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The summary. + */ + java.lang.String getSummary(); + /** + *
+   * A short summary of what the operation does. For maximum readability in the
+   * swagger-ui, this field SHOULD be less than 120 characters.
+   * 
+ * + * string summary = 2 [json_name = "summary"]; + * @return The bytes for summary. + */ + com.google.protobuf.ByteString + getSummaryBytes(); + + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A verbose explanation of the operation behavior. GFM syntax can be used for
+   * rich text representation.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation for this operation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4 [json_name = "externalDocs"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The operationId. + */ + java.lang.String getOperationId(); + /** + *
+   * Unique string used to identify the operation. The id MUST be unique among
+   * all operations described in the API. Tools and libraries MAY use the
+   * operationId to uniquely identify an operation, therefore, it is recommended
+   * to follow common programming naming conventions.
+   * 
+ * + * string operation_id = 5 [json_name = "operationId"]; + * @return The bytes for operationId. + */ + com.google.protobuf.ByteString + getOperationIdBytes(); + + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + java.util.List + getConsumesList(); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + int getConsumesCount(); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + java.lang.String getConsumes(int index); + /** + *
+   * A list of MIME types the operation can consume. This overrides the consumes
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + com.google.protobuf.ByteString + getConsumesBytes(int index); + + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + java.util.List + getProducesList(); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + int getProducesCount(); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + java.lang.String getProduces(int index); + /** + *
+   * A list of MIME types the operation can produce. This overrides the produces
+   * definition at the OpenAPI Object. An empty value MAY be used to clear the
+   * global definition. Value MUST be as described under Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + com.google.protobuf.ByteString + getProducesBytes(int index); + + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + int getResponsesCount(); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + boolean containsResponses( + java.lang.String key); + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getResponses(); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + java.util.Map + getResponsesMap(); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue); + /** + *
+   * The list of possible responses as they are returned from executing this
+   * operation.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9 [json_name = "responses"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key); + + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + java.util.List getSchemesList(); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return The count of schemes. + */ + int getSchemesCount(); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + java.util.List + getSchemesValueList(); + /** + *
+   * The transfer protocol for the operation. Values MUST be from the list:
+   * "http", "https", "ws", "wss". The value overrides the OpenAPI Object
+   * schemes definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + int getSchemesValue(int index); + + /** + *
+   * Declares this operation to be deprecated. Usage of the declared operation
+   * should be refrained. Default value is false.
+   * 
+ * + * bool deprecated = 11 [json_name = "deprecated"]; + * @return The deprecated. + */ + boolean getDeprecated(); + + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityList(); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + int getSecurityCount(); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityOrBuilderList(); + /** + *
+   * A declaration of which security schemes are applied for this operation. The
+   * list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements). This
+   * definition overrides any declared top-level security. To remove a top-level
+   * security declaration, an empty array can be used.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 13 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); + + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + * @return The parameters. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getParameters(); + /** + *
+   * Custom parameters such as HTTP request headers.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/
+   * and https://swagger.io/specification/v2/#parameter-object.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14 [json_name = "parameters"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder getParametersOrBuilder(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java new file mode 100644 index 00000000..4ae022b7 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Parameters.java @@ -0,0 +1,850 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Parameters` is a representation of OpenAPI v2 specification's parameters object.
+ * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
+ * allow header parameters to be set here since we do not want users specifying custom non-header
+ * parameters beyond those inferred from the Protobuf schema.
+ * See: https://swagger.io/specification/v2/#parameter-object
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +public final class Parameters extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + ParametersOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Parameters.class.getName()); + } + // Use Parameters.newBuilder() to construct. + private Parameters(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Parameters() { + headers_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class); + } + + public static final int HEADERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List headers_; + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.List getHeadersList() { + return headers_; + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.List + getHeadersOrBuilderList() { + return headers_; + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public int getHeadersCount() { + return headers_.size(); + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) { + return headers_.get(index); + } + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( + int index) { + return headers_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < headers_.size(); i++) { + output.writeMessage(1, headers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < headers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, headers_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Parameters)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters other = (com.grpc.gateway.protoc_gen_openapiv2.options.Parameters) obj; + + if (!getHeadersList() + .equals(other.getHeadersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Parameters` is a representation of OpenAPI v2 specification's parameters object.
+   * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
+   * allow header parameters to be set here since we do not want users specifying custom non-header
+   * parameters beyond those inferred from the Protobuf schema.
+   * See: https://swagger.io/specification/v2/#parameter-object
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + com.grpc.gateway.protoc_gen_openapiv2.options.ParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.class, com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + } else { + headers_ = null; + headersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Parameters_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result = new com.grpc.gateway.protoc_gen_openapiv2.options.Parameters(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result) { + if (headersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + headers_ = java.util.Collections.unmodifiableList(headers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.headers_ = headers_; + } else { + result.headers_ = headersBuilder_.build(); + } + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Parameters) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Parameters)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Parameters other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Parameters.getDefaultInstance()) return this; + if (headersBuilder_ == null) { + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + } else { + if (!other.headers_.isEmpty()) { + if (headersBuilder_.isEmpty()) { + headersBuilder_.dispose(); + headersBuilder_ = null; + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + headersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getHeadersFieldBuilder() : null; + } else { + headersBuilder_.addAllMessages(other.headers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter m = + input.readMessage( + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.parser(), + extensionRegistry); + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(m); + } else { + headersBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List headers_ = + java.util.Collections.emptyList(); + private void ensureHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + headers_ = new java.util.ArrayList(headers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder> headersBuilder_; + + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public java.util.List getHeadersList() { + if (headersBuilder_ == null) { + return java.util.Collections.unmodifiableList(headers_); + } else { + return headersBuilder_.getMessageList(); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public int getHeadersCount() { + if (headersBuilder_ == null) { + return headers_.size(); + } else { + return headersBuilder_.getCount(); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessage(index); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder setHeaders( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + onChanged(); + } else { + headersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder setHeaders( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.set(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders(com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + } else { + headersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(index, value); + onChanged(); + } else { + headersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders( + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addHeaders( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder addAllHeaders( + java.lang.Iterable values) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, headers_); + onChanged(); + } else { + headersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder clearHeaders() { + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + headersBuilder_.clear(); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public Builder removeHeaders(int index) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.remove(index); + onChanged(); + } else { + headersBuilder_.remove(index); + } + return this; + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder getHeadersBuilder( + int index) { + return getHeadersFieldBuilder().getBuilder(index); + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( + int index) { + if (headersBuilder_ == null) { + return headers_.get(index); } else { + return headersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public java.util.List + getHeadersOrBuilderList() { + if (headersBuilder_ != null) { + return headersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headers_); + } + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder() { + return getHeadersFieldBuilder().addBuilder( + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()); + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder addHeadersBuilder( + int index) { + return getHeadersFieldBuilder().addBuilder( + index, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.getDefaultInstance()); + } + /** + *
+     * `Headers` is one or more HTTP header parameter.
+     * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + public java.util.List + getHeadersBuilderList() { + return getHeadersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder> + getHeadersFieldBuilder() { + if (headersBuilder_ == null) { + headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder>( + headers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + headers_ = null; + } + return headersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Parameters DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Parameters(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Parameters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java new file mode 100644 index 00000000..6a4274ab --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ParametersOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface ParametersOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Parameters) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + java.util.List + getHeadersList(); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter getHeaders(int index); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + int getHeadersCount(); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + java.util.List + getHeadersOrBuilderList(); + /** + *
+   * `Headers` is one or more HTTP header parameter.
+   * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1 [json_name = "headers"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameterOrBuilder getHeadersOrBuilder( + int index); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Response.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Response.java new file mode 100644 index 00000000..092f29c1 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Response.java @@ -0,0 +1,1835 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Response` is a representation of OpenAPI v2 specification's Response object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response} + */ +public final class Response extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Response) + ResponseOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Response.class.getName()); + } + // Use Response.newBuilder() to construct. + private Response(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Response() { + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetHeaders(); + case 4: + return internalGetExamples(); + case 5: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Response.class, com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder.class); + } + + private int bitField0_; + public static final int DESCRIPTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + private com.grpc.gateway.protoc_gen_openapiv2.options.Schema schema_; + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return The schema. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema() { + return schema_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } + + public static final int HEADERS_FIELD_NUMBER = 3; + private static final class HeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Header> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.grpc.gateway.protoc_gen_openapiv2.options.Header.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Header> headers_; + private com.google.protobuf.MapField + internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeaders().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXAMPLES_FIELD_NUMBER = 4; + private static final class ExamplesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> examples_; + private com.google.protobuf.MapField + internalGetExamples() { + if (examples_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExamplesDefaultEntryHolder.defaultEntry); + } + return examples_; + } + public int getExamplesCount() { + return internalGetExamples().getMap().size(); + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public boolean containsExamples( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExamples().getMap().containsKey(key); + } + /** + * Use {@link #getExamplesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExamples() { + return getExamplesMap(); + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.util.Map getExamplesMap() { + return internalGetExamples().getMap(); + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getExamplesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.lang.String getExamplesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXTENSIONS_FIELD_NUMBER = 5; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSchema()); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetHeaders(), + HeadersDefaultEntryHolder.defaultEntry, + 3); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExamples(), + ExamplesDefaultEntryHolder.defaultEntry, + 4); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 5); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSchema()); + } + for (java.util.Map.Entry entry + : internalGetHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry + headers__ = HeadersDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, headers__); + } + for (java.util.Map.Entry entry + : internalGetExamples().getMap().entrySet()) { + com.google.protobuf.MapEntry + examples__ = ExamplesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, examples__); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Response)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Response other = (com.grpc.gateway.protoc_gen_openapiv2.options.Response) obj; + + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema() + .equals(other.getSchema())) return false; + } + if (!internalGetHeaders().equals( + other.internalGetHeaders())) return false; + if (!internalGetExamples().equals( + other.internalGetExamples())) return false; + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + if (!internalGetHeaders().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeaders().hashCode(); + } + if (!internalGetExamples().getMap().isEmpty()) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetExamples().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Response prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Response` is a representation of OpenAPI v2 specification's Response object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Response) + com.grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetHeaders(); + case 4: + return internalGetExamples(); + case 5: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableHeaders(); + case 4: + return internalGetMutableExamples(); + case 5: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Response.class, com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getSchemaFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + internalGetMutableHeaders().clear(); + internalGetMutableExamples().clear(); + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Response result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Response result = new com.grpc.gateway.protoc_gen_openapiv2.options.Response(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Response result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schema_ = schemaBuilder_ == null + ? schema_ + : schemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.headers_ = internalGetHeaders().build(HeadersDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.examples_ = internalGetExamples(); + result.examples_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Response) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Response)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Response other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + internalGetMutableHeaders().mergeFrom( + other.internalGetHeaders()); + bitField0_ |= 0x00000004; + internalGetMutableExamples().mergeFrom( + other.internalGetExamples()); + bitField0_ |= 0x00000008; + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getSchemaFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + headers__ = input.readMessage( + HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableHeaders().ensureBuilderMap().put( + headers__.getKey(), headers__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + examples__ = input.readMessage( + ExamplesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExamples().getMutableMap().put( + examples__.getKey(), examples__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * `Description` is a short description of the response.
+     * GFM syntax can be used for rich text representation.
+     * 
+ * + * string description = 1 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.Schema schema_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Schema, com.grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder> schemaBuilder_; + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return The schema. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder setSchema(com.grpc.gateway.protoc_gen_openapiv2.options.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder setSchema( + com.grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder mergeSchema(com.grpc.gateway.protoc_gen_openapiv2.options.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + schema_ != null && + schema_ != com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + if (schema_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance() : schema_; + } + } + /** + *
+     * `Schema` optionally defines the structure of the response.
+     * If `Schema` is not provided, it means there is no content to the response.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Schema, com.grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Schema, com.grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder>( + getSchema(), + getParentForChildren(), + isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private static final class HeadersConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Header build(com.grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder val) { + if (val instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Header) { return (com.grpc.gateway.protoc_gen_openapiv2.options.Header) val; } + return ((com.grpc.gateway.protoc_gen_openapiv2.options.Header.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return HeadersDefaultEntryHolder.defaultEntry; + } + }; + private static final HeadersConverter headersConverter = new HeadersConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.Header, com.grpc.gateway.protoc_gen_openapiv2.options.Header.Builder> headers_; + private com.google.protobuf.MapFieldBuilder + internalGetHeaders() { + if (headers_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(headersConverter); + } + return headers_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableHeaders() { + if (headers_ == null) { + headers_ = new com.google.protobuf.MapFieldBuilder<>(headersConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return headers_; + } + public int getHeadersCount() { + return internalGetHeaders().ensureBuilderMap().size(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeaders().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getImmutableMap(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableHeaders().ensureBuilderMap(); + return map.containsKey(key) ? headersConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableHeaders().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return headersConverter.build(map.get(key)); + } + public Builder clearHeaders() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableHeaders().clear(); + return this; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public Builder removeHeaders( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableHeaders().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHeaders() { + bitField0_ |= 0x00000004; + return internalGetMutableHeaders().ensureMessageMap(); + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public Builder putHeaders( + java.lang.String key, + com.grpc.gateway.protoc_gen_openapiv2.options.Header value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableHeaders().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public Builder putAllHeaders( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableHeaders().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * `Headers` A list of headers that are sent with the response.
+     * `Header` name is expected to be a string in the canonical format of the MIME header key
+     * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Header.Builder putHeadersBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableHeaders().ensureBuilderMap(); + com.grpc.gateway.protoc_gen_openapiv2.options.HeaderOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.grpc.gateway.protoc_gen_openapiv2.options.Header.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Header) { + entry = ((com.grpc.gateway.protoc_gen_openapiv2.options.Header) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.grpc.gateway.protoc_gen_openapiv2.options.Header.Builder) entry; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> examples_; + private com.google.protobuf.MapField + internalGetExamples() { + if (examples_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExamplesDefaultEntryHolder.defaultEntry); + } + return examples_; + } + private com.google.protobuf.MapField + internalGetMutableExamples() { + if (examples_ == null) { + examples_ = com.google.protobuf.MapField.newMapField( + ExamplesDefaultEntryHolder.defaultEntry); + } + if (!examples_.isMutable()) { + examples_ = examples_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return examples_; + } + public int getExamplesCount() { + return internalGetExamples().getMap().size(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public boolean containsExamples( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExamples().getMap().containsKey(key); + } + /** + * Use {@link #getExamplesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExamples() { + return getExamplesMap(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.util.Map getExamplesMap() { + return internalGetExamples().getMap(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getExamplesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + @java.lang.Override + public java.lang.String getExamplesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExamples().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearExamples() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableExamples().getMutableMap() + .clear(); + return this; + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + public Builder removeExamples( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExamples().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExamples() { + bitField0_ |= 0x00000008; + return internalGetMutableExamples().getMutableMap(); + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + public Builder putExamples( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExamples().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * `Examples` gives per-mimetype response examples.
+     * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+     * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + public Builder putAllExamples( + java.util.Map values) { + internalGetMutableExamples().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000010; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000010; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Response) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Response) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Response DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Response(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Response parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java new file mode 100644 index 00000000..2b53d9f9 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ResponseOrBuilder.java @@ -0,0 +1,250 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface ResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Response) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * `Description` is a short description of the response.
+   * GFM syntax can be used for rich text representation.
+   * 
+ * + * string description = 1 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return Whether the schema field is set. + */ + boolean hasSchema(); + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + * @return The schema. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Schema getSchema(); + /** + *
+   * `Schema` optionally defines the structure of the response.
+   * If `Schema` is not provided, it means there is no content to the response.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2 [json_name = "schema"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder getSchemaOrBuilder(); + + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + int getHeadersCount(); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + boolean containsHeaders( + java.lang.String key); + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHeaders(); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + java.util.Map + getHeadersMap(); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Header defaultValue); + /** + *
+   * `Headers` A list of headers that are sent with the response.
+   * `Header` name is expected to be a string in the canonical format of the MIME header key
+   * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3 [json_name = "headers"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Header getHeadersOrThrow( + java.lang.String key); + + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + int getExamplesCount(); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + boolean containsExamples( + java.lang.String key); + /** + * Use {@link #getExamplesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExamples(); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + java.util.Map + getExamplesMap(); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + /* nullable */ +java.lang.String getExamplesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * `Examples` gives per-mimetype response examples.
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
+   * 
+ * + * map<string, string> examples = 4 [json_name = "examples"]; + */ + java.lang.String getExamplesOrThrow( + java.lang.String key); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 5 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Schema.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Schema.java new file mode 100644 index 00000000..a9fbbe8c --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Schema.java @@ -0,0 +1,1265 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Schema` is a representation of OpenAPI v2 specification's Schema object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +public final class Schema extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema) + SchemaOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Schema.class.getName()); + } + // Use Schema.newBuilder() to construct. + private Schema(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Schema() { + discriminator_ = ""; + example_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Schema.class, com.grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder.class); + } + + private int bitField0_; + public static final int JSON_SCHEMA_FIELD_NUMBER = 1; + private com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema jsonSchema_; + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return Whether the jsonSchema field is set. + */ + @java.lang.Override + public boolean hasJsonSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return The jsonSchema. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema() { + return jsonSchema_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder() { + return jsonSchema_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } + + public static final int DISCRIMINATOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object discriminator_ = ""; + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The discriminator. + */ + @java.lang.Override + public java.lang.String getDiscriminator() { + java.lang.Object ref = discriminator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discriminator_ = s; + return s; + } + } + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The bytes for discriminator. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscriminatorBytes() { + java.lang.Object ref = discriminator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discriminator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_ONLY_FIELD_NUMBER = 3; + private boolean readOnly_ = false; + /** + *
+   * Relevant only for Schema "properties" definitions. Declares the property as
+   * "read only". This means that it MAY be sent as part of a response but MUST
+   * NOT be sent as part of the request. Properties marked as readOnly being
+   * true SHOULD NOT be in the required list of the defined schema. Default
+   * value is false.
+   * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 5; + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int EXAMPLE_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object example_ = ""; + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The example. + */ + @java.lang.Override + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } + } + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The bytes for example. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getJsonSchema()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(discriminator_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, discriminator_); + } + if (readOnly_ != false) { + output.writeBool(3, readOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(example_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, example_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getJsonSchema()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(discriminator_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, discriminator_); + } + if (readOnly_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, readOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getExternalDocs()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(example_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, example_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Schema)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Schema other = (com.grpc.gateway.protoc_gen_openapiv2.options.Schema) obj; + + if (hasJsonSchema() != other.hasJsonSchema()) return false; + if (hasJsonSchema()) { + if (!getJsonSchema() + .equals(other.getJsonSchema())) return false; + } + if (!getDiscriminator() + .equals(other.getDiscriminator())) return false; + if (getReadOnly() + != other.getReadOnly()) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!getExample() + .equals(other.getExample())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJsonSchema()) { + hash = (37 * hash) + JSON_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getJsonSchema().hashCode(); + } + hash = (37 * hash) + DISCRIMINATOR_FIELD_NUMBER; + hash = (53 * hash) + getDiscriminator().hashCode(); + hash = (37 * hash) + READ_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReadOnly()); + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Schema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Schema` is a representation of OpenAPI v2 specification's Schema object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema) + com.grpc.gateway.protoc_gen_openapiv2.options.SchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Schema.class, com.grpc.gateway.protoc_gen_openapiv2.options.Schema.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Schema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getJsonSchemaFieldBuilder(); + getExternalDocsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + jsonSchema_ = null; + if (jsonSchemaBuilder_ != null) { + jsonSchemaBuilder_.dispose(); + jsonSchemaBuilder_ = null; + } + discriminator_ = ""; + readOnly_ = false; + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + example_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Schema build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Schema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Schema buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Schema result = new com.grpc.gateway.protoc_gen_openapiv2.options.Schema(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Schema result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.jsonSchema_ = jsonSchemaBuilder_ == null + ? jsonSchema_ + : jsonSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.discriminator_ = discriminator_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.readOnly_ = readOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.example_ = example_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Schema) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Schema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Schema other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Schema.getDefaultInstance()) return this; + if (other.hasJsonSchema()) { + mergeJsonSchema(other.getJsonSchema()); + } + if (!other.getDiscriminator().isEmpty()) { + discriminator_ = other.discriminator_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getReadOnly() != false) { + setReadOnly(other.getReadOnly()); + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + if (!other.getExample().isEmpty()) { + example_ = other.example_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getJsonSchemaFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + discriminator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + readOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 42: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: { + example_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema jsonSchema_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder> jsonSchemaBuilder_; + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return Whether the jsonSchema field is set. + */ + public boolean hasJsonSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return The jsonSchema. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema() { + if (jsonSchemaBuilder_ == null) { + return jsonSchema_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } else { + return jsonSchemaBuilder_.getMessage(); + } + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder setJsonSchema(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema value) { + if (jsonSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jsonSchema_ = value; + } else { + jsonSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder setJsonSchema( + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder builderForValue) { + if (jsonSchemaBuilder_ == null) { + jsonSchema_ = builderForValue.build(); + } else { + jsonSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder mergeJsonSchema(com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema value) { + if (jsonSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + jsonSchema_ != null && + jsonSchema_ != com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance()) { + getJsonSchemaBuilder().mergeFrom(value); + } else { + jsonSchema_ = value; + } + } else { + jsonSchemaBuilder_.mergeFrom(value); + } + if (jsonSchema_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public Builder clearJsonSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + jsonSchema_ = null; + if (jsonSchemaBuilder_ != null) { + jsonSchemaBuilder_.dispose(); + jsonSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder getJsonSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getJsonSchemaFieldBuilder().getBuilder(); + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder() { + if (jsonSchemaBuilder_ != null) { + return jsonSchemaBuilder_.getMessageOrBuilder(); + } else { + return jsonSchema_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.getDefaultInstance() : jsonSchema_; + } + } + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder> + getJsonSchemaFieldBuilder() { + if (jsonSchemaBuilder_ == null) { + jsonSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder>( + getJsonSchema(), + getParentForChildren(), + isClean()); + jsonSchema_ = null; + } + return jsonSchemaBuilder_; + } + + private java.lang.Object discriminator_ = ""; + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The discriminator. + */ + public java.lang.String getDiscriminator() { + java.lang.Object ref = discriminator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discriminator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The bytes for discriminator. + */ + public com.google.protobuf.ByteString + getDiscriminatorBytes() { + java.lang.Object ref = discriminator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discriminator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @param value The discriminator to set. + * @return This builder for chaining. + */ + public Builder setDiscriminator( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + discriminator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return This builder for chaining. + */ + public Builder clearDiscriminator() { + discriminator_ = getDefaultInstance().getDiscriminator(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Adds support for polymorphism. The discriminator is the schema property
+     * name that is used to differentiate between other schema that inherit this
+     * schema. The property name used MUST be defined at this schema and it MUST
+     * be in the required property list. When used, the value MUST be the name of
+     * this schema or any schema that inherits it.
+     * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @param value The bytes for discriminator to set. + * @return This builder for chaining. + */ + public Builder setDiscriminatorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + discriminator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean readOnly_ ; + /** + *
+     * Relevant only for Schema "properties" definitions. Declares the property as
+     * "read only". This means that it MAY be sent as part of a response but MUST
+     * NOT be sent as part of the request. Properties marked as readOnly being
+     * true SHOULD NOT be in the required list of the defined schema. Default
+     * value is false.
+     * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return The readOnly. + */ + @java.lang.Override + public boolean getReadOnly() { + return readOnly_; + } + /** + *
+     * Relevant only for Schema "properties" definitions. Declares the property as
+     * "read only". This means that it MAY be sent as part of a response but MUST
+     * NOT be sent as part of the request. Properties marked as readOnly being
+     * true SHOULD NOT be in the required list of the defined schema. Default
+     * value is false.
+     * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @param value The readOnly to set. + * @return This builder for chaining. + */ + public Builder setReadOnly(boolean value) { + + readOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Relevant only for Schema "properties" definitions. Declares the property as
+     * "read only". This means that it MAY be sent as part of a response but MUST
+     * NOT be sent as part of the request. Properties marked as readOnly being
+     * true SHOULD NOT be in the required list of the defined schema. Default
+     * value is false.
+     * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return This builder for chaining. + */ + public Builder clearReadOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + readOnly_ = false; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + externalDocs_ != null && + externalDocs_ != com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000008); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation for this schema.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private java.lang.Object example_ = ""; + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @return The example. + */ + public java.lang.String getExample() { + java.lang.Object ref = example_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + example_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @return The bytes for example. + */ + public com.google.protobuf.ByteString + getExampleBytes() { + java.lang.Object ref = example_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + example_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @param value The example to set. + * @return This builder for chaining. + */ + public Builder setExample( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + example_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @return This builder for chaining. + */ + public Builder clearExample() { + example_ = getDefaultInstance().getExample(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A free-form property to include an example of an instance for this schema in JSON.
+     * This is copied verbatim to the output.
+     * 
+ * + * string example = 6 [json_name = "example"]; + * @param value The bytes for example to set. + * @return This builder for chaining. + */ + public Builder setExampleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + example_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Schema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Schema(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Schema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java new file mode 100644 index 00000000..ad7b8e78 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SchemaOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface SchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Schema) + com.google.protobuf.MessageOrBuilder { + + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return Whether the jsonSchema field is set. + */ + boolean hasJsonSchema(); + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + * @return The jsonSchema. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema getJsonSchema(); + /** + * .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1 [json_name = "jsonSchema"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaOrBuilder getJsonSchemaOrBuilder(); + + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The discriminator. + */ + java.lang.String getDiscriminator(); + /** + *
+   * Adds support for polymorphism. The discriminator is the schema property
+   * name that is used to differentiate between other schema that inherit this
+   * schema. The property name used MUST be defined at this schema and it MUST
+   * be in the required property list. When used, the value MUST be the name of
+   * this schema or any schema that inherits it.
+   * 
+ * + * string discriminator = 2 [json_name = "discriminator"]; + * @return The bytes for discriminator. + */ + com.google.protobuf.ByteString + getDiscriminatorBytes(); + + /** + *
+   * Relevant only for Schema "properties" definitions. Declares the property as
+   * "read only". This means that it MAY be sent as part of a response but MUST
+   * NOT be sent as part of the request. Properties marked as readOnly being
+   * true SHOULD NOT be in the required list of the defined schema. Default
+   * value is false.
+   * 
+ * + * bool read_only = 3 [json_name = "readOnly"]; + * @return The readOnly. + */ + boolean getReadOnly(); + + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation for this schema.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5 [json_name = "externalDocs"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The example. + */ + java.lang.String getExample(); + /** + *
+   * A free-form property to include an example of an instance for this schema in JSON.
+   * This is copied verbatim to the output.
+   * 
+ * + * string example = 6 [json_name = "example"]; + * @return The bytes for example. + */ + com.google.protobuf.ByteString + getExampleBytes(); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java new file mode 100644 index 00000000..2a9ec119 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scheme.java @@ -0,0 +1,156 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * Scheme describes the schemes supported by the OpenAPI Swagger
+ * and Operation objects.
+ * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.Scheme} + */ +public enum Scheme + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * HTTP = 1; + */ + HTTP(1), + /** + * HTTPS = 2; + */ + HTTPS(2), + /** + * WS = 3; + */ + WS(3), + /** + * WSS = 4; + */ + WSS(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Scheme.class.getName()); + } + /** + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * HTTP = 1; + */ + public static final int HTTP_VALUE = 1; + /** + * HTTPS = 2; + */ + public static final int HTTPS_VALUE = 2; + /** + * WS = 3; + */ + public static final int WS_VALUE = 3; + /** + * WSS = 4; + */ + public static final int WSS_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scheme valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scheme forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return HTTP; + case 2: return HTTPS; + case 3: return WS; + case 4: return WSS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Scheme> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scheme findValueByNumber(int number) { + return Scheme.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.getDescriptor().getEnumTypes().get(0); + } + + private static final Scheme[] VALUES = values(); + + public static Scheme valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scheme(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.Scheme) +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java new file mode 100644 index 00000000..dda3077f --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Scopes.java @@ -0,0 +1,715 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
+ *
+ * Lists the available scopes for an OAuth2 security scheme.
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +public final class Scopes extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + ScopesOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Scopes.class.getName()); + } + // Use Scopes.newBuilder() to construct. + private Scopes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Scopes() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetScope(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private static final class ScopeDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_ScopeEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scope_; + private com.google.protobuf.MapField + internalGetScope() { + if (scope_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopeDefaultEntryHolder.defaultEntry); + } + return scope_; + } + public int getScopeCount() { + return internalGetScope().getMap().size(); + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public boolean containsScope( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScope().getMap().containsKey(key); + } + /** + * Use {@link #getScopeMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScope() { + return getScopeMap(); + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.util.Map getScopeMap() { + return internalGetScope().getMap(); + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopeOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.lang.String getScopeOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetScope(), + ScopeDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetScope().getMap().entrySet()) { + com.google.protobuf.MapEntry + scope__ = ScopeDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, scope__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Scopes)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes other = (com.grpc.gateway.protoc_gen_openapiv2.options.Scopes) obj; + + if (!internalGetScope().equals( + other.internalGetScope())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetScope().getMap().isEmpty()) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + internalGetScope().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
+   *
+   * Lists the available scopes for an OAuth2 security scheme.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetScope(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableScope(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.class, com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableScope().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Scopes_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes result = new com.grpc.gateway.protoc_gen_openapiv2.options.Scopes(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scope_ = internalGetScope(); + result.scope_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Scopes) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Scopes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance()) return this; + internalGetMutableScope().mergeFrom( + other.internalGetScope()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + scope__ = input.readMessage( + ScopeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableScope().getMutableMap().put( + scope__.getKey(), scope__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scope_; + private com.google.protobuf.MapField + internalGetScope() { + if (scope_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopeDefaultEntryHolder.defaultEntry); + } + return scope_; + } + private com.google.protobuf.MapField + internalGetMutableScope() { + if (scope_ == null) { + scope_ = com.google.protobuf.MapField.newMapField( + ScopeDefaultEntryHolder.defaultEntry); + } + if (!scope_.isMutable()) { + scope_ = scope_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return scope_; + } + public int getScopeCount() { + return internalGetScope().getMap().size(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public boolean containsScope( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScope().getMap().containsKey(key); + } + /** + * Use {@link #getScopeMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScope() { + return getScopeMap(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.util.Map getScopeMap() { + return internalGetScope().getMap(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopeOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + @java.lang.Override + public java.lang.String getScopeOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScope().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableScope().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + public Builder removeScope( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableScope().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableScope() { + bitField0_ |= 0x00000001; + return internalGetMutableScope().getMutableMap(); + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + public Builder putScope( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableScope().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Maps between a name of a scope to a short description of it (as the value
+     * of the property).
+     * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + public Builder putAllScope( + java.util.Map values) { + internalGetMutableScope().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Scopes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Scopes(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Scopes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java new file mode 100644 index 00000000..c86fe8d8 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/ScopesOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface ScopesOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Scopes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + int getScopeCount(); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + boolean containsScope( + java.lang.String key); + /** + * Use {@link #getScopeMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getScope(); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + java.util.Map + getScopeMap(); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + /* nullable */ +java.lang.String getScopeOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Maps between a name of a scope to a short description of it (as the value
+   * of the property).
+   * 
+ * + * map<string, string> scope = 1 [json_name = "scope"]; + */ + java.lang.String getScopeOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java new file mode 100644 index 00000000..76820824 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.java @@ -0,0 +1,753 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `SecurityDefinitions` is a representation of OpenAPI v2 specification's
+ * Security Definitions object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
+ *
+ * A declaration of the security schemes available to be used in the
+ * specification. This does not enforce the security schemes on the operations
+ * and only serves to provide the relevant details for each scheme.
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +public final class SecurityDefinitions extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + SecurityDefinitionsOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SecurityDefinitions.class.getName()); + } + // Use SecurityDefinitions.newBuilder() to construct. + private SecurityDefinitions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SecurityDefinitions() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurity(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class); + } + + public static final int SECURITY_FIELD_NUMBER = 1; + private static final class SecurityDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_SecurityEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security_; + private com.google.protobuf.MapField + internalGetSecurity() { + if (security_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecurityDefaultEntryHolder.defaultEntry); + } + return security_; + } + public int getSecurityCount() { + return internalGetSecurity().getMap().size(); + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public boolean containsSecurity( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurity().getMap().containsKey(key); + } + /** + * Use {@link #getSecurityMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurity() { + return getSecurityMap(); + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public java.util.Map getSecurityMap() { + return internalGetSecurity().getMap(); + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurity().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurity().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetSecurity(), + SecurityDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetSecurity().getMap().entrySet()) { + com.google.protobuf.MapEntry + security__ = SecurityDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, security__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other = (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) obj; + + if (!internalGetSecurity().equals( + other.internalGetSecurity())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetSecurity().getMap().isEmpty()) { + hash = (37 * hash) + SECURITY_FIELD_NUMBER; + hash = (53 * hash) + internalGetSecurity().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `SecurityDefinitions` is a representation of OpenAPI v2 specification's
+   * Security Definitions object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
+   *
+   * A declaration of the security schemes available to be used in the
+   * specification. This does not enforce the security schemes on the operations
+   * and only serves to provide the relevant details for each scheme.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurity(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableSecurity(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableSecurity().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions build() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.security_ = internalGetSecurity().build(SecurityDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance()) return this; + internalGetMutableSecurity().mergeFrom( + other.internalGetSecurity()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + security__ = input.readMessage( + SecurityDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSecurity().ensureBuilderMap().put( + security__.getKey(), security__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class SecurityConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme build(com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder val) { + if (val instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { return (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) val; } + return ((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return SecurityDefaultEntryHolder.defaultEntry; + } + }; + private static final SecurityConverter securityConverter = new SecurityConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder> security_; + private com.google.protobuf.MapFieldBuilder + internalGetSecurity() { + if (security_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(securityConverter); + } + return security_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableSecurity() { + if (security_ == null) { + security_ = new com.google.protobuf.MapFieldBuilder<>(securityConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return security_; + } + public int getSecurityCount() { + return internalGetSecurity().ensureBuilderMap().size(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public boolean containsSecurity( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurity().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getSecurityMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurity() { + return getSecurityMap(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public java.util.Map getSecurityMap() { + return internalGetSecurity().getImmutableMap(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurity().ensureBuilderMap(); + return map.containsKey(key) ? securityConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurity().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return securityConverter.build(map.get(key)); + } + public Builder clearSecurity() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableSecurity().clear(); + return this; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public Builder removeSecurity( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableSecurity().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSecurity() { + bitField0_ |= 0x00000001; + return internalGetMutableSecurity().ensureMessageMap(); + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public Builder putSecurity( + java.lang.String key, + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableSecurity().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public Builder putAllSecurity( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableSecurity().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * A single security scheme definition, mapping a "name" to the scheme it
+     * defines.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder putSecurityBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableSecurity().ensureBuilderMap(); + com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { + entry = ((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityDefinitions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java new file mode 100644 index 00000000..1bd8f7e8 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitionsOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface SecurityDefinitionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + int getSecurityCount(); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + boolean containsSecurity( + java.lang.String key); + /** + * Use {@link #getSecurityMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSecurity(); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + java.util.Map + getSecurityMap(); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme defaultValue); + /** + *
+   * A single security scheme definition, mapping a "name" to the scheme it
+   * defines.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1 [json_name = "security"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getSecurityOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java new file mode 100644 index 00000000..10bcd423 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.java @@ -0,0 +1,1371 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `SecurityRequirement` is a representation of OpenAPI v2 specification's
+ * Security Requirement object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
+ *
+ * Lists the required security schemes to execute this operation. The object can
+ * have multiple security schemes declared in it which are all required (that
+ * is, there is a logical AND between the schemes).
+ *
+ * The name used for each property MUST correspond to a security scheme
+ * declared in the Security Definitions.
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +public final class SecurityRequirement extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + SecurityRequirementOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SecurityRequirement.class.getName()); + } + // Use SecurityRequirement.newBuilder() to construct. + private SecurityRequirement(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SecurityRequirement() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurityRequirement(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder.class); + } + + public interface SecurityRequirementValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return A list containing the scope. + */ + java.util.List + getScopeList(); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return The count of scope. + */ + int getScopeCount(); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + java.lang.String getScope(int index); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + com.google.protobuf.ByteString + getScopeBytes(int index); + } + /** + *
+   * If the security scheme is of type "oauth2", then the value is a list of
+   * scope names required for the execution. For other security scheme types,
+   * the array MUST be empty.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ + public static final class SecurityRequirementValue extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + SecurityRequirementValueOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SecurityRequirementValue.class.getName()); + } + // Use SecurityRequirementValue.newBuilder() to construct. + private SecurityRequirementValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SecurityRequirementValue() { + scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return A list containing the scope. + */ + public com.google.protobuf.ProtocolStringList + getScopeList() { + return scope_; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return The count of scope. + */ + public int getScopeCount() { + return scope_.size(); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + public com.google.protobuf.ByteString + getScopeBytes(int index) { + return scope_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < scope_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, scope_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < scope_.size(); i++) { + dataSize += computeStringSizeNoTag(scope_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopeList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue other = (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) obj; + + if (!getScopeList() + .equals(other.getScopeList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getScopeCount() > 0) { + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScopeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * If the security scheme is of type "oauth2", then the value is a list of
+     * scope names required for the execution. For other security scheme types,
+     * the array MUST be empty.
+     * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue build() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + scope_.makeImmutable(); + result.scope_ = scope_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance()) return this; + if (!other.scope_.isEmpty()) { + if (scope_.isEmpty()) { + scope_ = other.scope_; + bitField0_ |= 0x00000001; + } else { + ensureScopeIsMutable(); + scope_.addAll(other.scope_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopeIsMutable(); + scope_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureScopeIsMutable() { + if (!scope_.isModifiable()) { + scope_ = new com.google.protobuf.LazyStringArrayList(scope_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return A list containing the scope. + */ + public com.google.protobuf.ProtocolStringList + getScopeList() { + scope_.makeImmutable(); + return scope_; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return The count of scope. + */ + public int getScopeCount() { + return scope_.size(); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the element to return. + * @return The scope at the given index. + */ + public java.lang.String getScope(int index) { + return scope_.get(index); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index of the value to return. + * @return The bytes of the scope at the given index. + */ + public com.google.protobuf.ByteString + getScopeBytes(int index) { + return scope_.getByteString(index); + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param index The index to set the value at. + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureScopeIsMutable(); + scope_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param value The scope to add. + * @return This builder for chaining. + */ + public Builder addScope( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureScopeIsMutable(); + scope_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param values The scope to add. + * @return This builder for chaining. + */ + public Builder addAllScope( + java.lang.Iterable values) { + ensureScopeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, scope_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string scope = 1 [json_name = "scope"]; + * @param value The bytes of the scope to add. + * @return This builder for chaining. + */ + public Builder addScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureScopeIsMutable(); + scope_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityRequirementValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SECURITY_REQUIREMENT_FIELD_NUMBER = 1; + private static final class SecurityRequirementDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> securityRequirement_; + private com.google.protobuf.MapField + internalGetSecurityRequirement() { + if (securityRequirement_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecurityRequirementDefaultEntryHolder.defaultEntry); + } + return securityRequirement_; + } + public int getSecurityRequirementCount() { + return internalGetSecurityRequirement().getMap().size(); + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public boolean containsSecurityRequirement( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurityRequirement().getMap().containsKey(key); + } + /** + * Use {@link #getSecurityRequirementMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurityRequirement() { + return getSecurityRequirementMap(); + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public java.util.Map getSecurityRequirementMap() { + return internalGetSecurityRequirement().getMap(); + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurityRequirement().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecurityRequirement().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetSecurityRequirement(), + SecurityRequirementDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetSecurityRequirement().getMap().entrySet()) { + com.google.protobuf.MapEntry + securityRequirement__ = SecurityRequirementDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, securityRequirement__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement other = (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) obj; + + if (!internalGetSecurityRequirement().equals( + other.internalGetSecurityRequirement())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetSecurityRequirement().getMap().isEmpty()) { + hash = (37 * hash) + SECURITY_REQUIREMENT_FIELD_NUMBER; + hash = (53 * hash) + internalGetSecurityRequirement().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `SecurityRequirement` is a representation of OpenAPI v2 specification's
+   * Security Requirement object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
+   *
+   * Lists the required security schemes to execute this operation. The object can
+   * have multiple security schemes declared in it which are all required (that
+   * is, there is a logical AND between the schemes).
+   *
+   * The name used for each property MUST correspond to a security scheme
+   * declared in the Security Definitions.
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecurityRequirement(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableSecurityRequirement(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableSecurityRequirement().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement build() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.securityRequirement_ = internalGetSecurityRequirement().build(SecurityRequirementDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()) return this; + internalGetMutableSecurityRequirement().mergeFrom( + other.internalGetSecurityRequirement()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + securityRequirement__ = input.readMessage( + SecurityRequirementDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSecurityRequirement().ensureBuilderMap().put( + securityRequirement__.getKey(), securityRequirement__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private static final class SecurityRequirementConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue build(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder val) { + if (val instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { return (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) val; } + return ((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return SecurityRequirementDefaultEntryHolder.defaultEntry; + } + }; + private static final SecurityRequirementConverter securityRequirementConverter = new SecurityRequirementConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder> securityRequirement_; + private com.google.protobuf.MapFieldBuilder + internalGetSecurityRequirement() { + if (securityRequirement_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(securityRequirementConverter); + } + return securityRequirement_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableSecurityRequirement() { + if (securityRequirement_ == null) { + securityRequirement_ = new com.google.protobuf.MapFieldBuilder<>(securityRequirementConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return securityRequirement_; + } + public int getSecurityRequirementCount() { + return internalGetSecurityRequirement().ensureBuilderMap().size(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public boolean containsSecurityRequirement( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecurityRequirement().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getSecurityRequirementMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecurityRequirement() { + return getSecurityRequirementMap(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public java.util.Map getSecurityRequirementMap() { + return internalGetSecurityRequirement().getImmutableMap(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurityRequirement().ensureBuilderMap(); + return map.containsKey(key) ? securityRequirementConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableSecurityRequirement().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return securityRequirementConverter.build(map.get(key)); + } + public Builder clearSecurityRequirement() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableSecurityRequirement().clear(); + return this; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public Builder removeSecurityRequirement( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableSecurityRequirement().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSecurityRequirement() { + bitField0_ |= 0x00000001; + return internalGetMutableSecurityRequirement().ensureMessageMap(); + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public Builder putSecurityRequirement( + java.lang.String key, + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableSecurityRequirement().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public Builder putAllSecurityRequirement( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableSecurityRequirement().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Each name must correspond to a security scheme which is declared in
+     * the Security Definitions. If the security scheme is of type "oauth2",
+     * then the value is a list of scope names required for the execution.
+     * For other security scheme types, the array MUST be empty.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder putSecurityRequirementBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableSecurityRequirement().ensureBuilderMap(); + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) { + entry = ((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityRequirement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java new file mode 100644 index 00000000..dbb7bce8 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirementOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface SecurityRequirementOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + int getSecurityRequirementCount(); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + boolean containsSecurityRequirement( + java.lang.String key); + /** + * Use {@link #getSecurityRequirementMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSecurityRequirement(); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + java.util.Map + getSecurityRequirementMap(); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue defaultValue); + /** + *
+   * Each name must correspond to a security scheme which is declared in
+   * the Security Definitions. If the security scheme is of type "oauth2",
+   * then the value is a list of scope names required for the execution.
+   * For other security scheme types, the array MUST be empty.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1 [json_name = "securityRequirement"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue getSecurityRequirementOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java new file mode 100644 index 00000000..2b2eebc1 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.java @@ -0,0 +1,2531 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `SecurityScheme` is a representation of OpenAPI v2 specification's
+ * Security Scheme object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
+ *
+ * Allows the definition of a security scheme that can be used by the
+ * operations. Supported schemes are basic authentication, an API key (either as
+ * a header or as a query parameter) and OAuth2's common flows (implicit,
+ * password, application and access code).
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ +public final class SecurityScheme extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + SecuritySchemeOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SecurityScheme.class.getName()); + } + // Use SecurityScheme.newBuilder() to construct. + private SecurityScheme(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SecurityScheme() { + type_ = 0; + description_ = ""; + name_ = ""; + in_ = 0; + flow_ = 0; + authorizationUrl_ = ""; + tokenUrl_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder.class); + } + + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * TYPE_INVALID = 0; + */ + TYPE_INVALID(0), + /** + * TYPE_BASIC = 1; + */ + TYPE_BASIC(1), + /** + * TYPE_API_KEY = 2; + */ + TYPE_API_KEY(2), + /** + * TYPE_OAUTH2 = 3; + */ + TYPE_OAUTH2(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Type.class.getName()); + } + /** + * TYPE_INVALID = 0; + */ + public static final int TYPE_INVALID_VALUE = 0; + /** + * TYPE_BASIC = 1; + */ + public static final int TYPE_BASIC_VALUE = 1; + /** + * TYPE_API_KEY = 2; + */ + public static final int TYPE_API_KEY_VALUE = 2; + /** + * TYPE_OAUTH2 = 3; + */ + public static final int TYPE_OAUTH2_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_INVALID; + case 1: return TYPE_BASIC; + case 2: return TYPE_API_KEY; + case 3: return TYPE_OAUTH2; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type) + } + + /** + *
+   * The location of the API key. Valid values are "query" or "header".
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} + */ + public enum In + implements com.google.protobuf.ProtocolMessageEnum { + /** + * IN_INVALID = 0; + */ + IN_INVALID(0), + /** + * IN_QUERY = 1; + */ + IN_QUERY(1), + /** + * IN_HEADER = 2; + */ + IN_HEADER(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + In.class.getName()); + } + /** + * IN_INVALID = 0; + */ + public static final int IN_INVALID_VALUE = 0; + /** + * IN_QUERY = 1; + */ + public static final int IN_QUERY_VALUE = 1; + /** + * IN_HEADER = 2; + */ + public static final int IN_HEADER_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static In valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static In forNumber(int value) { + switch (value) { + case 0: return IN_INVALID; + case 1: return IN_QUERY; + case 2: return IN_HEADER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + In> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public In findValueByNumber(int number) { + return In.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(1); + } + + private static final In[] VALUES = values(); + + public static In valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private In(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In) + } + + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * 
+ * + * Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} + */ + public enum Flow + implements com.google.protobuf.ProtocolMessageEnum { + /** + * FLOW_INVALID = 0; + */ + FLOW_INVALID(0), + /** + * FLOW_IMPLICIT = 1; + */ + FLOW_IMPLICIT(1), + /** + * FLOW_PASSWORD = 2; + */ + FLOW_PASSWORD(2), + /** + * FLOW_APPLICATION = 3; + */ + FLOW_APPLICATION(3), + /** + * FLOW_ACCESS_CODE = 4; + */ + FLOW_ACCESS_CODE(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Flow.class.getName()); + } + /** + * FLOW_INVALID = 0; + */ + public static final int FLOW_INVALID_VALUE = 0; + /** + * FLOW_IMPLICIT = 1; + */ + public static final int FLOW_IMPLICIT_VALUE = 1; + /** + * FLOW_PASSWORD = 2; + */ + public static final int FLOW_PASSWORD_VALUE = 2; + /** + * FLOW_APPLICATION = 3; + */ + public static final int FLOW_APPLICATION_VALUE = 3; + /** + * FLOW_ACCESS_CODE = 4; + */ + public static final int FLOW_ACCESS_CODE_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Flow valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Flow forNumber(int value) { + switch (value) { + case 0: return FLOW_INVALID; + case 1: return FLOW_IMPLICIT; + case 2: return FLOW_PASSWORD; + case 3: return FLOW_APPLICATION; + case 4: return FLOW_ACCESS_CODE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Flow> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Flow findValueByNumber(int number) { + return Flow.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDescriptor().getEnumTypes().get(2); + } + + private static final Flow[] VALUES = values(); + + public static Flow valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Flow(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type result = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.forNumber(type_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IN_FIELD_NUMBER = 4; + private int in_ = 0; + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The enum numeric value on the wire for in. + */ + @java.lang.Override public int getInValue() { + return in_; + } + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The in. + */ + @java.lang.Override public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In result = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.forNumber(in_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.UNRECOGNIZED : result; + } + + public static final int FLOW_FIELD_NUMBER = 5; + private int flow_ = 0; + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The enum numeric value on the wire for flow. + */ + @java.lang.Override public int getFlowValue() { + return flow_; + } + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The flow. + */ + @java.lang.Override public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow result = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.forNumber(flow_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.UNRECOGNIZED : result; + } + + public static final int AUTHORIZATION_URL_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object authorizationUrl_ = ""; + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The authorizationUrl. + */ + @java.lang.Override + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } + } + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The bytes for authorizationUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_URL_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object tokenUrl_ = ""; + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The tokenUrl. + */ + @java.lang.Override + public java.lang.String getTokenUrl() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenUrl_ = s; + return s; + } + } + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The bytes for tokenUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenUrlBytes() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 8; + private com.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes_; + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return Whether the scopes field is set. + */ + @java.lang.Override + public boolean hasScopes() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return The scopes. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes() { + return scopes_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder() { + return scopes_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 9; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.TYPE_INVALID.getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, name_); + } + if (in_ != com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.IN_INVALID.getNumber()) { + output.writeEnum(4, in_); + } + if (flow_ != com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.FLOW_INVALID.getNumber()) { + output.writeEnum(5, flow_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizationUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, authorizationUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tokenUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, tokenUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getScopes()); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 9); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.TYPE_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_); + } + if (in_ != com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.IN_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, in_); + } + if (flow_ != com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.FLOW_INVALID.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, flow_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizationUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, authorizationUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tokenUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, tokenUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getScopes()); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme other = (com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) obj; + + if (type_ != other.type_) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getName() + .equals(other.getName())) return false; + if (in_ != other.in_) return false; + if (flow_ != other.flow_) return false; + if (!getAuthorizationUrl() + .equals(other.getAuthorizationUrl())) return false; + if (!getTokenUrl() + .equals(other.getTokenUrl())) return false; + if (hasScopes() != other.hasScopes()) return false; + if (hasScopes()) { + if (!getScopes() + .equals(other.getScopes())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + IN_FIELD_NUMBER; + hash = (53 * hash) + in_; + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + flow_; + hash = (37 * hash) + AUTHORIZATION_URL_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationUrl().hashCode(); + hash = (37 * hash) + TOKEN_URL_FIELD_NUMBER; + hash = (53 * hash) + getTokenUrl().hashCode(); + if (hasScopes()) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopes().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `SecurityScheme` is a representation of OpenAPI v2 specification's
+   * Security Scheme object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
+   *
+   * Allows the definition of a security scheme that can be used by the
+   * operations. Supported schemes are basic authentication, an API key (either as
+   * a header or as a query parameter) and OAuth2's common flows (implicit,
+   * password, application and access code).
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + com.grpc.gateway.protoc_gen_openapiv2.options.SecuritySchemeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.class, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getScopesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + description_ = ""; + name_ = ""; + in_ = 0; + flow_ = 0; + authorizationUrl_ = ""; + tokenUrl_ = ""; + scopes_ = null; + if (scopesBuilder_ != null) { + scopesBuilder_.dispose(); + scopesBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme build() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.in_ = in_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.flow_ = flow_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.authorizationUrl_ = authorizationUrl_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.tokenUrl_ = tokenUrl_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.scopes_ = scopesBuilder_ == null + ? scopes_ + : scopesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.in_ != 0) { + setInValue(other.getInValue()); + } + if (other.flow_ != 0) { + setFlowValue(other.getFlowValue()); + } + if (!other.getAuthorizationUrl().isEmpty()) { + authorizationUrl_ = other.authorizationUrl_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getTokenUrl().isEmpty()) { + tokenUrl_ = other.tokenUrl_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasScopes()) { + mergeScopes(other.getScopes()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000100; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + in_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + flow_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + authorizationUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + tokenUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getScopesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int type_ = 0; + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type result = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.forNumber(type_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type.UNRECOGNIZED : result; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of the security scheme. Valid values are "basic",
+     * "apiKey" or "oauth2".
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short description for security scheme.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The name of the header or query parameter to be used.
+     * Valid for apiKey.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int in_ = 0; + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The enum numeric value on the wire for in. + */ + @java.lang.Override public int getInValue() { + return in_; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @param value The enum numeric value on the wire for in to set. + * @return This builder for chaining. + */ + public Builder setInValue(int value) { + in_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The in. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In result = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.forNumber(in_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In.UNRECOGNIZED : result; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @param value The in to set. + * @return This builder for chaining. + */ + public Builder setIn(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + in_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The location of the API key. Valid values are "query" or
+     * "header".
+     * Valid for apiKey.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return This builder for chaining. + */ + public Builder clearIn() { + bitField0_ = (bitField0_ & ~0x00000008); + in_ = 0; + onChanged(); + return this; + } + + private int flow_ = 0; + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The enum numeric value on the wire for flow. + */ + @java.lang.Override public int getFlowValue() { + return flow_; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @param value The enum numeric value on the wire for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowValue(int value) { + flow_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The flow. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow() { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow result = com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.forNumber(flow_); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow.UNRECOGNIZED : result; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + flow_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The flow used by the OAuth2 security scheme. Valid values are
+     * "implicit", "password", "application" or "accessCode".
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return This builder for chaining. + */ + public Builder clearFlow() { + bitField0_ = (bitField0_ & ~0x00000010); + flow_ = 0; + onChanged(); + return this; + } + + private java.lang.Object authorizationUrl_ = ""; + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The authorizationUrl. + */ + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The bytes for authorizationUrl. + */ + public com.google.protobuf.ByteString + getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @param value The authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + authorizationUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return This builder for chaining. + */ + public Builder clearAuthorizationUrl() { + authorizationUrl_ = getDefaultInstance().getAuthorizationUrl(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The authorization URL to be used for this flow. This SHOULD be in
+     * the form of a URL.
+     * Valid for oauth2/implicit and oauth2/accessCode.
+     * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @param value The bytes for authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + authorizationUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object tokenUrl_ = ""; + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The tokenUrl. + */ + public java.lang.String getTokenUrl() { + java.lang.Object ref = tokenUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The bytes for tokenUrl. + */ + public com.google.protobuf.ByteString + getTokenUrlBytes() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @param value The tokenUrl to set. + * @return This builder for chaining. + */ + public Builder setTokenUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tokenUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return This builder for chaining. + */ + public Builder clearTokenUrl() { + tokenUrl_ = getDefaultInstance().getTokenUrl(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * The token URL to be used for this flow. This SHOULD be in the
+     * form of a URL.
+     * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+     * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @param value The bytes for tokenUrl to set. + * @return This builder for chaining. + */ + public Builder setTokenUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tokenUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes, com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder> scopesBuilder_; + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return Whether the scopes field is set. + */ + public boolean hasScopes() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return The scopes. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes() { + if (scopesBuilder_ == null) { + return scopes_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } else { + return scopesBuilder_.getMessage(); + } + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder setScopes(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes value) { + if (scopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scopes_ = value; + } else { + scopesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder setScopes( + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder builderForValue) { + if (scopesBuilder_ == null) { + scopes_ = builderForValue.build(); + } else { + scopesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder mergeScopes(com.grpc.gateway.protoc_gen_openapiv2.options.Scopes value) { + if (scopesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + scopes_ != null && + scopes_ != com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance()) { + getScopesBuilder().mergeFrom(value); + } else { + scopes_ = value; + } + } else { + scopesBuilder_.mergeFrom(value); + } + if (scopes_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public Builder clearScopes() { + bitField0_ = (bitField0_ & ~0x00000080); + scopes_ = null; + if (scopesBuilder_ != null) { + scopesBuilder_.dispose(); + scopesBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder getScopesBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getScopesFieldBuilder().getBuilder(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder() { + if (scopesBuilder_ != null) { + return scopesBuilder_.getMessageOrBuilder(); + } else { + return scopes_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.getDefaultInstance() : scopes_; + } + } + /** + *
+     * The available scopes for the OAuth2 security scheme.
+     * Valid for oauth2.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes, com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder> + getScopesFieldBuilder() { + if (scopesBuilder_ == null) { + scopesBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes, com.grpc.gateway.protoc_gen_openapiv2.options.Scopes.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder>( + getScopes(), + getParentForChildren(), + isClean()); + scopes_ = null; + } + return scopesBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000100; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000100; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000100; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000100; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecurityScheme parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java new file mode 100644 index 00000000..6d4bcb5f --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SecuritySchemeOrBuilder.java @@ -0,0 +1,262 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface SecuritySchemeOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The type of the security scheme. Valid values are "basic",
+   * "apiKey" or "oauth2".
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1 [json_name = "type"]; + * @return The type. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type getType(); + + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description for security scheme.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the header or query parameter to be used.
+   * Valid for apiKey.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The enum numeric value on the wire for in. + */ + int getInValue(); + /** + *
+   * The location of the API key. Valid values are "query" or
+   * "header".
+   * Valid for apiKey.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4 [json_name = "in"]; + * @return The in. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In getIn(); + + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The enum numeric value on the wire for flow. + */ + int getFlowValue(); + /** + *
+   * The flow used by the OAuth2 security scheme. Valid values are
+   * "implicit", "password", "application" or "accessCode".
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5 [json_name = "flow"]; + * @return The flow. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow getFlow(); + + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The authorizationUrl. + */ + java.lang.String getAuthorizationUrl(); + /** + *
+   * The authorization URL to be used for this flow. This SHOULD be in
+   * the form of a URL.
+   * Valid for oauth2/implicit and oauth2/accessCode.
+   * 
+ * + * string authorization_url = 6 [json_name = "authorizationUrl"]; + * @return The bytes for authorizationUrl. + */ + com.google.protobuf.ByteString + getAuthorizationUrlBytes(); + + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The tokenUrl. + */ + java.lang.String getTokenUrl(); + /** + *
+   * The token URL to be used for this flow. This SHOULD be in the
+   * form of a URL.
+   * Valid for oauth2/password, oauth2/application and oauth2/accessCode.
+   * 
+ * + * string token_url = 7 [json_name = "tokenUrl"]; + * @return The bytes for tokenUrl. + */ + com.google.protobuf.ByteString + getTokenUrlBytes(); + + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return Whether the scopes field is set. + */ + boolean hasScopes(); + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + * @return The scopes. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Scopes getScopes(); + /** + *
+   * The available scopes for the OAuth2 security scheme.
+   * Valid for oauth2.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8 [json_name = "scopes"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ScopesOrBuilder getScopesOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 9 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java new file mode 100644 index 00000000..29f38607 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Swagger.java @@ -0,0 +1,4315 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
+ *
+ * Example:
+ *
+ * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+ * info: {
+ * title: "Echo API";
+ * version: "1.0";
+ * description: "";
+ * contact: {
+ * name: "gRPC-Gateway project";
+ * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ * email: "none@example.com";
+ * };
+ * license: {
+ * name: "BSD 3-Clause License";
+ * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+ * };
+ * };
+ * schemes: HTTPS;
+ * consumes: "application/json";
+ * produces: "application/json";
+ * };
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ +public final class Swagger extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + SwaggerOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Swagger.class.getName()); + } + // Use Swagger.newBuilder() to construct. + private Swagger(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Swagger() { + swagger_ = ""; + host_ = ""; + basePath_ = ""; + schemes_ = emptyIntList(); + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + security_ = java.util.Collections.emptyList(); + tags_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetResponses(); + case 15: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.Builder.class); + } + + private int bitField0_; + public static final int SWAGGER_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object swagger_ = ""; + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The swagger. + */ + @java.lang.Override + public java.lang.String getSwagger() { + java.lang.Object ref = swagger_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + swagger_ = s; + return s; + } + } + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The bytes for swagger. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSwaggerBytes() { + java.lang.Object ref = swagger_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + swagger_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_FIELD_NUMBER = 2; + private com.grpc.gateway.protoc_gen_openapiv2.options.Info info_; + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + @java.lang.Override + public boolean hasInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return The info. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Info getInfo() { + return info_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder() { + return info_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } + + public static final int HOST_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object host_ = ""; + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } + } + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_PATH_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object basePath_ = ""; + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The basePath. + */ + @java.lang.Override + public java.lang.String getBasePath() { + java.lang.Object ref = basePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + basePath_ = s; + return s; + } + } + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The bytes for basePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBasePathBytes() { + java.lang.Object ref = basePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + basePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMES_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList schemes_; + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme> schemes_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme>() { + public com.grpc.gateway.protoc_gen_openapiv2.options.Scheme convert(int from) { + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme result = com.grpc.gateway.protoc_gen_openapiv2.options.Scheme.forNumber(from); + return result == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Scheme.UNRECOGNIZED : result; + } + }; + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + @java.lang.Override + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return The count of schemes. + */ + @java.lang.Override + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.getInt(index)); + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + @java.lang.Override + public java.util.List + getSchemesValueList() { + return schemes_; + } + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + @java.lang.Override + public int getSchemesValue(int index) { + return schemes_.getInt(index); + } + private int schemesMemoizedSerializedSize; + + public static final int CONSUMES_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + return consumes_; + } + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + + public static final int PRODUCES_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + return produces_; + } + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + + public static final int RESPONSES_FIELD_NUMBER = 10; + private static final class ResponsesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.grpc.gateway.protoc_gen_openapiv2.options.Response.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.Response> responses_; + private com.google.protobuf.MapField + internalGetResponses() { + if (responses_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResponsesDefaultEntryHolder.defaultEntry); + } + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().getMap().size(); + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().getMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getMap(); + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResponses().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SECURITY_DEFINITIONS_FIELD_NUMBER = 11; + private com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions securityDefinitions_; + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return Whether the securityDefinitions field is set. + */ + @java.lang.Override + public boolean hasSecurityDefinitions() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return The securityDefinitions. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions() { + return securityDefinitions_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() { + return securityDefinitions_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } + + public static final int SECURITY_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List security_; + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List getSecurityList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public java.util.List + getSecurityOrBuilderList() { + return security_; + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public int getSecurityCount() { + return security_.size(); + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + return security_.get(index); + } + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + return security_.get(index); + } + + public static final int TAGS_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private java.util.List tags_; + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public java.util.List getTagsList() { + return tags_; + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public java.util.List + getTagsOrBuilderList() { + return tags_; + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public int getTagsCount() { + return tags_.size(); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index) { + return tags_.get(index); + } + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( + int index) { + return tags_.get(index); + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 14; + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 15; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(swagger_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, swagger_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(host_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, host_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(basePath_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, basePath_); + } + if (getSchemesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(schemesMemoizedSerializedSize); + } + for (int i = 0; i < schemes_.size(); i++) { + output.writeEnumNoTag(schemes_.getInt(i)); + } + for (int i = 0; i < consumes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, consumes_.getRaw(i)); + } + for (int i = 0; i < produces_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, produces_.getRaw(i)); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetResponses(), + ResponsesDefaultEntryHolder.defaultEntry, + 10); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(11, getSecurityDefinitions()); + } + for (int i = 0; i < security_.size(); i++) { + output.writeMessage(12, security_.get(i)); + } + for (int i = 0; i < tags_.size(); i++) { + output.writeMessage(13, tags_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(14, getExternalDocs()); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 15); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(swagger_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, swagger_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(host_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, host_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(basePath_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, basePath_); + } + { + int dataSize = 0; + for (int i = 0; i < schemes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(schemes_.getInt(i)); + } + size += dataSize; + if (!getSchemesList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }schemesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < consumes_.size(); i++) { + dataSize += computeStringSizeNoTag(consumes_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsumesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < produces_.size(); i++) { + dataSize += computeStringSizeNoTag(produces_.getRaw(i)); + } + size += dataSize; + size += 1 * getProducesList().size(); + } + for (java.util.Map.Entry entry + : internalGetResponses().getMap().entrySet()) { + com.google.protobuf.MapEntry + responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, responses__); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getSecurityDefinitions()); + } + for (int i = 0; i < security_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, security_.get(i)); + } + for (int i = 0; i < tags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, tags_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getExternalDocs()); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Swagger)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger other = (com.grpc.gateway.protoc_gen_openapiv2.options.Swagger) obj; + + if (!getSwagger() + .equals(other.getSwagger())) return false; + if (hasInfo() != other.hasInfo()) return false; + if (hasInfo()) { + if (!getInfo() + .equals(other.getInfo())) return false; + } + if (!getHost() + .equals(other.getHost())) return false; + if (!getBasePath() + .equals(other.getBasePath())) return false; + if (!schemes_.equals(other.schemes_)) return false; + if (!getConsumesList() + .equals(other.getConsumesList())) return false; + if (!getProducesList() + .equals(other.getProducesList())) return false; + if (!internalGetResponses().equals( + other.internalGetResponses())) return false; + if (hasSecurityDefinitions() != other.hasSecurityDefinitions()) return false; + if (hasSecurityDefinitions()) { + if (!getSecurityDefinitions() + .equals(other.getSecurityDefinitions())) return false; + } + if (!getSecurityList() + .equals(other.getSecurityList())) return false; + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SWAGGER_FIELD_NUMBER; + hash = (53 * hash) + getSwagger().hashCode(); + if (hasInfo()) { + hash = (37 * hash) + INFO_FIELD_NUMBER; + hash = (53 * hash) + getInfo().hashCode(); + } + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + BASE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getBasePath().hashCode(); + if (getSchemesCount() > 0) { + hash = (37 * hash) + SCHEMES_FIELD_NUMBER; + hash = (53 * hash) + schemes_.hashCode(); + } + if (getConsumesCount() > 0) { + hash = (37 * hash) + CONSUMES_FIELD_NUMBER; + hash = (53 * hash) + getConsumesList().hashCode(); + } + if (getProducesCount() > 0) { + hash = (37 * hash) + PRODUCES_FIELD_NUMBER; + hash = (53 * hash) + getProducesList().hashCode(); + } + if (!internalGetResponses().getMap().isEmpty()) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + internalGetResponses().hashCode(); + } + if (hasSecurityDefinitions()) { + hash = (37 * hash) + SECURITY_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getSecurityDefinitions().hashCode(); + } + if (getSecurityCount() > 0) { + hash = (37 * hash) + SECURITY_FIELD_NUMBER; + hash = (53 * hash) + getSecurityList().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Swagger prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
+   *
+   * Example:
+   *
+   * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
+   * info: {
+   * title: "Echo API";
+   * version: "1.0";
+   * description: "";
+   * contact: {
+   * name: "gRPC-Gateway project";
+   * url: "https://github.com/grpc-ecosystem/grpc-gateway";
+   * email: "none@example.com";
+   * };
+   * license: {
+   * name: "BSD 3-Clause License";
+   * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
+   * };
+   * };
+   * schemes: HTTPS;
+   * consumes: "application/json";
+   * produces: "application/json";
+   * };
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + com.grpc.gateway.protoc_gen_openapiv2.options.SwaggerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetResponses(); + case 15: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 10: + return internalGetMutableResponses(); + case 15: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.class, com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getInfoFieldBuilder(); + getSecurityDefinitionsFieldBuilder(); + getSecurityFieldBuilder(); + getTagsFieldBuilder(); + getExternalDocsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + swagger_ = ""; + info_ = null; + if (infoBuilder_ != null) { + infoBuilder_.dispose(); + infoBuilder_ = null; + } + host_ = ""; + basePath_ = ""; + schemes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000010); + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + internalGetMutableResponses().clear(); + securityDefinitions_ = null; + if (securityDefinitionsBuilder_ != null) { + securityDefinitionsBuilder_.dispose(); + securityDefinitionsBuilder_ = null; + } + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + } else { + security_ = null; + securityBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + } else { + tags_ = null; + tagsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Swagger build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Swagger buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Swagger result = new com.grpc.gateway.protoc_gen_openapiv2.options.Swagger(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.grpc.gateway.protoc_gen_openapiv2.options.Swagger result) { + if (((bitField0_ & 0x00000010) != 0)) { + schemes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.schemes_ = schemes_; + if (securityBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + security_ = java.util.Collections.unmodifiableList(security_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.security_ = security_; + } else { + result.security_ = securityBuilder_.build(); + } + if (tagsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + tags_ = java.util.Collections.unmodifiableList(tags_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.tags_ = tags_; + } else { + result.tags_ = tagsBuilder_.build(); + } + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Swagger result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.swagger_ = swagger_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.info_ = infoBuilder_ == null + ? info_ + : infoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.host_ = host_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.basePath_ = basePath_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + consumes_.makeImmutable(); + result.consumes_ = consumes_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + produces_.makeImmutable(); + result.produces_ = produces_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.responses_ = internalGetResponses().build(ResponsesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.securityDefinitions_ = securityDefinitionsBuilder_ == null + ? securityDefinitions_ + : securityDefinitionsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Swagger) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Swagger)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Swagger other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Swagger.getDefaultInstance()) return this; + if (!other.getSwagger().isEmpty()) { + swagger_ = other.swagger_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasInfo()) { + mergeInfo(other.getInfo()); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getBasePath().isEmpty()) { + basePath_ = other.basePath_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.schemes_.isEmpty()) { + if (schemes_.isEmpty()) { + schemes_ = other.schemes_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSchemesIsMutable(); + schemes_.addAll(other.schemes_); + } + onChanged(); + } + if (!other.consumes_.isEmpty()) { + if (consumes_.isEmpty()) { + consumes_ = other.consumes_; + bitField0_ |= 0x00000020; + } else { + ensureConsumesIsMutable(); + consumes_.addAll(other.consumes_); + } + onChanged(); + } + if (!other.produces_.isEmpty()) { + if (produces_.isEmpty()) { + produces_ = other.produces_; + bitField0_ |= 0x00000040; + } else { + ensureProducesIsMutable(); + produces_.addAll(other.produces_); + } + onChanged(); + } + internalGetMutableResponses().mergeFrom( + other.internalGetResponses()); + bitField0_ |= 0x00000080; + if (other.hasSecurityDefinitions()) { + mergeSecurityDefinitions(other.getSecurityDefinitions()); + } + if (securityBuilder_ == null) { + if (!other.security_.isEmpty()) { + if (security_.isEmpty()) { + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureSecurityIsMutable(); + security_.addAll(other.security_); + } + onChanged(); + } + } else { + if (!other.security_.isEmpty()) { + if (securityBuilder_.isEmpty()) { + securityBuilder_.dispose(); + securityBuilder_ = null; + security_ = other.security_; + bitField0_ = (bitField0_ & ~0x00000200); + securityBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSecurityFieldBuilder() : null; + } else { + securityBuilder_.addAllMessages(other.security_); + } + } + } + if (tagsBuilder_ == null) { + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + } else { + if (!other.tags_.isEmpty()) { + if (tagsBuilder_.isEmpty()) { + tagsBuilder_.dispose(); + tagsBuilder_ = null; + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000400); + tagsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTagsFieldBuilder() : null; + } else { + tagsBuilder_.addAllMessages(other.tags_); + } + } + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00001000; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + swagger_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + basePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.addInt(tmpRaw); + break; + } // case 40 + case 42: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSchemesIsMutable(); + schemes_.addInt(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsumesIsMutable(); + consumes_.add(s); + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureProducesIsMutable(); + produces_.add(s); + break; + } // case 58 + case 82: { + com.google.protobuf.MapEntry + responses__ = input.readMessage( + ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableResponses().ensureBuilderMap().put( + responses__.getKey(), responses__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: { + input.readMessage( + getSecurityDefinitionsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 + case 98: { + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement m = + input.readMessage( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.parser(), + extensionRegistry); + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(m); + } else { + securityBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + com.grpc.gateway.protoc_gen_openapiv2.options.Tag m = + input.readMessage( + com.grpc.gateway.protoc_gen_openapiv2.options.Tag.parser(), + extensionRegistry); + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(m); + } else { + tagsBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 114 + case 122: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 122 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object swagger_ = ""; + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The swagger. + */ + public java.lang.String getSwagger() { + java.lang.Object ref = swagger_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + swagger_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The bytes for swagger. + */ + public com.google.protobuf.ByteString + getSwaggerBytes() { + java.lang.Object ref = swagger_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + swagger_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @param value The swagger to set. + * @return This builder for chaining. + */ + public Builder setSwagger( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + swagger_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return This builder for chaining. + */ + public Builder clearSwagger() { + swagger_ = getDefaultInstance().getSwagger(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Specifies the OpenAPI Specification version being used. It can be
+     * used by the OpenAPI UI and other clients to interpret the API listing. The
+     * value MUST be "2.0".
+     * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @param value The bytes for swagger to set. + * @return This builder for chaining. + */ + public Builder setSwaggerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + swagger_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.Info info_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Info, com.grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder> infoBuilder_; + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + public boolean hasInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return The info. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Info getInfo() { + if (infoBuilder_ == null) { + return info_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } else { + return infoBuilder_.getMessage(); + } + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder setInfo(com.grpc.gateway.protoc_gen_openapiv2.options.Info value) { + if (infoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + info_ = value; + } else { + infoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder setInfo( + com.grpc.gateway.protoc_gen_openapiv2.options.Info.Builder builderForValue) { + if (infoBuilder_ == null) { + info_ = builderForValue.build(); + } else { + infoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder mergeInfo(com.grpc.gateway.protoc_gen_openapiv2.options.Info value) { + if (infoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + info_ != null && + info_ != com.grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance()) { + getInfoBuilder().mergeFrom(value); + } else { + info_ = value; + } + } else { + infoBuilder_.mergeFrom(value); + } + if (info_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public Builder clearInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + info_ = null; + if (infoBuilder_ != null) { + infoBuilder_.dispose(); + infoBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Info.Builder getInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getInfoFieldBuilder().getBuilder(); + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder() { + if (infoBuilder_ != null) { + return infoBuilder_.getMessageOrBuilder(); + } else { + return info_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.Info.getDefaultInstance() : info_; + } + } + /** + *
+     * Provides metadata about the API. The metadata can be used by the
+     * clients if needed.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Info, com.grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder> + getInfoFieldBuilder() { + if (infoBuilder_ == null) { + infoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Info, com.grpc.gateway.protoc_gen_openapiv2.options.Info.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder>( + getInfo(), + getParentForChildren(), + isClean()); + info_ = null; + } + return infoBuilder_; + } + + private java.lang.Object host_ = ""; + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @return The bytes for host. + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + host_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @return This builder for chaining. + */ + public Builder clearHost() { + host_ = getDefaultInstance().getHost(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The host (name or ip) serving the API. This MUST be the host only and does
+     * not include the scheme nor sub-paths. It MAY include a port. If the host is
+     * not included, the host serving the documentation is to be used (including
+     * the port). The host does not support path templating.
+     * 
+ * + * string host = 3 [json_name = "host"]; + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + host_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object basePath_ = ""; + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The basePath. + */ + public java.lang.String getBasePath() { + java.lang.Object ref = basePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + basePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The bytes for basePath. + */ + public com.google.protobuf.ByteString + getBasePathBytes() { + java.lang.Object ref = basePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + basePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @param value The basePath to set. + * @return This builder for chaining. + */ + public Builder setBasePath( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + basePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return This builder for chaining. + */ + public Builder clearBasePath() { + basePath_ = getDefaultInstance().getBasePath(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The base path on which the API is served, which is relative to the host. If
+     * it is not included, the API is served directly under the host. The value
+     * MUST start with a leading slash (/). The basePath does not support path
+     * templating.
+     * Note that using `base_path` does not change the endpoint paths that are
+     * generated in the resulting OpenAPI file. If you wish to use `base_path`
+     * with relatively generated OpenAPI paths, the `base_path` prefix must be
+     * manually removed from your `google.api.http` paths and your code changed to
+     * serve the API from the `base_path`.
+     * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @param value The bytes for basePath to set. + * @return This builder for chaining. + */ + public Builder setBasePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + basePath_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList schemes_ = + emptyIntList(); + private void ensureSchemesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + schemes_ = makeMutableCopy(schemes_); + bitField0_ |= 0x00000010; + } + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + public java.util.List getSchemesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme>(schemes_, schemes_converter_); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return The count of schemes. + */ + public int getSchemesCount() { + return schemes_.size(); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index) { + return schemes_converter_.convert(schemes_.getInt(index)); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemes( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param value The schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemes(com.grpc.gateway.protoc_gen_openapiv2.options.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemesIsMutable(); + schemes_.addInt(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param values The schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemes( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (com.grpc.gateway.protoc_gen_openapiv2.options.Scheme value : values) { + schemes_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return This builder for chaining. + */ + public Builder clearSchemes() { + schemes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + public java.util.List + getSchemesValueList() { + return java.util.Collections.unmodifiableList(schemes_); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + public int getSchemesValue(int index) { + return schemes_.getInt(index); + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for schemes to set. + * @return This builder for chaining. + */ + public Builder setSchemesValue( + int index, int value) { + ensureSchemesIsMutable(); + schemes_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param value The enum numeric value on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addSchemesValue(int value) { + ensureSchemesIsMutable(); + schemes_.addInt(value); + onChanged(); + return this; + } + /** + *
+     * The transfer protocol of the API. Values MUST be from the list: "http",
+     * "https", "ws", "wss". If the schemes is not included, the default scheme to
+     * be used is the one used to access the OpenAPI definition itself.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param values The enum numeric values on the wire for schemes to add. + * @return This builder for chaining. + */ + public Builder addAllSchemesValue( + java.lang.Iterable values) { + ensureSchemesIsMutable(); + for (int value : values) { + schemes_.addInt(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureConsumesIsMutable() { + if (!consumes_.isModifiable()) { + consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_); + } + bitField0_ |= 0x00000020; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + public com.google.protobuf.ProtocolStringList + getConsumesList() { + consumes_.makeImmutable(); + return consumes_; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + public int getConsumesCount() { + return consumes_.size(); + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + public java.lang.String getConsumes(int index) { + return consumes_.get(index); + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + public com.google.protobuf.ByteString + getConsumesBytes(int index) { + return consumes_.getByteString(index); + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index to set the value at. + * @param value The consumes to set. + * @return This builder for chaining. + */ + public Builder setConsumes( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumes( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param values The consumes to add. + * @return This builder for chaining. + */ + public Builder addAllConsumes( + java.lang.Iterable values) { + ensureConsumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consumes_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return This builder for chaining. + */ + public Builder clearConsumes() { + consumes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can consume. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param value The bytes of the consumes to add. + * @return This builder for chaining. + */ + public Builder addConsumesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureConsumesIsMutable(); + consumes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureProducesIsMutable() { + if (!produces_.isModifiable()) { + produces_ = new com.google.protobuf.LazyStringArrayList(produces_); + } + bitField0_ |= 0x00000040; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + public com.google.protobuf.ProtocolStringList + getProducesList() { + produces_.makeImmutable(); + return produces_; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + public int getProducesCount() { + return produces_.size(); + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + public java.lang.String getProduces(int index) { + return produces_.get(index); + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + public com.google.protobuf.ByteString + getProducesBytes(int index) { + return produces_.getByteString(index); + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index to set the value at. + * @param value The produces to set. + * @return This builder for chaining. + */ + public Builder setProduces( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The produces to add. + * @return This builder for chaining. + */ + public Builder addProduces( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param values The produces to add. + * @return This builder for chaining. + */ + public Builder addAllProduces( + java.lang.Iterable values) { + ensureProducesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, produces_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return This builder for chaining. + */ + public Builder clearProduces() { + produces_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040);; + onChanged(); + return this; + } + /** + *
+     * A list of MIME types the APIs can produce. This is global to all APIs but
+     * can be overridden on specific API calls. Value MUST be as described under
+     * Mime Types.
+     * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param value The bytes of the produces to add. + * @return This builder for chaining. + */ + public Builder addProducesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureProducesIsMutable(); + produces_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private static final class ResponsesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response build(com.grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder val) { + if (val instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Response) { return (com.grpc.gateway.protoc_gen_openapiv2.options.Response) val; } + return ((com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ResponsesDefaultEntryHolder.defaultEntry; + } + }; + private static final ResponsesConverter responsesConverter = new ResponsesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder, com.grpc.gateway.protoc_gen_openapiv2.options.Response, com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder> responses_; + private com.google.protobuf.MapFieldBuilder + internalGetResponses() { + if (responses_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + return responses_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableResponses() { + if (responses_ == null) { + responses_ = new com.google.protobuf.MapFieldBuilder<>(responsesConverter); + } + bitField0_ |= 0x00000080; + onChanged(); + return responses_; + } + public int getResponsesCount() { + return internalGetResponses().ensureBuilderMap().size(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public boolean containsResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResponses().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResponses() { + return getResponsesMap(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public java.util.Map getResponsesMap() { + return internalGetResponses().getImmutableMap(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + return map.containsKey(key) ? responsesConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableResponses().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return responsesConverter.build(map.get(key)); + } + public Builder clearResponses() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableResponses().clear(); + return this; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public Builder removeResponses( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableResponses().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableResponses() { + bitField0_ |= 0x00000080; + return internalGetMutableResponses().ensureMessageMap(); + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public Builder putResponses( + java.lang.String key, + com.grpc.gateway.protoc_gen_openapiv2.options.Response value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableResponses().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public Builder putAllResponses( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableResponses().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000080; + return this; + } + /** + *
+     * An object to hold responses that can be used across operations. This
+     * property does not define global responses for all operations.
+     * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder putResponsesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableResponses().ensureBuilderMap(); + com.grpc.gateway.protoc_gen_openapiv2.options.ResponseOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.grpc.gateway.protoc_gen_openapiv2.options.Response.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Response) { + entry = ((com.grpc.gateway.protoc_gen_openapiv2.options.Response) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.grpc.gateway.protoc_gen_openapiv2.options.Response.Builder) entry; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions securityDefinitions_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder> securityDefinitionsBuilder_; + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return Whether the securityDefinitions field is set. + */ + public boolean hasSecurityDefinitions() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return The securityDefinitions. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions() { + if (securityDefinitionsBuilder_ == null) { + return securityDefinitions_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } else { + return securityDefinitionsBuilder_.getMessage(); + } + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder setSecurityDefinitions(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions value) { + if (securityDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + securityDefinitions_ = value; + } else { + securityDefinitionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder setSecurityDefinitions( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder builderForValue) { + if (securityDefinitionsBuilder_ == null) { + securityDefinitions_ = builderForValue.build(); + } else { + securityDefinitionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder mergeSecurityDefinitions(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions value) { + if (securityDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + securityDefinitions_ != null && + securityDefinitions_ != com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance()) { + getSecurityDefinitionsBuilder().mergeFrom(value); + } else { + securityDefinitions_ = value; + } + } else { + securityDefinitionsBuilder_.mergeFrom(value); + } + if (securityDefinitions_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public Builder clearSecurityDefinitions() { + bitField0_ = (bitField0_ & ~0x00000100); + securityDefinitions_ = null; + if (securityDefinitionsBuilder_ != null) { + securityDefinitionsBuilder_.dispose(); + securityDefinitionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder getSecurityDefinitionsBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getSecurityDefinitionsFieldBuilder().getBuilder(); + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() { + if (securityDefinitionsBuilder_ != null) { + return securityDefinitionsBuilder_.getMessageOrBuilder(); + } else { + return securityDefinitions_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.getDefaultInstance() : securityDefinitions_; + } + } + /** + *
+     * Security scheme definitions that can be used across the specification.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder> + getSecurityDefinitionsFieldBuilder() { + if (securityDefinitionsBuilder_ == null) { + securityDefinitionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder>( + getSecurityDefinitions(), + getParentForChildren(), + isClean()); + securityDefinitions_ = null; + } + return securityDefinitionsBuilder_; + } + + private java.util.List security_ = + java.util.Collections.emptyList(); + private void ensureSecurityIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + security_ = new java.util.ArrayList(security_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> securityBuilder_; + + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List getSecurityList() { + if (securityBuilder_ == null) { + return java.util.Collections.unmodifiableList(security_); + } else { + return securityBuilder_.getMessageList(); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public int getSecurityCount() { + if (securityBuilder_ == null) { + return security_.size(); + } else { + return securityBuilder_.getCount(); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index) { + if (securityBuilder_ == null) { + return security_.get(index); + } else { + return securityBuilder_.getMessage(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.set(index, value); + onChanged(); + } else { + securityBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder setSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.set(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity(com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(value); + onChanged(); + } else { + securityBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement value) { + if (securityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecurityIsMutable(); + security_.add(index, value); + onChanged(); + } else { + securityBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addSecurity( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder builderForValue) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.add(index, builderForValue.build()); + onChanged(); + } else { + securityBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder addAllSecurity( + java.lang.Iterable values) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, security_); + onChanged(); + } else { + securityBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder clearSecurity() { + if (securityBuilder_ == null) { + security_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + securityBuilder_.clear(); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public Builder removeSecurity(int index) { + if (securityBuilder_ == null) { + ensureSecurityIsMutable(); + security_.remove(index); + onChanged(); + } else { + securityBuilder_.remove(index); + } + return this; + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder getSecurityBuilder( + int index) { + return getSecurityFieldBuilder().getBuilder(index); + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index) { + if (securityBuilder_ == null) { + return security_.get(index); } else { + return securityBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityOrBuilderList() { + if (securityBuilder_ != null) { + return securityBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(security_); + } + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder() { + return getSecurityFieldBuilder().addBuilder( + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder addSecurityBuilder( + int index) { + return getSecurityFieldBuilder().addBuilder( + index, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.getDefaultInstance()); + } + /** + *
+     * A declaration of which security schemes are applied for the API as a whole.
+     * The list of values describes alternative security schemes that can be used
+     * (that is, there is a logical OR between the security requirements).
+     * Individual operations can override this definition.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + public java.util.List + getSecurityBuilderList() { + return getSecurityFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder> + getSecurityFieldBuilder() { + if (securityBuilder_ == null) { + securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder>( + security_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + security_ = null; + } + return securityBuilder_; + } + + private java.util.List tags_ = + java.util.Collections.emptyList(); + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + tags_ = new java.util.ArrayList(tags_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Tag, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder> tagsBuilder_; + + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public java.util.List getTagsList() { + if (tagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tags_); + } else { + return tagsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public int getTagsCount() { + if (tagsBuilder_ == null) { + return tags_.size(); + } else { + return tagsBuilder_.getCount(); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); + } else { + return tagsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder setTags( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + } else { + tagsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder setTags( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.set(index, builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags(com.grpc.gateway.protoc_gen_openapiv2.options.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + } else { + tagsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.Tag value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(index, value); + onChanged(); + } else { + tagsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags( + com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addTags( + int index, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder builderForValue) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.add(index, builderForValue.build()); + onChanged(); + } else { + tagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder addAllTags( + java.lang.Iterable values) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + } else { + tagsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder clearTags() { + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + tagsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public Builder removeTags(int index) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.remove(index); + onChanged(); + } else { + tagsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder getTagsBuilder( + int index) { + return getTagsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( + int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); } else { + return tagsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public java.util.List + getTagsOrBuilderList() { + if (tagsBuilder_ != null) { + return tagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tags_); + } + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder addTagsBuilder() { + return getTagsFieldBuilder().addBuilder( + com.grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder addTagsBuilder( + int index) { + return getTagsFieldBuilder().addBuilder( + index, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()); + } + /** + *
+     * A list of tags for API documentation control. Tags can be used for logical
+     * grouping of operations by resources or any other qualifier.
+     * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + public java.util.List + getTagsBuilderList() { + return getTagsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Tag, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder> + getTagsFieldBuilder() { + if (tagsBuilder_ == null) { + tagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.Tag, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder>( + tags_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + tags_ = null; + } + return tagsBuilder_; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) && + externalDocs_ != null && + externalDocs_ != com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000800); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00001000; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00001000; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00001000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00001000; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Swagger DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Swagger(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Swagger parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Swagger getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java new file mode 100644 index 00000000..5dcb6c37 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/SwaggerOrBuilder.java @@ -0,0 +1,569 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface SwaggerOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Swagger) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The swagger. + */ + java.lang.String getSwagger(); + /** + *
+   * Specifies the OpenAPI Specification version being used. It can be
+   * used by the OpenAPI UI and other clients to interpret the API listing. The
+   * value MUST be "2.0".
+   * 
+ * + * string swagger = 1 [json_name = "swagger"]; + * @return The bytes for swagger. + */ + com.google.protobuf.ByteString + getSwaggerBytes(); + + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + boolean hasInfo(); + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + * @return The info. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Info getInfo(); + /** + *
+   * Provides metadata about the API. The metadata can be used by the
+   * clients if needed.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2 [json_name = "info"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.InfoOrBuilder getInfoOrBuilder(); + + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The host. + */ + java.lang.String getHost(); + /** + *
+   * The host (name or ip) serving the API. This MUST be the host only and does
+   * not include the scheme nor sub-paths. It MAY include a port. If the host is
+   * not included, the host serving the documentation is to be used (including
+   * the port). The host does not support path templating.
+   * 
+ * + * string host = 3 [json_name = "host"]; + * @return The bytes for host. + */ + com.google.protobuf.ByteString + getHostBytes(); + + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The basePath. + */ + java.lang.String getBasePath(); + /** + *
+   * The base path on which the API is served, which is relative to the host. If
+   * it is not included, the API is served directly under the host. The value
+   * MUST start with a leading slash (/). The basePath does not support path
+   * templating.
+   * Note that using `base_path` does not change the endpoint paths that are
+   * generated in the resulting OpenAPI file. If you wish to use `base_path`
+   * with relatively generated OpenAPI paths, the `base_path` prefix must be
+   * manually removed from your `google.api.http` paths and your code changed to
+   * serve the API from the `base_path`.
+   * 
+ * + * string base_path = 4 [json_name = "basePath"]; + * @return The bytes for basePath. + */ + com.google.protobuf.ByteString + getBasePathBytes(); + + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the schemes. + */ + java.util.List getSchemesList(); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return The count of schemes. + */ + int getSchemesCount(); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the element to return. + * @return The schemes at the given index. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Scheme getSchemes(int index); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @return A list containing the enum numeric values on the wire for schemes. + */ + java.util.List + getSchemesValueList(); + /** + *
+   * The transfer protocol of the API. Values MUST be from the list: "http",
+   * "https", "ws", "wss". If the schemes is not included, the default scheme to
+   * be used is the one used to access the OpenAPI definition itself.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5 [json_name = "schemes"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of schemes at the given index. + */ + int getSchemesValue(int index); + + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return A list containing the consumes. + */ + java.util.List + getConsumesList(); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @return The count of consumes. + */ + int getConsumesCount(); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the element to return. + * @return The consumes at the given index. + */ + java.lang.String getConsumes(int index); + /** + *
+   * A list of MIME types the APIs can consume. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string consumes = 6 [json_name = "consumes"]; + * @param index The index of the value to return. + * @return The bytes of the consumes at the given index. + */ + com.google.protobuf.ByteString + getConsumesBytes(int index); + + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return A list containing the produces. + */ + java.util.List + getProducesList(); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @return The count of produces. + */ + int getProducesCount(); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the element to return. + * @return The produces at the given index. + */ + java.lang.String getProduces(int index); + /** + *
+   * A list of MIME types the APIs can produce. This is global to all APIs but
+   * can be overridden on specific API calls. Value MUST be as described under
+   * Mime Types.
+   * 
+ * + * repeated string produces = 7 [json_name = "produces"]; + * @param index The index of the value to return. + * @return The bytes of the produces at the given index. + */ + com.google.protobuf.ByteString + getProducesBytes(int index); + + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + int getResponsesCount(); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + boolean containsResponses( + java.lang.String key); + /** + * Use {@link #getResponsesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getResponses(); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + java.util.Map + getResponsesMap(); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrDefault( + java.lang.String key, + /* nullable */ +com.grpc.gateway.protoc_gen_openapiv2.options.Response defaultValue); + /** + *
+   * An object to hold responses that can be used across operations. This
+   * property does not define global responses for all operations.
+   * 
+ * + * map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10 [json_name = "responses"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Response getResponsesOrThrow( + java.lang.String key); + + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return Whether the securityDefinitions field is set. + */ + boolean hasSecurityDefinitions(); + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + * @return The securityDefinitions. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions getSecurityDefinitions(); + /** + *
+   * Security scheme definitions that can be used across the specification.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11 [json_name = "securityDefinitions"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder(); + + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityList(); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement getSecurity(int index); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + int getSecurityCount(); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + java.util.List + getSecurityOrBuilderList(); + /** + *
+   * A declaration of which security schemes are applied for the API as a whole.
+   * The list of values describes alternative security schemes that can be used
+   * (that is, there is a logical OR between the security requirements).
+   * Individual operations can override this definition.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12 [json_name = "security"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirementOrBuilder getSecurityOrBuilder( + int index); + + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + java.util.List + getTagsList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.Tag getTags(int index); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + int getTagsCount(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + java.util.List + getTagsOrBuilderList(); + /** + *
+   * A list of tags for API documentation control. Tags can be used for logical
+   * grouping of operations by resources or any other qualifier.
+   * 
+ * + * repeated .grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13 [json_name = "tags"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder getTagsOrBuilder( + int index); + + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14 [json_name = "externalDocs"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 15 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Tag.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Tag.java new file mode 100644 index 00000000..94ebacd1 --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/Tag.java @@ -0,0 +1,1345 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +/** + *
+ * `Tag` is a representation of OpenAPI v2 specification's Tag object.
+ *
+ * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
+ * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +public final class Tag extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag) + TagOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Tag.class.getName()); + } + // Use Tag.newBuilder() to construct. + private Tag(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Tag() { + name_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Tag.class, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_DOCS_FIELD_NUMBER = 3; + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + @java.lang.Override + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 4; + private static final class ExtensionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.protobuf.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_ExtensionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.protobuf.Value> extensions_; + private com.google.protobuf.MapField + internalGetExtensions() { + if (extensions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExtensionsDefaultEntryHolder.defaultEntry); + } + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().getMap().size(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().getMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getMap(); + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetExtensions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getExternalDocs()); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetExtensions(), + ExtensionsDefaultEntryHolder.defaultEntry, + 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getExternalDocs()); + } + for (java.util.Map.Entry entry + : internalGetExtensions().getMap().entrySet()) { + com.google.protobuf.MapEntry + extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, extensions__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Tag)) { + return super.equals(obj); + } + com.grpc.gateway.protoc_gen_openapiv2.options.Tag other = (com.grpc.gateway.protoc_gen_openapiv2.options.Tag) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasExternalDocs() != other.hasExternalDocs()) return false; + if (hasExternalDocs()) { + if (!getExternalDocs() + .equals(other.getExternalDocs())) return false; + } + if (!internalGetExtensions().equals( + other.internalGetExtensions())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasExternalDocs()) { + hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER; + hash = (53 * hash) + getExternalDocs().hashCode(); + } + if (!internalGetExtensions().getMap().isEmpty()) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetExtensions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.grpc.gateway.protoc_gen_openapiv2.options.Tag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * `Tag` is a representation of OpenAPI v2 specification's Tag object.
+   *
+   * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
+   * 
+ * + * Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag) + com.grpc.gateway.protoc_gen_openapiv2.options.TagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableExtensions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.grpc.gateway.protoc_gen_openapiv2.options.Tag.class, com.grpc.gateway.protoc_gen_openapiv2.options.Tag.Builder.class); + } + + // Construct using com.grpc.gateway.protoc_gen_openapiv2.options.Tag.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getExternalDocsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + internalGetMutableExtensions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Openapiv2Proto.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstanceForType() { + return com.grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance(); + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag build() { + com.grpc.gateway.protoc_gen_openapiv2.options.Tag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag buildPartial() { + com.grpc.gateway.protoc_gen_openapiv2.options.Tag result = new com.grpc.gateway.protoc_gen_openapiv2.options.Tag(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.grpc.gateway.protoc_gen_openapiv2.options.Tag result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.externalDocs_ = externalDocsBuilder_ == null + ? externalDocs_ + : externalDocsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.extensions_ = internalGetExtensions().build(ExtensionsDefaultEntryHolder.defaultEntry); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.grpc.gateway.protoc_gen_openapiv2.options.Tag) { + return mergeFrom((com.grpc.gateway.protoc_gen_openapiv2.options.Tag)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.grpc.gateway.protoc_gen_openapiv2.options.Tag other) { + if (other == com.grpc.gateway.protoc_gen_openapiv2.options.Tag.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasExternalDocs()) { + mergeExternalDocs(other.getExternalDocs()); + } + internalGetMutableExtensions().mergeFrom( + other.internalGetExtensions()); + bitField0_ |= 0x00000008; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getExternalDocsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + extensions__ = input.readMessage( + ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableExtensions().ensureBuilderMap().put( + extensions__.getKey(), extensions__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The name of the tag. Use it to allow override of the name of a
+     * global Tag object, then use that name to reference the tag throughout the
+     * OpenAPI file.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A short description for the tag. GFM syntax can be used for rich text
+     * representation.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation externalDocs_; + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> externalDocsBuilder_; + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + public boolean hasExternalDocs() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs() { + if (externalDocsBuilder_ == null) { + return externalDocs_ == null ? com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } else { + return externalDocsBuilder_.getMessage(); + } + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalDocs_ = value; + } else { + externalDocsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder setExternalDocs( + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder builderForValue) { + if (externalDocsBuilder_ == null) { + externalDocs_ = builderForValue.build(); + } else { + externalDocsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder mergeExternalDocs(com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation value) { + if (externalDocsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + externalDocs_ != null && + externalDocs_ != com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance()) { + getExternalDocsBuilder().mergeFrom(value); + } else { + externalDocs_ = value; + } + } else { + externalDocsBuilder_.mergeFrom(value); + } + if (externalDocs_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public Builder clearExternalDocs() { + bitField0_ = (bitField0_ & ~0x00000004); + externalDocs_ = null; + if (externalDocsBuilder_ != null) { + externalDocsBuilder_.dispose(); + externalDocsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder getExternalDocsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getExternalDocsFieldBuilder().getBuilder(); + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + public com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() { + if (externalDocsBuilder_ != null) { + return externalDocsBuilder_.getMessageOrBuilder(); + } else { + return externalDocs_ == null ? + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.getDefaultInstance() : externalDocs_; + } + } + /** + *
+     * Additional external documentation for this tag.
+     * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder> + getExternalDocsFieldBuilder() { + if (externalDocsBuilder_ == null) { + externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.Builder, com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder>( + getExternalDocs(), + getParentForChildren(), + isClean()); + externalDocs_ = null; + } + return externalDocsBuilder_; + } + + private static final class ExtensionsConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return ExtensionsDefaultEntryHolder.defaultEntry; + } + }; + private static final ExtensionsConverter extensionsConverter = new ExtensionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> extensions_; + private com.google.protobuf.MapFieldBuilder + internalGetExtensions() { + if (extensions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + return extensions_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableExtensions() { + if (extensions_ == null) { + extensions_ = new com.google.protobuf.MapFieldBuilder<>(extensionsConverter); + } + bitField0_ |= 0x00000008; + onChanged(); + return extensions_; + } + public int getExtensionsCount() { + return internalGetExtensions().ensureBuilderMap().size(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public boolean containsExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetExtensions().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getExtensions() { + return getExtensionsMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public java.util.Map getExtensionsMap() { + return internalGetExtensions().getImmutableMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + return map.containsKey(key) ? extensionsConverter.build(map.get(key)) : defaultValue; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + @java.lang.Override + public com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableExtensions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return extensionsConverter.build(map.get(key)); + } + public Builder clearExtensions() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableExtensions().clear(); + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public Builder removeExtensions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableExtensions().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableExtensions() { + bitField0_ |= 0x00000008; + return internalGetMutableExtensions().ensureMessageMap(); + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public Builder putExtensions( + java.lang.String key, + com.google.protobuf.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableExtensions().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public Builder putAllExtensions( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableExtensions().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * Custom properties that start with "x-" such as "x-foo" used to describe
+     * extra functionality that is not covered by the standard OpenAPI Specification.
+     * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+     * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableExtensions().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag) + } + + // @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag) + private static final com.grpc.gateway.protoc_gen_openapiv2.options.Tag DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.grpc.gateway.protoc_gen_openapiv2.options.Tag(); + } + + public static com.grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.grpc.gateway.protoc_gen_openapiv2.options.Tag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java new file mode 100644 index 00000000..18b1e7ea --- /dev/null +++ b/src/main/java/com/grpc/gateway/protoc_gen_openapiv2/options/TagOrBuilder.java @@ -0,0 +1,148 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: protoc-gen-openapiv2/options/openapiv2.proto +// Protobuf Java Version: 4.28.2 + +package com.grpc.gateway.protoc_gen_openapiv2.options; + +public interface TagOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Tag) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the tag. Use it to allow override of the name of a
+   * global Tag object, then use that name to reference the tag throughout the
+   * OpenAPI file.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description for the tag. GFM syntax can be used for rich text
+   * representation.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return Whether the externalDocs field is set. + */ + boolean hasExternalDocs(); + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + * @return The externalDocs. + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation getExternalDocs(); + /** + *
+   * Additional external documentation for this tag.
+   * 
+ * + * .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3 [json_name = "externalDocs"]; + */ + com.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentationOrBuilder getExternalDocsOrBuilder(); + + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + int getExtensionsCount(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + boolean containsExtensions( + java.lang.String key); + /** + * Use {@link #getExtensionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getExtensions(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + java.util.Map + getExtensionsMap(); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + /* nullable */ +com.google.protobuf.Value getExtensionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.protobuf.Value defaultValue); + /** + *
+   * Custom properties that start with "x-" such as "x-foo" used to describe
+   * extra functionality that is not covered by the standard OpenAPI Specification.
+   * See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+   * 
+ * + * map<string, .google.protobuf.Value> extensions = 4 [json_name = "extensions"]; + */ + com.google.protobuf.Value getExtensionsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Account.java b/src/main/java/com/heroiclabs/nakama/api/Account.java new file mode 100644 index 00000000..1045d9f6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Account.java @@ -0,0 +1,2019 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A user with additional account details. Always the current user.
+ * 
+ * + * Protobuf type {@code nakama.api.Account} + */ +public final class Account extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Account) + AccountOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Account.class.getName()); + } + // Use Account.newBuilder() to construct. + private Account(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Account() { + wallet_ = ""; + email_ = ""; + devices_ = java.util.Collections.emptyList(); + customId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Account_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Account_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Account.class, com.heroiclabs.nakama.api.Account.Builder.class); + } + + private int bitField0_; + public static final int USER_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.User user_; + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.User getUser() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + + public static final int WALLET_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object wallet_ = ""; + /** + *
+   * The user's wallet data.
+   * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @return The wallet. + */ + @java.lang.Override + public java.lang.String getWallet() { + java.lang.Object ref = wallet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wallet_ = s; + return s; + } + } + /** + *
+   * The user's wallet data.
+   * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @return The bytes for wallet. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletBytes() { + java.lang.Object ref = wallet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wallet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + /** + *
+   * The email address of the user.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + *
+   * The email address of the user.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICES_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List devices_; + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + @java.lang.Override + public java.util.List getDevicesList() { + return devices_; + } + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + @java.lang.Override + public java.util.List + getDevicesOrBuilderList() { + return devices_; + } + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + @java.lang.Override + public int getDevicesCount() { + return devices_.size(); + } + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDevice getDevices(int index) { + return devices_.get(index); + } + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDeviceOrBuilder getDevicesOrBuilder( + int index) { + return devices_.get(index); + } + + public static final int CUSTOM_ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object customId_ = ""; + /** + *
+   * The custom id in the user's account.
+   * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @return The customId. + */ + @java.lang.Override + public java.lang.String getCustomId() { + java.lang.Object ref = customId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customId_ = s; + return s; + } + } + /** + *
+   * The custom id in the user's account.
+   * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @return The bytes for customId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCustomIdBytes() { + java.lang.Object ref = customId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERIFY_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp verifyTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + * @return Whether the verifyTime field is set. + */ + @java.lang.Override + public boolean hasVerifyTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + * @return The verifyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVerifyTime() { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + + public static final int DISABLE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp disableTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+   * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + * @return Whether the disableTime field is set. + */ + @java.lang.Override + public boolean hasDisableTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+   * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + * @return The disableTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDisableTime() { + return disableTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : disableTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+   * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDisableTimeOrBuilder() { + return disableTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : disableTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUser()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(wallet_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, wallet_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, email_); + } + for (int i = 0; i < devices_.size(); i++) { + output.writeMessage(4, devices_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, customId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getVerifyTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getDisableTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUser()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(wallet_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, wallet_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, email_); + } + for (int i = 0; i < devices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, devices_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, customId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getVerifyTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getDisableTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Account)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Account other = (com.heroiclabs.nakama.api.Account) obj; + + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getWallet() + .equals(other.getWallet())) return false; + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getDevicesList() + .equals(other.getDevicesList())) return false; + if (!getCustomId() + .equals(other.getCustomId())) return false; + if (hasVerifyTime() != other.hasVerifyTime()) return false; + if (hasVerifyTime()) { + if (!getVerifyTime() + .equals(other.getVerifyTime())) return false; + } + if (hasDisableTime() != other.hasDisableTime()) return false; + if (hasDisableTime()) { + if (!getDisableTime() + .equals(other.getDisableTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + WALLET_FIELD_NUMBER; + hash = (53 * hash) + getWallet().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + if (getDevicesCount() > 0) { + hash = (37 * hash) + DEVICES_FIELD_NUMBER; + hash = (53 * hash) + getDevicesList().hashCode(); + } + hash = (37 * hash) + CUSTOM_ID_FIELD_NUMBER; + hash = (53 * hash) + getCustomId().hashCode(); + if (hasVerifyTime()) { + hash = (37 * hash) + VERIFY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getVerifyTime().hashCode(); + } + if (hasDisableTime()) { + hash = (37 * hash) + DISABLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDisableTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Account parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Account parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Account parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Account parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Account parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Account parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Account parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Account parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Account parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Account parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Account parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Account parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Account prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A user with additional account details. Always the current user.
+   * 
+ * + * Protobuf type {@code nakama.api.Account} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Account) + com.heroiclabs.nakama.api.AccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Account_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Account_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Account.class, com.heroiclabs.nakama.api.Account.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Account.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + getDevicesFieldBuilder(); + getVerifyTimeFieldBuilder(); + getDisableTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + wallet_ = ""; + email_ = ""; + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + } else { + devices_ = null; + devicesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + customId_ = ""; + verifyTime_ = null; + if (verifyTimeBuilder_ != null) { + verifyTimeBuilder_.dispose(); + verifyTimeBuilder_ = null; + } + disableTime_ = null; + if (disableTimeBuilder_ != null) { + disableTimeBuilder_.dispose(); + disableTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Account_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Account getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Account.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Account build() { + com.heroiclabs.nakama.api.Account result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Account buildPartial() { + com.heroiclabs.nakama.api.Account result = new com.heroiclabs.nakama.api.Account(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.Account result) { + if (devicesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + devices_ = java.util.Collections.unmodifiableList(devices_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.devices_ = devices_; + } else { + result.devices_ = devicesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.Account result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wallet_ = wallet_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.email_ = email_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.customId_ = customId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.verifyTime_ = verifyTimeBuilder_ == null + ? verifyTime_ + : verifyTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.disableTime_ = disableTimeBuilder_ == null + ? disableTime_ + : disableTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Account) { + return mergeFrom((com.heroiclabs.nakama.api.Account)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Account other) { + if (other == com.heroiclabs.nakama.api.Account.getDefaultInstance()) return this; + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getWallet().isEmpty()) { + wallet_ = other.wallet_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (devicesBuilder_ == null) { + if (!other.devices_.isEmpty()) { + if (devices_.isEmpty()) { + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDevicesIsMutable(); + devices_.addAll(other.devices_); + } + onChanged(); + } + } else { + if (!other.devices_.isEmpty()) { + if (devicesBuilder_.isEmpty()) { + devicesBuilder_.dispose(); + devicesBuilder_ = null; + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000008); + devicesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getDevicesFieldBuilder() : null; + } else { + devicesBuilder_.addAllMessages(other.devices_); + } + } + } + if (!other.getCustomId().isEmpty()) { + customId_ = other.customId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasVerifyTime()) { + mergeVerifyTime(other.getVerifyTime()); + } + if (other.hasDisableTime()) { + mergeDisableTime(other.getDisableTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + wallet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.heroiclabs.nakama.api.AccountDevice m = + input.readMessage( + com.heroiclabs.nakama.api.AccountDevice.parser(), + extensionRegistry); + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(m); + } else { + devicesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + customId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getVerifyTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getDisableTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.User user_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> userBuilder_; + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + public com.heroiclabs.nakama.api.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder setUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder setUser( + com.heroiclabs.nakama.api.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder mergeUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + user_ != null && + user_ != com.heroiclabs.nakama.api.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000001); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.User.Builder getUserBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object wallet_ = ""; + /** + *
+     * The user's wallet data.
+     * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @return The wallet. + */ + public java.lang.String getWallet() { + java.lang.Object ref = wallet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wallet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user's wallet data.
+     * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @return The bytes for wallet. + */ + public com.google.protobuf.ByteString + getWalletBytes() { + java.lang.Object ref = wallet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wallet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user's wallet data.
+     * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @param value The wallet to set. + * @return This builder for chaining. + */ + public Builder setWallet( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + wallet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The user's wallet data.
+     * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @return This builder for chaining. + */ + public Builder clearWallet() { + wallet_ = getDefaultInstance().getWallet(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The user's wallet data.
+     * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @param value The bytes for wallet to set. + * @return This builder for chaining. + */ + public Builder setWalletBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + wallet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object email_ = ""; + /** + *
+     * The email address of the user.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The email address of the user.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The email address of the user.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The email address of the user.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The email address of the user.
+     * 
+ * + * string email = 3 [json_name = "email"]; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List devices_ = + java.util.Collections.emptyList(); + private void ensureDevicesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + devices_ = new java.util.ArrayList(devices_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.AccountDevice, com.heroiclabs.nakama.api.AccountDevice.Builder, com.heroiclabs.nakama.api.AccountDeviceOrBuilder> devicesBuilder_; + + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public java.util.List getDevicesList() { + if (devicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(devices_); + } else { + return devicesBuilder_.getMessageList(); + } + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public int getDevicesCount() { + if (devicesBuilder_ == null) { + return devices_.size(); + } else { + return devicesBuilder_.getCount(); + } + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public com.heroiclabs.nakama.api.AccountDevice getDevices(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessage(index); + } + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder setDevices( + int index, com.heroiclabs.nakama.api.AccountDevice value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.set(index, value); + onChanged(); + } else { + devicesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder setDevices( + int index, com.heroiclabs.nakama.api.AccountDevice.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.set(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder addDevices(com.heroiclabs.nakama.api.AccountDevice value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(value); + onChanged(); + } else { + devicesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder addDevices( + int index, com.heroiclabs.nakama.api.AccountDevice value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(index, value); + onChanged(); + } else { + devicesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder addDevices( + com.heroiclabs.nakama.api.AccountDevice.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder addDevices( + int index, com.heroiclabs.nakama.api.AccountDevice.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder addAllDevices( + java.lang.Iterable values) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, devices_); + onChanged(); + } else { + devicesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder clearDevices() { + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + devicesBuilder_.clear(); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public Builder removeDevices(int index) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.remove(index); + onChanged(); + } else { + devicesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public com.heroiclabs.nakama.api.AccountDevice.Builder getDevicesBuilder( + int index) { + return getDevicesFieldBuilder().getBuilder(index); + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public com.heroiclabs.nakama.api.AccountDeviceOrBuilder getDevicesOrBuilder( + int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); } else { + return devicesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public java.util.List + getDevicesOrBuilderList() { + if (devicesBuilder_ != null) { + return devicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(devices_); + } + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public com.heroiclabs.nakama.api.AccountDevice.Builder addDevicesBuilder() { + return getDevicesFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance()); + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public com.heroiclabs.nakama.api.AccountDevice.Builder addDevicesBuilder( + int index) { + return getDevicesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance()); + } + /** + *
+     * The devices which belong to the user's account.
+     * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + public java.util.List + getDevicesBuilderList() { + return getDevicesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.AccountDevice, com.heroiclabs.nakama.api.AccountDevice.Builder, com.heroiclabs.nakama.api.AccountDeviceOrBuilder> + getDevicesFieldBuilder() { + if (devicesBuilder_ == null) { + devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.AccountDevice, com.heroiclabs.nakama.api.AccountDevice.Builder, com.heroiclabs.nakama.api.AccountDeviceOrBuilder>( + devices_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + devices_ = null; + } + return devicesBuilder_; + } + + private java.lang.Object customId_ = ""; + /** + *
+     * The custom id in the user's account.
+     * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @return The customId. + */ + public java.lang.String getCustomId() { + java.lang.Object ref = customId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The custom id in the user's account.
+     * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @return The bytes for customId. + */ + public com.google.protobuf.ByteString + getCustomIdBytes() { + java.lang.Object ref = customId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The custom id in the user's account.
+     * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @param value The customId to set. + * @return This builder for chaining. + */ + public Builder setCustomId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + customId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The custom id in the user's account.
+     * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @return This builder for chaining. + */ + public Builder clearCustomId() { + customId_ = getDefaultInstance().getCustomId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The custom id in the user's account.
+     * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @param value The bytes for customId to set. + * @return This builder for chaining. + */ + public Builder setCustomIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + customId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp verifyTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> verifyTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + * @return Whether the verifyTime field is set. + */ + public boolean hasVerifyTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + * @return The verifyTime. + */ + public com.google.protobuf.Timestamp getVerifyTime() { + if (verifyTimeBuilder_ == null) { + return verifyTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } else { + return verifyTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + public Builder setVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + verifyTime_ = value; + } else { + verifyTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + public Builder setVerifyTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (verifyTimeBuilder_ == null) { + verifyTime_ = builderForValue.build(); + } else { + verifyTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + public Builder mergeVerifyTime(com.google.protobuf.Timestamp value) { + if (verifyTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + verifyTime_ != null && + verifyTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getVerifyTimeBuilder().mergeFrom(value); + } else { + verifyTime_ = value; + } + } else { + verifyTimeBuilder_.mergeFrom(value); + } + if (verifyTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + public Builder clearVerifyTime() { + bitField0_ = (bitField0_ & ~0x00000020); + verifyTime_ = null; + if (verifyTimeBuilder_ != null) { + verifyTimeBuilder_.dispose(); + verifyTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + public com.google.protobuf.Timestamp.Builder getVerifyTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getVerifyTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder() { + if (verifyTimeBuilder_ != null) { + return verifyTimeBuilder_.getMessageOrBuilder(); + } else { + return verifyTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : verifyTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+     * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getVerifyTimeFieldBuilder() { + if (verifyTimeBuilder_ == null) { + verifyTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getVerifyTime(), + getParentForChildren(), + isClean()); + verifyTime_ = null; + } + return verifyTimeBuilder_; + } + + private com.google.protobuf.Timestamp disableTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> disableTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + * @return Whether the disableTime field is set. + */ + public boolean hasDisableTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + * @return The disableTime. + */ + public com.google.protobuf.Timestamp getDisableTime() { + if (disableTimeBuilder_ == null) { + return disableTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : disableTime_; + } else { + return disableTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + public Builder setDisableTime(com.google.protobuf.Timestamp value) { + if (disableTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + disableTime_ = value; + } else { + disableTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + public Builder setDisableTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (disableTimeBuilder_ == null) { + disableTime_ = builderForValue.build(); + } else { + disableTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + public Builder mergeDisableTime(com.google.protobuf.Timestamp value) { + if (disableTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + disableTime_ != null && + disableTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDisableTimeBuilder().mergeFrom(value); + } else { + disableTime_ = value; + } + } else { + disableTimeBuilder_.mergeFrom(value); + } + if (disableTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + public Builder clearDisableTime() { + bitField0_ = (bitField0_ & ~0x00000040); + disableTime_ = null; + if (disableTimeBuilder_ != null) { + disableTimeBuilder_.dispose(); + disableTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + public com.google.protobuf.Timestamp.Builder getDisableTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getDisableTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getDisableTimeOrBuilder() { + if (disableTimeBuilder_ != null) { + return disableTimeBuilder_.getMessageOrBuilder(); + } else { + return disableTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : disableTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+     * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getDisableTimeFieldBuilder() { + if (disableTimeBuilder_ == null) { + disableTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getDisableTime(), + getParentForChildren(), + isClean()); + disableTime_ = null; + } + return disableTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Account) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Account) + private static final com.heroiclabs.nakama.api.Account DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Account(); + } + + public static com.heroiclabs.nakama.api.Account getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Account parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Account getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountApple.java b/src/main/java/com/heroiclabs/nakama/api/AccountApple.java new file mode 100644 index 00000000..075a225b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountApple.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send a Apple Sign In token to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountApple} + */ +public final class AccountApple extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountApple) + AccountAppleOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountApple.class.getName()); + } + // Use AccountApple.newBuilder() to construct. + private AccountApple(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountApple() { + token_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountApple.class, com.heroiclabs.nakama.api.AccountApple.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * The ID token received from Apple to validate.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * The ID token received from Apple to validate.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountApple)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountApple other = (com.heroiclabs.nakama.api.AccountApple) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountApple parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountApple parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountApple parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountApple prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a Apple Sign In token to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountApple} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountApple) + com.heroiclabs.nakama.api.AccountAppleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountApple.class, com.heroiclabs.nakama.api.AccountApple.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountApple.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountApple_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountApple getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountApple.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountApple build() { + com.heroiclabs.nakama.api.AccountApple result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountApple buildPartial() { + com.heroiclabs.nakama.api.AccountApple result = new com.heroiclabs.nakama.api.AccountApple(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountApple result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountApple) { + return mergeFrom((com.heroiclabs.nakama.api.AccountApple)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountApple other) { + if (other == com.heroiclabs.nakama.api.AccountApple.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * The ID token received from Apple to validate.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID token received from Apple to validate.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID token received from Apple to validate.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID token received from Apple to validate.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID token received from Apple to validate.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountApple) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountApple) + private static final com.heroiclabs.nakama.api.AccountApple DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountApple(); + } + + public static com.heroiclabs.nakama.api.AccountApple getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountApple parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountApple getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountAppleOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountAppleOrBuilder.java new file mode 100644 index 00000000..f32eeb2c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountAppleOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountAppleOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountApple) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID token received from Apple to validate.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * The ID token received from Apple to validate.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountCustom.java b/src/main/java/com/heroiclabs/nakama/api/AccountCustom.java new file mode 100644 index 00000000..a96966cd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountCustom.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send a custom ID to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountCustom} + */ +public final class AccountCustom extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountCustom) + AccountCustomOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountCustom.class.getName()); + } + // Use AccountCustom.newBuilder() to construct. + private AccountCustom(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountCustom() { + id_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountCustom.class, com.heroiclabs.nakama.api.AccountCustom.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * A custom identifier.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * A custom identifier.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountCustom)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountCustom other = (com.heroiclabs.nakama.api.AccountCustom) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountCustom parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountCustom parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountCustom parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountCustom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a custom ID to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountCustom} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountCustom) + com.heroiclabs.nakama.api.AccountCustomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountCustom.class, com.heroiclabs.nakama.api.AccountCustom.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountCustom.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountCustom_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountCustom getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountCustom build() { + com.heroiclabs.nakama.api.AccountCustom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountCustom buildPartial() { + com.heroiclabs.nakama.api.AccountCustom result = new com.heroiclabs.nakama.api.AccountCustom(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountCustom result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountCustom) { + return mergeFrom((com.heroiclabs.nakama.api.AccountCustom)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountCustom other) { + if (other == com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * A custom identifier.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A custom identifier.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A custom identifier.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A custom identifier.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A custom identifier.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountCustom) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountCustom) + private static final com.heroiclabs.nakama.api.AccountCustom DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountCustom(); + } + + public static com.heroiclabs.nakama.api.AccountCustom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountCustom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountCustom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountCustomOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountCustomOrBuilder.java new file mode 100644 index 00000000..cf47bdcc --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountCustomOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountCustomOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountCustom) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A custom identifier.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * A custom identifier.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountDevice.java b/src/main/java/com/heroiclabs/nakama/api/AccountDevice.java new file mode 100644 index 00000000..90258f68 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountDevice.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send a device to the server. Used with authenticate/link/unlink and user.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountDevice} + */ +public final class AccountDevice extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountDevice) + AccountDeviceOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountDevice.class.getName()); + } + // Use AccountDevice.newBuilder() to construct. + private AccountDevice(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountDevice() { + id_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountDevice.class, com.heroiclabs.nakama.api.AccountDevice.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * A device identifier. Should be obtained by a platform-specific device API.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * A device identifier. Should be obtained by a platform-specific device API.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountDevice)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountDevice other = (com.heroiclabs.nakama.api.AccountDevice) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountDevice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountDevice parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountDevice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountDevice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a device to the server. Used with authenticate/link/unlink and user.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountDevice} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountDevice) + com.heroiclabs.nakama.api.AccountDeviceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountDevice.class, com.heroiclabs.nakama.api.AccountDevice.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountDevice.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountDevice_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDevice getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDevice build() { + com.heroiclabs.nakama.api.AccountDevice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDevice buildPartial() { + com.heroiclabs.nakama.api.AccountDevice result = new com.heroiclabs.nakama.api.AccountDevice(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountDevice result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountDevice) { + return mergeFrom((com.heroiclabs.nakama.api.AccountDevice)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountDevice other) { + if (other == com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * A device identifier. Should be obtained by a platform-specific device API.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A device identifier. Should be obtained by a platform-specific device API.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A device identifier. Should be obtained by a platform-specific device API.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A device identifier. Should be obtained by a platform-specific device API.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A device identifier. Should be obtained by a platform-specific device API.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountDevice) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountDevice) + private static final com.heroiclabs.nakama.api.AccountDevice DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountDevice(); + } + + public static com.heroiclabs.nakama.api.AccountDevice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountDevice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDevice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountDeviceOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountDeviceOrBuilder.java new file mode 100644 index 00000000..1cd911b2 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountDeviceOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountDeviceOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountDevice) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A device identifier. Should be obtained by a platform-specific device API.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * A device identifier. Should be obtained by a platform-specific device API.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountEmail.java b/src/main/java/com/heroiclabs/nakama/api/AccountEmail.java new file mode 100644 index 00000000..cde7aa76 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountEmail.java @@ -0,0 +1,1024 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send an email with password to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountEmail} + */ +public final class AccountEmail extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountEmail) + AccountEmailOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountEmail.class.getName()); + } + // Use AccountEmail.newBuilder() to construct. + private AccountEmail(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountEmail() { + email_ = ""; + password_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountEmail_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountEmail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountEmail.class, com.heroiclabs.nakama.api.AccountEmail.Builder.class); + } + + public static final int EMAIL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + /** + *
+   * A valid RFC-5322 email address.
+   * 
+ * + * string email = 1 [json_name = "email"]; + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + *
+   * A valid RFC-5322 email address.
+   * 
+ * + * string email = 1 [json_name = "email"]; + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object password_ = ""; + /** + *
+   * A password for the user account.
+   * 
+ * + * string password = 2 [json_name = "password"]; + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } + } + /** + *
+   * A password for the user account.
+   * 
+ * + * string password = 2 [json_name = "password"]; + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 3; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountEmail_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, email_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, password_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, email_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, password_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountEmail)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountEmail other = (com.heroiclabs.nakama.api.AccountEmail) obj; + + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountEmail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountEmail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountEmail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountEmail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send an email with password to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountEmail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountEmail) + com.heroiclabs.nakama.api.AccountEmailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountEmail_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountEmail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountEmail.class, com.heroiclabs.nakama.api.AccountEmail.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountEmail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + email_ = ""; + password_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountEmail_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountEmail getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountEmail build() { + com.heroiclabs.nakama.api.AccountEmail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountEmail buildPartial() { + com.heroiclabs.nakama.api.AccountEmail result = new com.heroiclabs.nakama.api.AccountEmail(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountEmail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.email_ = email_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.password_ = password_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountEmail) { + return mergeFrom((com.heroiclabs.nakama.api.AccountEmail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountEmail other) { + if (other == com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance()) return this; + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + password_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object email_ = ""; + /** + *
+     * A valid RFC-5322 email address.
+     * 
+ * + * string email = 1 [json_name = "email"]; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A valid RFC-5322 email address.
+     * 
+ * + * string email = 1 [json_name = "email"]; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A valid RFC-5322 email address.
+     * 
+ * + * string email = 1 [json_name = "email"]; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + email_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A valid RFC-5322 email address.
+     * 
+ * + * string email = 1 [json_name = "email"]; + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A valid RFC-5322 email address.
+     * 
+ * + * string email = 1 [json_name = "email"]; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + *
+     * A password for the user account.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A password for the user account.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @return The bytes for password. + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A password for the user account.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + password_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A password for the user account.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @return This builder for chaining. + */ + public Builder clearPassword() { + password_ = getDefaultInstance().getPassword(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A password for the user account.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + password_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000004; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountEmail) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountEmail) + private static final com.heroiclabs.nakama.api.AccountEmail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountEmail(); + } + + public static com.heroiclabs.nakama.api.AccountEmail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountEmail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountEmail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountEmailOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountEmailOrBuilder.java new file mode 100644 index 00000000..157af8cd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountEmailOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountEmailOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountEmail) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A valid RFC-5322 email address.
+   * 
+ * + * string email = 1 [json_name = "email"]; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+   * A valid RFC-5322 email address.
+   * 
+ * + * string email = 1 [json_name = "email"]; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); + + /** + *
+   * A password for the user account.
+   * 
+ * + * string password = 2 [json_name = "password"]; + * @return The password. + */ + java.lang.String getPassword(); + /** + *
+   * A password for the user account.
+   * 
+ * + * string password = 2 [json_name = "password"]; + * @return The bytes for password. + */ + com.google.protobuf.ByteString + getPasswordBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 3 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountFacebook.java b/src/main/java/com/heroiclabs/nakama/api/AccountFacebook.java new file mode 100644 index 00000000..29c67f81 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountFacebook.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send a Facebook token to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountFacebook} + */ +public final class AccountFacebook extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountFacebook) + AccountFacebookOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountFacebook.class.getName()); + } + // Use AccountFacebook.newBuilder() to construct. + private AccountFacebook(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountFacebook() { + token_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountFacebook.class, com.heroiclabs.nakama.api.AccountFacebook.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * The OAuth token received from Facebook to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * The OAuth token received from Facebook to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountFacebook)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountFacebook other = (com.heroiclabs.nakama.api.AccountFacebook) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountFacebook parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountFacebook parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountFacebook parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountFacebook prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a Facebook token to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountFacebook} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountFacebook) + com.heroiclabs.nakama.api.AccountFacebookOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountFacebook.class, com.heroiclabs.nakama.api.AccountFacebook.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountFacebook.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebook_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebook getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebook build() { + com.heroiclabs.nakama.api.AccountFacebook result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebook buildPartial() { + com.heroiclabs.nakama.api.AccountFacebook result = new com.heroiclabs.nakama.api.AccountFacebook(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountFacebook result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountFacebook) { + return mergeFrom((com.heroiclabs.nakama.api.AccountFacebook)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountFacebook other) { + if (other == com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * The OAuth token received from Facebook to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The OAuth token received from Facebook to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The OAuth token received from Facebook to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The OAuth token received from Facebook to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The OAuth token received from Facebook to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountFacebook) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountFacebook) + private static final com.heroiclabs.nakama.api.AccountFacebook DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountFacebook(); + } + + public static com.heroiclabs.nakama.api.AccountFacebook getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountFacebook parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebook getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGame.java b/src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGame.java new file mode 100644 index 00000000..8ba92b79 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGame.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountFacebookInstantGame} + */ +public final class AccountFacebookInstantGame extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountFacebookInstantGame) + AccountFacebookInstantGameOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountFacebookInstantGame.class.getName()); + } + // Use AccountFacebookInstantGame.newBuilder() to construct. + private AccountFacebookInstantGame(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountFacebookInstantGame() { + signedPlayerInfo_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountFacebookInstantGame.class, com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder.class); + } + + public static final int SIGNED_PLAYER_INFO_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object signedPlayerInfo_ = ""; + /** + *
+   * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+   * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @return The signedPlayerInfo. + */ + @java.lang.Override + public java.lang.String getSignedPlayerInfo() { + java.lang.Object ref = signedPlayerInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedPlayerInfo_ = s; + return s; + } + } + /** + *
+   * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+   * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @return The bytes for signedPlayerInfo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignedPlayerInfoBytes() { + java.lang.Object ref = signedPlayerInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedPlayerInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedPlayerInfo_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, signedPlayerInfo_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedPlayerInfo_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, signedPlayerInfo_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountFacebookInstantGame)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountFacebookInstantGame other = (com.heroiclabs.nakama.api.AccountFacebookInstantGame) obj; + + if (!getSignedPlayerInfo() + .equals(other.getSignedPlayerInfo())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNED_PLAYER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getSignedPlayerInfo().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountFacebookInstantGame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a Facebook Instant Game token to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountFacebookInstantGame} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountFacebookInstantGame) + com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountFacebookInstantGame.class, com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountFacebookInstantGame.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signedPlayerInfo_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountFacebookInstantGame_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookInstantGame getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookInstantGame build() { + com.heroiclabs.nakama.api.AccountFacebookInstantGame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookInstantGame buildPartial() { + com.heroiclabs.nakama.api.AccountFacebookInstantGame result = new com.heroiclabs.nakama.api.AccountFacebookInstantGame(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountFacebookInstantGame result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signedPlayerInfo_ = signedPlayerInfo_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountFacebookInstantGame) { + return mergeFrom((com.heroiclabs.nakama.api.AccountFacebookInstantGame)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountFacebookInstantGame other) { + if (other == com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance()) return this; + if (!other.getSignedPlayerInfo().isEmpty()) { + signedPlayerInfo_ = other.signedPlayerInfo_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signedPlayerInfo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object signedPlayerInfo_ = ""; + /** + *
+     * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+     * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @return The signedPlayerInfo. + */ + public java.lang.String getSignedPlayerInfo() { + java.lang.Object ref = signedPlayerInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedPlayerInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+     * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @return The bytes for signedPlayerInfo. + */ + public com.google.protobuf.ByteString + getSignedPlayerInfoBytes() { + java.lang.Object ref = signedPlayerInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedPlayerInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+     * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @param value The signedPlayerInfo to set. + * @return This builder for chaining. + */ + public Builder setSignedPlayerInfo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + signedPlayerInfo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+     * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @return This builder for chaining. + */ + public Builder clearSignedPlayerInfo() { + signedPlayerInfo_ = getDefaultInstance().getSignedPlayerInfo(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+     * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @param value The bytes for signedPlayerInfo to set. + * @return This builder for chaining. + */ + public Builder setSignedPlayerInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + signedPlayerInfo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountFacebookInstantGame) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountFacebookInstantGame) + private static final com.heroiclabs.nakama.api.AccountFacebookInstantGame DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountFacebookInstantGame(); + } + + public static com.heroiclabs.nakama.api.AccountFacebookInstantGame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountFacebookInstantGame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookInstantGame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGameOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGameOrBuilder.java new file mode 100644 index 00000000..de5bbdf8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountFacebookInstantGameOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountFacebookInstantGameOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountFacebookInstantGame) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+   * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @return The signedPlayerInfo. + */ + java.lang.String getSignedPlayerInfo(); + /** + *
+   * The OAuth token received from a Facebook Instant Game that may be decoded with the Application Secret (must be available with the nakama configuration)
+   * 
+ * + * string signed_player_info = 1 [json_name = "signedPlayerInfo"]; + * @return The bytes for signedPlayerInfo. + */ + com.google.protobuf.ByteString + getSignedPlayerInfoBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountFacebookOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountFacebookOrBuilder.java new file mode 100644 index 00000000..60a63f69 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountFacebookOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountFacebookOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountFacebook) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The OAuth token received from Facebook to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * The OAuth token received from Facebook to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountGameCenter.java b/src/main/java/com/heroiclabs/nakama/api/AccountGameCenter.java new file mode 100644 index 00000000..387d3b25 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountGameCenter.java @@ -0,0 +1,1599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send Apple's Game Center account credentials to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountGameCenter} + */ +public final class AccountGameCenter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountGameCenter) + AccountGameCenterOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountGameCenter.class.getName()); + } + // Use AccountGameCenter.newBuilder() to construct. + private AccountGameCenter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountGameCenter() { + playerId_ = ""; + bundleId_ = ""; + salt_ = ""; + signature_ = ""; + publicKeyUrl_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGameCenter_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGameCenter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountGameCenter.class, com.heroiclabs.nakama.api.AccountGameCenter.Builder.class); + } + + public static final int PLAYER_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object playerId_ = ""; + /** + *
+   * Player ID (generated by GameCenter).
+   * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @return The playerId. + */ + @java.lang.Override + public java.lang.String getPlayerId() { + java.lang.Object ref = playerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playerId_ = s; + return s; + } + } + /** + *
+   * Player ID (generated by GameCenter).
+   * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @return The bytes for playerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPlayerIdBytes() { + java.lang.Object ref = playerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + playerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUNDLE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object bundleId_ = ""; + /** + *
+   * Bundle ID (generated by GameCenter).
+   * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @return The bundleId. + */ + @java.lang.Override + public java.lang.String getBundleId() { + java.lang.Object ref = bundleId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bundleId_ = s; + return s; + } + } + /** + *
+   * Bundle ID (generated by GameCenter).
+   * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @return The bytes for bundleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBundleIdBytes() { + java.lang.Object ref = bundleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMESTAMP_SECONDS_FIELD_NUMBER = 3; + private long timestampSeconds_ = 0L; + /** + *
+   * Time since UNIX epoch when the signature was created.
+   * 
+ * + * int64 timestamp_seconds = 3 [json_name = "timestampSeconds"]; + * @return The timestampSeconds. + */ + @java.lang.Override + public long getTimestampSeconds() { + return timestampSeconds_; + } + + public static final int SALT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object salt_ = ""; + /** + *
+   * A random "NSString" used to compute the hash and keep it randomized.
+   * 
+ * + * string salt = 4 [json_name = "salt"]; + * @return The salt. + */ + @java.lang.Override + public java.lang.String getSalt() { + java.lang.Object ref = salt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + salt_ = s; + return s; + } + } + /** + *
+   * A random "NSString" used to compute the hash and keep it randomized.
+   * 
+ * + * string salt = 4 [json_name = "salt"]; + * @return The bytes for salt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSaltBytes() { + java.lang.Object ref = salt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + salt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object signature_ = ""; + /** + *
+   * The verification signature data generated.
+   * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + *
+   * The verification signature data generated.
+   * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_URL_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object publicKeyUrl_ = ""; + /** + *
+   * The URL for the public encryption key.
+   * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @return The publicKeyUrl. + */ + @java.lang.Override + public java.lang.String getPublicKeyUrl() { + java.lang.Object ref = publicKeyUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyUrl_ = s; + return s; + } + } + /** + *
+   * The URL for the public encryption key.
+   * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @return The bytes for publicKeyUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyUrlBytes() { + java.lang.Object ref = publicKeyUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKeyUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 7; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGameCenter_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(playerId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, playerId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bundleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, bundleId_); + } + if (timestampSeconds_ != 0L) { + output.writeInt64(3, timestampSeconds_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(salt_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, salt_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, signature_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKeyUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, publicKeyUrl_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 7); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(playerId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, playerId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(bundleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, bundleId_); + } + if (timestampSeconds_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, timestampSeconds_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(salt_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, salt_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, signature_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(publicKeyUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, publicKeyUrl_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountGameCenter)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountGameCenter other = (com.heroiclabs.nakama.api.AccountGameCenter) obj; + + if (!getPlayerId() + .equals(other.getPlayerId())) return false; + if (!getBundleId() + .equals(other.getBundleId())) return false; + if (getTimestampSeconds() + != other.getTimestampSeconds()) return false; + if (!getSalt() + .equals(other.getSalt())) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getPublicKeyUrl() + .equals(other.getPublicKeyUrl())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PLAYER_ID_FIELD_NUMBER; + hash = (53 * hash) + getPlayerId().hashCode(); + hash = (37 * hash) + BUNDLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getBundleId().hashCode(); + hash = (37 * hash) + TIMESTAMP_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestampSeconds()); + hash = (37 * hash) + SALT_FIELD_NUMBER; + hash = (53 * hash) + getSalt().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_URL_FIELD_NUMBER; + hash = (53 * hash) + getPublicKeyUrl().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountGameCenter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountGameCenter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountGameCenter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountGameCenter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send Apple's Game Center account credentials to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountGameCenter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountGameCenter) + com.heroiclabs.nakama.api.AccountGameCenterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGameCenter_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGameCenter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountGameCenter.class, com.heroiclabs.nakama.api.AccountGameCenter.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountGameCenter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playerId_ = ""; + bundleId_ = ""; + timestampSeconds_ = 0L; + salt_ = ""; + signature_ = ""; + publicKeyUrl_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGameCenter_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGameCenter getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGameCenter build() { + com.heroiclabs.nakama.api.AccountGameCenter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGameCenter buildPartial() { + com.heroiclabs.nakama.api.AccountGameCenter result = new com.heroiclabs.nakama.api.AccountGameCenter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountGameCenter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playerId_ = playerId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bundleId_ = bundleId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timestampSeconds_ = timestampSeconds_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.salt_ = salt_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.signature_ = signature_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.publicKeyUrl_ = publicKeyUrl_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountGameCenter) { + return mergeFrom((com.heroiclabs.nakama.api.AccountGameCenter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountGameCenter other) { + if (other == com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance()) return this; + if (!other.getPlayerId().isEmpty()) { + playerId_ = other.playerId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBundleId().isEmpty()) { + bundleId_ = other.bundleId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getTimestampSeconds() != 0L) { + setTimestampSeconds(other.getTimestampSeconds()); + } + if (!other.getSalt().isEmpty()) { + salt_ = other.salt_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getPublicKeyUrl().isEmpty()) { + publicKeyUrl_ = other.publicKeyUrl_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000040; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + playerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + bundleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + timestampSeconds_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + salt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + signature_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + publicKeyUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object playerId_ = ""; + /** + *
+     * Player ID (generated by GameCenter).
+     * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @return The playerId. + */ + public java.lang.String getPlayerId() { + java.lang.Object ref = playerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Player ID (generated by GameCenter).
+     * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @return The bytes for playerId. + */ + public com.google.protobuf.ByteString + getPlayerIdBytes() { + java.lang.Object ref = playerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + playerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Player ID (generated by GameCenter).
+     * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @param value The playerId to set. + * @return This builder for chaining. + */ + public Builder setPlayerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + playerId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Player ID (generated by GameCenter).
+     * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @return This builder for chaining. + */ + public Builder clearPlayerId() { + playerId_ = getDefaultInstance().getPlayerId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Player ID (generated by GameCenter).
+     * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @param value The bytes for playerId to set. + * @return This builder for chaining. + */ + public Builder setPlayerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + playerId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object bundleId_ = ""; + /** + *
+     * Bundle ID (generated by GameCenter).
+     * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @return The bundleId. + */ + public java.lang.String getBundleId() { + java.lang.Object ref = bundleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bundleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Bundle ID (generated by GameCenter).
+     * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @return The bytes for bundleId. + */ + public com.google.protobuf.ByteString + getBundleIdBytes() { + java.lang.Object ref = bundleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Bundle ID (generated by GameCenter).
+     * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @param value The bundleId to set. + * @return This builder for chaining. + */ + public Builder setBundleId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + bundleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Bundle ID (generated by GameCenter).
+     * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @return This builder for chaining. + */ + public Builder clearBundleId() { + bundleId_ = getDefaultInstance().getBundleId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Bundle ID (generated by GameCenter).
+     * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @param value The bytes for bundleId to set. + * @return This builder for chaining. + */ + public Builder setBundleIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + bundleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long timestampSeconds_ ; + /** + *
+     * Time since UNIX epoch when the signature was created.
+     * 
+ * + * int64 timestamp_seconds = 3 [json_name = "timestampSeconds"]; + * @return The timestampSeconds. + */ + @java.lang.Override + public long getTimestampSeconds() { + return timestampSeconds_; + } + /** + *
+     * Time since UNIX epoch when the signature was created.
+     * 
+ * + * int64 timestamp_seconds = 3 [json_name = "timestampSeconds"]; + * @param value The timestampSeconds to set. + * @return This builder for chaining. + */ + public Builder setTimestampSeconds(long value) { + + timestampSeconds_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Time since UNIX epoch when the signature was created.
+     * 
+ * + * int64 timestamp_seconds = 3 [json_name = "timestampSeconds"]; + * @return This builder for chaining. + */ + public Builder clearTimestampSeconds() { + bitField0_ = (bitField0_ & ~0x00000004); + timestampSeconds_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object salt_ = ""; + /** + *
+     * A random "NSString" used to compute the hash and keep it randomized.
+     * 
+ * + * string salt = 4 [json_name = "salt"]; + * @return The salt. + */ + public java.lang.String getSalt() { + java.lang.Object ref = salt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + salt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A random "NSString" used to compute the hash and keep it randomized.
+     * 
+ * + * string salt = 4 [json_name = "salt"]; + * @return The bytes for salt. + */ + public com.google.protobuf.ByteString + getSaltBytes() { + java.lang.Object ref = salt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + salt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A random "NSString" used to compute the hash and keep it randomized.
+     * 
+ * + * string salt = 4 [json_name = "salt"]; + * @param value The salt to set. + * @return This builder for chaining. + */ + public Builder setSalt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + salt_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A random "NSString" used to compute the hash and keep it randomized.
+     * 
+ * + * string salt = 4 [json_name = "salt"]; + * @return This builder for chaining. + */ + public Builder clearSalt() { + salt_ = getDefaultInstance().getSalt(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A random "NSString" used to compute the hash and keep it randomized.
+     * 
+ * + * string salt = 4 [json_name = "salt"]; + * @param value The bytes for salt to set. + * @return This builder for chaining. + */ + public Builder setSaltBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + salt_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object signature_ = ""; + /** + *
+     * The verification signature data generated.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The verification signature data generated.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The verification signature data generated.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + signature_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The verification signature data generated.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + signature_ = getDefaultInstance().getSignature(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The verification signature data generated.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + signature_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object publicKeyUrl_ = ""; + /** + *
+     * The URL for the public encryption key.
+     * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @return The publicKeyUrl. + */ + public java.lang.String getPublicKeyUrl() { + java.lang.Object ref = publicKeyUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL for the public encryption key.
+     * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @return The bytes for publicKeyUrl. + */ + public com.google.protobuf.ByteString + getPublicKeyUrlBytes() { + java.lang.Object ref = publicKeyUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKeyUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL for the public encryption key.
+     * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @param value The publicKeyUrl to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + publicKeyUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The URL for the public encryption key.
+     * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @return This builder for chaining. + */ + public Builder clearPublicKeyUrl() { + publicKeyUrl_ = getDefaultInstance().getPublicKeyUrl(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The URL for the public encryption key.
+     * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @param value The bytes for publicKeyUrl to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + publicKeyUrl_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000040; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountGameCenter) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountGameCenter) + private static final com.heroiclabs.nakama.api.AccountGameCenter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountGameCenter(); + } + + public static com.heroiclabs.nakama.api.AccountGameCenter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountGameCenter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGameCenter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountGameCenterOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountGameCenterOrBuilder.java new file mode 100644 index 00000000..fa92e1f2 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountGameCenterOrBuilder.java @@ -0,0 +1,175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountGameCenterOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountGameCenter) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Player ID (generated by GameCenter).
+   * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @return The playerId. + */ + java.lang.String getPlayerId(); + /** + *
+   * Player ID (generated by GameCenter).
+   * 
+ * + * string player_id = 1 [json_name = "playerId"]; + * @return The bytes for playerId. + */ + com.google.protobuf.ByteString + getPlayerIdBytes(); + + /** + *
+   * Bundle ID (generated by GameCenter).
+   * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @return The bundleId. + */ + java.lang.String getBundleId(); + /** + *
+   * Bundle ID (generated by GameCenter).
+   * 
+ * + * string bundle_id = 2 [json_name = "bundleId"]; + * @return The bytes for bundleId. + */ + com.google.protobuf.ByteString + getBundleIdBytes(); + + /** + *
+   * Time since UNIX epoch when the signature was created.
+   * 
+ * + * int64 timestamp_seconds = 3 [json_name = "timestampSeconds"]; + * @return The timestampSeconds. + */ + long getTimestampSeconds(); + + /** + *
+   * A random "NSString" used to compute the hash and keep it randomized.
+   * 
+ * + * string salt = 4 [json_name = "salt"]; + * @return The salt. + */ + java.lang.String getSalt(); + /** + *
+   * A random "NSString" used to compute the hash and keep it randomized.
+   * 
+ * + * string salt = 4 [json_name = "salt"]; + * @return The bytes for salt. + */ + com.google.protobuf.ByteString + getSaltBytes(); + + /** + *
+   * The verification signature data generated.
+   * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The signature. + */ + java.lang.String getSignature(); + /** + *
+   * The verification signature data generated.
+   * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + + /** + *
+   * The URL for the public encryption key.
+   * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @return The publicKeyUrl. + */ + java.lang.String getPublicKeyUrl(); + /** + *
+   * The URL for the public encryption key.
+   * 
+ * + * string public_key_url = 6 [json_name = "publicKeyUrl"]; + * @return The bytes for publicKeyUrl. + */ + com.google.protobuf.ByteString + getPublicKeyUrlBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 7 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountGoogle.java b/src/main/java/com/heroiclabs/nakama/api/AccountGoogle.java new file mode 100644 index 00000000..126c0a08 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountGoogle.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send a Google token to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountGoogle} + */ +public final class AccountGoogle extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountGoogle) + AccountGoogleOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountGoogle.class.getName()); + } + // Use AccountGoogle.newBuilder() to construct. + private AccountGoogle(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountGoogle() { + token_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountGoogle.class, com.heroiclabs.nakama.api.AccountGoogle.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * The OAuth token received from Google to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * The OAuth token received from Google to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountGoogle)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountGoogle other = (com.heroiclabs.nakama.api.AccountGoogle) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountGoogle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountGoogle parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountGoogle parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountGoogle prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a Google token to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountGoogle} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountGoogle) + com.heroiclabs.nakama.api.AccountGoogleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountGoogle.class, com.heroiclabs.nakama.api.AccountGoogle.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountGoogle.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountGoogle_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGoogle getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGoogle build() { + com.heroiclabs.nakama.api.AccountGoogle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGoogle buildPartial() { + com.heroiclabs.nakama.api.AccountGoogle result = new com.heroiclabs.nakama.api.AccountGoogle(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountGoogle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountGoogle) { + return mergeFrom((com.heroiclabs.nakama.api.AccountGoogle)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountGoogle other) { + if (other == com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * The OAuth token received from Google to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The OAuth token received from Google to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The OAuth token received from Google to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The OAuth token received from Google to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The OAuth token received from Google to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountGoogle) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountGoogle) + private static final com.heroiclabs.nakama.api.AccountGoogle DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountGoogle(); + } + + public static com.heroiclabs.nakama.api.AccountGoogle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountGoogle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGoogle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountGoogleOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountGoogleOrBuilder.java new file mode 100644 index 00000000..0ab42b1f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountGoogleOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountGoogleOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountGoogle) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The OAuth token received from Google to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * The OAuth token received from Google to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountOrBuilder.java new file mode 100644 index 00000000..4176da37 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountOrBuilder.java @@ -0,0 +1,196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Account) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + com.heroiclabs.nakama.api.User getUser(); + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder(); + + /** + *
+   * The user's wallet data.
+   * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @return The wallet. + */ + java.lang.String getWallet(); + /** + *
+   * The user's wallet data.
+   * 
+ * + * string wallet = 2 [json_name = "wallet"]; + * @return The bytes for wallet. + */ + com.google.protobuf.ByteString + getWalletBytes(); + + /** + *
+   * The email address of the user.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+   * The email address of the user.
+   * 
+ * + * string email = 3 [json_name = "email"]; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); + + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + java.util.List + getDevicesList(); + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + com.heroiclabs.nakama.api.AccountDevice getDevices(int index); + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + int getDevicesCount(); + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + java.util.List + getDevicesOrBuilderList(); + /** + *
+   * The devices which belong to the user's account.
+   * 
+ * + * repeated .nakama.api.AccountDevice devices = 4 [json_name = "devices"]; + */ + com.heroiclabs.nakama.api.AccountDeviceOrBuilder getDevicesOrBuilder( + int index); + + /** + *
+   * The custom id in the user's account.
+   * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @return The customId. + */ + java.lang.String getCustomId(); + /** + *
+   * The custom id in the user's account.
+   * 
+ * + * string custom_id = 5 [json_name = "customId"]; + * @return The bytes for customId. + */ + com.google.protobuf.ByteString + getCustomIdBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + * @return Whether the verifyTime field is set. + */ + boolean hasVerifyTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + * @return The verifyTime. + */ + com.google.protobuf.Timestamp getVerifyTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
+   * 
+ * + * .google.protobuf.Timestamp verify_time = 6 [json_name = "verifyTime"]; + */ + com.google.protobuf.TimestampOrBuilder getVerifyTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+   * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + * @return Whether the disableTime field is set. + */ + boolean hasDisableTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+   * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + * @return The disableTime. + */ + com.google.protobuf.Timestamp getDisableTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned.
+   * 
+ * + * .google.protobuf.Timestamp disable_time = 7 [json_name = "disableTime"]; + */ + com.google.protobuf.TimestampOrBuilder getDisableTimeOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountRefresh.java b/src/main/java/com/heroiclabs/nakama/api/AccountRefresh.java new file mode 100644 index 00000000..86378287 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountRefresh.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Obtain a new authentication token using a refresh token.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountRefresh} + */ +public final class AccountRefresh extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountRefresh) + AccountRefreshOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountRefresh.class.getName()); + } + // Use AccountRefresh.newBuilder() to construct. + private AccountRefresh(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountRefresh() { + token_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountRefresh.class, com.heroiclabs.nakama.api.AccountRefresh.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountRefresh)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountRefresh other = (com.heroiclabs.nakama.api.AccountRefresh) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountRefresh parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountRefresh parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountRefresh parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountRefresh prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Obtain a new authentication token using a refresh token.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountRefresh} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountRefresh) + com.heroiclabs.nakama.api.AccountRefreshOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountRefresh.class, com.heroiclabs.nakama.api.AccountRefresh.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountRefresh.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountRefresh_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountRefresh getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountRefresh.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountRefresh build() { + com.heroiclabs.nakama.api.AccountRefresh result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountRefresh buildPartial() { + com.heroiclabs.nakama.api.AccountRefresh result = new com.heroiclabs.nakama.api.AccountRefresh(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountRefresh result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountRefresh) { + return mergeFrom((com.heroiclabs.nakama.api.AccountRefresh)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountRefresh other) { + if (other == com.heroiclabs.nakama.api.AccountRefresh.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountRefresh) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountRefresh) + private static final com.heroiclabs.nakama.api.AccountRefresh DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountRefresh(); + } + + public static com.heroiclabs.nakama.api.AccountRefresh getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountRefresh parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountRefresh getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountRefreshOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountRefreshOrBuilder.java new file mode 100644 index 00000000..7466a794 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountRefreshOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountRefreshOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountRefresh) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountSteam.java b/src/main/java/com/heroiclabs/nakama/api/AccountSteam.java new file mode 100644 index 00000000..9207f61c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountSteam.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Send a Steam token to the server. Used with authenticate/link/unlink.
+ * 
+ * + * Protobuf type {@code nakama.api.AccountSteam} + */ +public final class AccountSteam extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AccountSteam) + AccountSteamOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AccountSteam.class.getName()); + } + // Use AccountSteam.newBuilder() to construct. + private AccountSteam(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AccountSteam() { + token_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountSteam.class, com.heroiclabs.nakama.api.AccountSteam.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * The account token received from Steam to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * The account token received from Steam to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AccountSteam)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AccountSteam other = (com.heroiclabs.nakama.api.AccountSteam) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AccountSteam parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AccountSteam parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AccountSteam parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AccountSteam prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a Steam token to the server. Used with authenticate/link/unlink.
+   * 
+ * + * Protobuf type {@code nakama.api.AccountSteam} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AccountSteam) + com.heroiclabs.nakama.api.AccountSteamOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AccountSteam.class, com.heroiclabs.nakama.api.AccountSteam.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AccountSteam.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AccountSteam_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteam getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteam build() { + com.heroiclabs.nakama.api.AccountSteam result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteam buildPartial() { + com.heroiclabs.nakama.api.AccountSteam result = new com.heroiclabs.nakama.api.AccountSteam(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AccountSteam result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AccountSteam) { + return mergeFrom((com.heroiclabs.nakama.api.AccountSteam)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AccountSteam other) { + if (other == com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * The account token received from Steam to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The account token received from Steam to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The account token received from Steam to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account token received from Steam to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The account token received from Steam to access their profile API.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AccountSteam) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AccountSteam) + private static final com.heroiclabs.nakama.api.AccountSteam DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AccountSteam(); + } + + public static com.heroiclabs.nakama.api.AccountSteam getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountSteam parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteam getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AccountSteamOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AccountSteamOrBuilder.java new file mode 100644 index 00000000..bffb0ac9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AccountSteamOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AccountSteamOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AccountSteam) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The account token received from Steam to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * The account token received from Steam to access their profile API.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AddFriendsRequest.java b/src/main/java/com/heroiclabs/nakama/api/AddFriendsRequest.java new file mode 100644 index 00000000..6f90409d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AddFriendsRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Add one or more friends to the current user.
+ * 
+ * + * Protobuf type {@code nakama.api.AddFriendsRequest} + */ +public final class AddFriendsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AddFriendsRequest) + AddFriendsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AddFriendsRequest.class.getName()); + } + // Use AddFriendsRequest.newBuilder() to construct. + private AddFriendsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AddFriendsRequest() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AddFriendsRequest.class, com.heroiclabs.nakama.api.AddFriendsRequest.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + return ids_; + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + + public static final int USERNAMES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + return usernames_; + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < ids_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i)); + } + for (int i = 0; i < usernames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, usernames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ids_.size(); i++) { + dataSize += computeStringSizeNoTag(ids_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < usernames_.size(); i++) { + dataSize += computeStringSizeNoTag(usernames_.getRaw(i)); + } + size += dataSize; + size += 1 * getUsernamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AddFriendsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AddFriendsRequest other = (com.heroiclabs.nakama.api.AddFriendsRequest) obj; + + if (!getIdsList() + .equals(other.getIdsList())) return false; + if (!getUsernamesList() + .equals(other.getUsernamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getUsernamesCount() > 0) { + hash = (37 * hash) + USERNAMES_FIELD_NUMBER; + hash = (53 * hash) + getUsernamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AddFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AddFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AddFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AddFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Add one or more friends to the current user.
+   * 
+ * + * Protobuf type {@code nakama.api.AddFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AddFriendsRequest) + com.heroiclabs.nakama.api.AddFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AddFriendsRequest.class, com.heroiclabs.nakama.api.AddFriendsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AddFriendsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddFriendsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddFriendsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AddFriendsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddFriendsRequest build() { + com.heroiclabs.nakama.api.AddFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddFriendsRequest buildPartial() { + com.heroiclabs.nakama.api.AddFriendsRequest result = new com.heroiclabs.nakama.api.AddFriendsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AddFriendsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + usernames_.makeImmutable(); + result.usernames_ = usernames_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AddFriendsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AddFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AddFriendsRequest other) { + if (other == com.heroiclabs.nakama.api.AddFriendsRequest.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ |= 0x00000001; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.usernames_.isEmpty()) { + if (usernames_.isEmpty()) { + usernames_ = other.usernames_; + bitField0_ |= 0x00000002; + } else { + ensureUsernamesIsMutable(); + usernames_.addAll(other.usernames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureIdsIsMutable(); + ids_.add(s); + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUsernamesIsMutable(); + usernames_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = new com.google.protobuf.LazyStringArrayList(ids_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds( + java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ids_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The bytes of the ids to add. + * @return This builder for chaining. + */ + public Builder addIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUsernamesIsMutable() { + if (!usernames_.isModifiable()) { + usernames_ = new com.google.protobuf.LazyStringArrayList(usernames_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + usernames_.makeImmutable(); + return usernames_; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index to set the value at. + * @param value The usernames to set. + * @return This builder for chaining. + */ + public Builder setUsernames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param values The usernames to add. + * @return This builder for chaining. + */ + public Builder addAllUsernames( + java.lang.Iterable values) { + ensureUsernamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, usernames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return This builder for chaining. + */ + public Builder clearUsernames() { + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The bytes of the usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AddFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AddFriendsRequest) + private static final com.heroiclabs.nakama.api.AddFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AddFriendsRequest(); + } + + public static com.heroiclabs.nakama.api.AddFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AddFriendsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AddFriendsRequestOrBuilder.java new file mode 100644 index 00000000..6c5fd5a7 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AddFriendsRequestOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AddFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AddFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + java.util.List + getIdsList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + int getIdsCount(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + java.lang.String getIds(int index); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + com.google.protobuf.ByteString + getIdsBytes(int index); + + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + java.util.List + getUsernamesList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + int getUsernamesCount(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + java.lang.String getUsernames(int index); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + com.google.protobuf.ByteString + getUsernamesBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequest.java b/src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequest.java new file mode 100644 index 00000000..021c6749 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Add users to a group.
+ * 
+ * + * Protobuf type {@code nakama.api.AddGroupUsersRequest} + */ +public final class AddGroupUsersRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AddGroupUsersRequest) + AddGroupUsersRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AddGroupUsersRequest.class.getName()); + } + // Use AddGroupUsersRequest.newBuilder() to construct. + private AddGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AddGroupUsersRequest() { + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AddGroupUsersRequest.class, com.heroiclabs.nakama.api.AddGroupUsersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group to add users to.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group to add users to.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + return userIds_; + } + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + for (int i = 0; i < userIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, userIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < userIds_.size(); i++) { + dataSize += computeStringSizeNoTag(userIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AddGroupUsersRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AddGroupUsersRequest other = (com.heroiclabs.nakama.api.AddGroupUsersRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdsList() + .equals(other.getUserIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getUserIdsCount() > 0) { + hash = (37 * hash) + USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUserIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AddGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AddGroupUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Add users to a group.
+   * 
+ * + * Protobuf type {@code nakama.api.AddGroupUsersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AddGroupUsersRequest) + com.heroiclabs.nakama.api.AddGroupUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AddGroupUsersRequest.class, com.heroiclabs.nakama.api.AddGroupUsersRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AddGroupUsersRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AddGroupUsersRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddGroupUsersRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AddGroupUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddGroupUsersRequest build() { + com.heroiclabs.nakama.api.AddGroupUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddGroupUsersRequest buildPartial() { + com.heroiclabs.nakama.api.AddGroupUsersRequest result = new com.heroiclabs.nakama.api.AddGroupUsersRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AddGroupUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + userIds_.makeImmutable(); + result.userIds_ = userIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AddGroupUsersRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AddGroupUsersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AddGroupUsersRequest other) { + if (other == com.heroiclabs.nakama.api.AddGroupUsersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.userIds_.isEmpty()) { + if (userIds_.isEmpty()) { + userIds_ = other.userIds_; + bitField0_ |= 0x00000002; + } else { + ensureUserIdsIsMutable(); + userIds_.addAll(other.userIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserIdsIsMutable(); + userIds_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group to add users to.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group to add users to.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group to add users to.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group to add users to.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group to add users to.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUserIdsIsMutable() { + if (!userIds_.isModifiable()) { + userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + userIds_.makeImmutable(); + return userIds_; + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index to set the value at. + * @param value The userIds to set. + * @return This builder for chaining. + */ + public Builder setUserIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param values The userIds to add. + * @return This builder for chaining. + */ + public Builder addAllUserIds( + java.lang.Iterable values) { + ensureUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return This builder for chaining. + */ + public Builder clearUserIds() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The users to add.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The bytes of the userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AddGroupUsersRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AddGroupUsersRequest) + private static final com.heroiclabs.nakama.api.AddGroupUsersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AddGroupUsersRequest(); + } + + public static com.heroiclabs.nakama.api.AddGroupUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddGroupUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AddGroupUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequestOrBuilder.java new file mode 100644 index 00000000..450cc4ac --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AddGroupUsersRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AddGroupUsersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AddGroupUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group to add users to.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group to add users to.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + java.util.List + getUserIdsList(); + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + int getUserIdsCount(); + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + java.lang.String getUserIds(int index); + /** + *
+   * The users to add.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + com.google.protobuf.ByteString + getUserIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ApiProto.java b/src/main/java/com/heroiclabs/nakama/api/ApiProto.java new file mode 100644 index 00000000..d56f1f4b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ApiProto.java @@ -0,0 +1,2017 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public final class ApiProto { + private ApiProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ApiProto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Account_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Account_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountRefresh_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountRefresh_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountRefresh_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountRefresh_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountApple_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountApple_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountApple_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountApple_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountCustom_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountCustom_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountCustom_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountCustom_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountDevice_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountDevice_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountDevice_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountDevice_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountEmail_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountEmail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountEmail_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountEmail_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountFacebook_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountFacebook_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountFacebook_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountFacebook_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountFacebookInstantGame_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountFacebookInstantGame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountFacebookInstantGame_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountFacebookInstantGame_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountGameCenter_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountGameCenter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountGameCenter_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountGameCenter_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountGoogle_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountGoogle_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountGoogle_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountGoogle_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountSteam_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountSteam_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AccountSteam_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AccountSteam_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AddFriendsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AddFriendsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AddGroupUsersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AddGroupUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_SessionRefreshRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_SessionRefreshRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_SessionRefreshRequest_VarsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_SessionRefreshRequest_VarsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_SessionLogoutRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_SessionLogoutRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateAppleRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateAppleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateCustomRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateCustomRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateDeviceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateDeviceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateEmailRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateEmailRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateFacebookRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateFacebookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateGameCenterRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateGameCenterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateGoogleRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateGoogleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_AuthenticateSteamRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_AuthenticateSteamRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_BanGroupUsersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_BanGroupUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_BlockFriendsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_BlockFriendsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ChannelMessage_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ChannelMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ChannelMessageList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ChannelMessageList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_CreateGroupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_CreateGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DeleteFriendsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DeleteFriendsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DeleteGroupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DeleteGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DeleteLeaderboardRecordRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DeleteLeaderboardRecordRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DeleteNotificationsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DeleteNotificationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DeleteTournamentRecordRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DeleteTournamentRecordRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DeleteStorageObjectId_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DeleteStorageObjectId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DeleteStorageObjectsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DeleteStorageObjectsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Event_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Event_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Event_PropertiesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Event_PropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Friend_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Friend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_FriendList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_FriendList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_FriendsOfFriendsList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_FriendsOfFriendsList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_GetUsersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_GetUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_GetSubscriptionRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_GetSubscriptionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Group_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Group_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_GroupList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_GroupList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_GroupUserList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_GroupUserList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_GroupUserList_GroupUser_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_GroupUserList_GroupUser_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ImportFacebookFriendsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ImportFacebookFriendsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ImportSteamFriendsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ImportSteamFriendsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_JoinGroupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_JoinGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_JoinTournamentRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_JoinTournamentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_KickGroupUsersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_KickGroupUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Leaderboard_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Leaderboard_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_LeaderboardList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_LeaderboardList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_LeaderboardRecord_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_LeaderboardRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_LeaderboardRecordList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_LeaderboardRecordList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_LeaveGroupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_LeaveGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_LinkFacebookRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_LinkFacebookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_LinkSteamRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_LinkSteamRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListChannelMessagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListChannelMessagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListFriendsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListFriendsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListFriendsOfFriendsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListFriendsOfFriendsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListGroupsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListGroupUsersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListGroupUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListLeaderboardRecordsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListLeaderboardRecordsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListMatchesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListMatchesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListNotificationsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListNotificationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListStorageObjectsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListStorageObjectsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListSubscriptionsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListSubscriptionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListTournamentRecordsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListTournamentRecordsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListTournamentsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListTournamentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ListUserGroupsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ListUserGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Match_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Match_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_MatchList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_MatchList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_MatchmakerCompletionStats_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_MatchmakerCompletionStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_MatchmakerStats_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_MatchmakerStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Notification_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Notification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_NotificationList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_NotificationList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_PromoteGroupUsersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_PromoteGroupUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_DemoteGroupUsersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_DemoteGroupUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ReadStorageObjectId_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ReadStorageObjectId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ReadStorageObjectsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ReadStorageObjectsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Rpc_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Rpc_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Session_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Session_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_StorageObject_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_StorageObject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_StorageObjectAck_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_StorageObjectAck_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_StorageObjectAcks_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_StorageObjectAcks_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_StorageObjects_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_StorageObjects_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_StorageObjectList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_StorageObjectList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Tournament_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Tournament_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_TournamentList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_TournamentList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_TournamentRecordList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_TournamentRecordList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_UpdateAccountRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_UpdateAccountRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_UpdateGroupRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_UpdateGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_User_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_User_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_UserGroupList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_UserGroupList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_UserGroupList_UserGroup_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_UserGroupList_UserGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_Users_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_Users_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidatePurchaseAppleRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidatePurchaseAppleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidateSubscriptionAppleRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidateSubscriptionAppleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidatePurchaseGoogleRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidatePurchaseGoogleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidateSubscriptionGoogleRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidateSubscriptionGoogleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidatePurchaseHuaweiRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidatePurchaseHuaweiRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidatedPurchase_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidatedPurchase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidatePurchaseResponse_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidatePurchaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidateSubscriptionResponse_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidateSubscriptionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_ValidatedSubscription_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_ValidatedSubscription_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_PurchaseList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_PurchaseList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_SubscriptionList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_SubscriptionList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_WriteLeaderboardRecordRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_WriteLeaderboardRecordRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_WriteStorageObject_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_WriteStorageObject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_WriteStorageObjectsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_WriteStorageObjectsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_WriteTournamentRecordRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_WriteTournamentRecordRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1github.com/heroiclabs/nakama-common/ap" + + "i/api.proto\022\nnakama.api\032\037google/protobuf" + + "/timestamp.proto\032\036google/protobuf/wrappe" + + "rs.proto\"\253\002\n\007Account\022$\n\004user\030\001 \001(\0132\020.nak" + + "ama.api.UserR\004user\022\026\n\006wallet\030\002 \001(\tR\006wall" + + "et\022\024\n\005email\030\003 \001(\tR\005email\0223\n\007devices\030\004 \003(" + + "\0132\031.nakama.api.AccountDeviceR\007devices\022\033\n" + + "\tcustom_id\030\005 \001(\tR\010customId\022;\n\013verify_tim" + + "e\030\006 \001(\0132\032.google.protobuf.TimestampR\nver" + + "ifyTime\022=\n\014disable_time\030\007 \001(\0132\032.google.p" + + "rotobuf.TimestampR\013disableTime\"\231\001\n\016Accou" + + "ntRefresh\022\024\n\005token\030\001 \001(\tR\005token\0228\n\004vars\030" + + "\002 \003(\0132$.nakama.api.AccountRefresh.VarsEn" + + "tryR\004vars\0327\n\tVarsEntry\022\020\n\003key\030\001 \001(\tR\003key" + + "\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"\225\001\n\014AccountAp" + + "ple\022\024\n\005token\030\001 \001(\tR\005token\0226\n\004vars\030\002 \003(\0132" + + "\".nakama.api.AccountApple.VarsEntryR\004var" + + "s\0327\n\tVarsEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005valu" + + "e\030\002 \001(\tR\005value:\0028\001\"\221\001\n\rAccountCustom\022\016\n\002" + + "id\030\001 \001(\tR\002id\0227\n\004vars\030\002 \003(\0132#.nakama.api." + + "AccountCustom.VarsEntryR\004vars\0327\n\tVarsEnt" + + "ry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005val" + + "ue:\0028\001\"\221\001\n\rAccountDevice\022\016\n\002id\030\001 \001(\tR\002id" + + "\0227\n\004vars\030\002 \003(\0132#.nakama.api.AccountDevic" + + "e.VarsEntryR\004vars\0327\n\tVarsEntry\022\020\n\003key\030\001 " + + "\001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"\261\001\n\014A" + + "ccountEmail\022\024\n\005email\030\001 \001(\tR\005email\022\032\n\010pas" + + "sword\030\002 \001(\tR\010password\0226\n\004vars\030\003 \003(\0132\".na" + + "kama.api.AccountEmail.VarsEntryR\004vars\0327\n" + + "\tVarsEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 " + + "\001(\tR\005value:\0028\001\"\233\001\n\017AccountFacebook\022\024\n\005to" + + "ken\030\001 \001(\tR\005token\0229\n\004vars\030\002 \003(\0132%.nakama." + + "api.AccountFacebook.VarsEntryR\004vars\0327\n\tV" + + "arsEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(" + + "\tR\005value:\0028\001\"\311\001\n\032AccountFacebookInstantG" + + "ame\022,\n\022signed_player_info\030\001 \001(\tR\020signedP" + + "layerInfo\022D\n\004vars\030\002 \003(\01320.nakama.api.Acc" + + "ountFacebookInstantGame.VarsEntryR\004vars\032" + + "7\n\tVarsEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030" + + "\002 \001(\tR\005value:\0028\001\"\310\002\n\021AccountGameCenter\022\033" + + "\n\tplayer_id\030\001 \001(\tR\010playerId\022\033\n\tbundle_id" + + "\030\002 \001(\tR\010bundleId\022+\n\021timestamp_seconds\030\003 " + + "\001(\003R\020timestampSeconds\022\022\n\004salt\030\004 \001(\tR\004sal" + + "t\022\034\n\tsignature\030\005 \001(\tR\tsignature\022$\n\016publi" + + "c_key_url\030\006 \001(\tR\014publicKeyUrl\022;\n\004vars\030\007 " + + "\003(\0132\'.nakama.api.AccountGameCenter.VarsE" + + "ntryR\004vars\0327\n\tVarsEntry\022\020\n\003key\030\001 \001(\tR\003ke" + + "y\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"\227\001\n\rAccountG" + + "oogle\022\024\n\005token\030\001 \001(\tR\005token\0227\n\004vars\030\002 \003(" + + "\0132#.nakama.api.AccountGoogle.VarsEntryR\004" + + "vars\0327\n\tVarsEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005v" + + "alue\030\002 \001(\tR\005value:\0028\001\"\225\001\n\014AccountSteam\022\024" + + "\n\005token\030\001 \001(\tR\005token\0226\n\004vars\030\002 \003(\0132\".nak" + + "ama.api.AccountSteam.VarsEntryR\004vars\0327\n\t" + + "VarsEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001" + + "(\tR\005value:\0028\001\"C\n\021AddFriendsRequest\022\020\n\003id" + + "s\030\001 \003(\tR\003ids\022\034\n\tusernames\030\002 \003(\tR\tusernam" + + "es\"L\n\024AddGroupUsersRequest\022\031\n\010group_id\030\001" + + " \001(\tR\007groupId\022\031\n\010user_ids\030\002 \003(\tR\007userIds" + + "\"\247\001\n\025SessionRefreshRequest\022\024\n\005token\030\001 \001(" + + "\tR\005token\022?\n\004vars\030\002 \003(\0132+.nakama.api.Sess" + + "ionRefreshRequest.VarsEntryR\004vars\0327\n\tVar" + + "sEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR" + + "\005value:\0028\001\"Q\n\024SessionLogoutRequest\022\024\n\005to" + + "ken\030\001 \001(\tR\005token\022#\n\rrefresh_token\030\002 \001(\tR" + + "\014refreshToken\"\236\001\n\030AuthenticateAppleReque" + + "st\0222\n\007account\030\001 \001(\0132\030.nakama.api.Account" + + "AppleR\007account\0222\n\006create\030\002 \001(\0132\032.google." + + "protobuf.BoolValueR\006create\022\032\n\010username\030\003" + + " \001(\tR\010username\"\240\001\n\031AuthenticateCustomReq" + + "uest\0223\n\007account\030\001 \001(\0132\031.nakama.api.Accou" + + "ntCustomR\007account\0222\n\006create\030\002 \001(\0132\032.goog" + + "le.protobuf.BoolValueR\006create\022\032\n\010usernam" + + "e\030\003 \001(\tR\010username\"\240\001\n\031AuthenticateDevice" + + "Request\0223\n\007account\030\001 \001(\0132\031.nakama.api.Ac" + + "countDeviceR\007account\0222\n\006create\030\002 \001(\0132\032.g" + + "oogle.protobuf.BoolValueR\006create\022\032\n\010user" + + "name\030\003 \001(\tR\010username\"\236\001\n\030AuthenticateEma" + + "ilRequest\0222\n\007account\030\001 \001(\0132\030.nakama.api." + + "AccountEmailR\007account\0222\n\006create\030\002 \001(\0132\032." + + "google.protobuf.BoolValueR\006create\022\032\n\010use" + + "rname\030\003 \001(\tR\010username\"\324\001\n\033AuthenticateFa" + + "cebookRequest\0225\n\007account\030\001 \001(\0132\033.nakama." + + "api.AccountFacebookR\007account\0222\n\006create\030\002" + + " \001(\0132\032.google.protobuf.BoolValueR\006create" + + "\022\032\n\010username\030\003 \001(\tR\010username\022.\n\004sync\030\004 \001" + + "(\0132\032.google.protobuf.BoolValueR\004sync\"\272\001\n" + + "&AuthenticateFacebookInstantGameRequest\022" + + "@\n\007account\030\001 \001(\0132&.nakama.api.AccountFac" + + "ebookInstantGameR\007account\0222\n\006create\030\002 \001(" + + "\0132\032.google.protobuf.BoolValueR\006create\022\032\n" + + "\010username\030\003 \001(\tR\010username\"\250\001\n\035Authentica" + + "teGameCenterRequest\0227\n\007account\030\001 \001(\0132\035.n" + + "akama.api.AccountGameCenterR\007account\0222\n\006" + + "create\030\002 \001(\0132\032.google.protobuf.BoolValue" + + "R\006create\022\032\n\010username\030\003 \001(\tR\010username\"\240\001\n" + + "\031AuthenticateGoogleRequest\0223\n\007account\030\001 " + + "\001(\0132\031.nakama.api.AccountGoogleR\007account\022" + + "2\n\006create\030\002 \001(\0132\032.google.protobuf.BoolVa" + + "lueR\006create\022\032\n\010username\030\003 \001(\tR\010username\"" + + "\316\001\n\030AuthenticateSteamRequest\0222\n\007account\030" + + "\001 \001(\0132\030.nakama.api.AccountSteamR\007account" + + "\0222\n\006create\030\002 \001(\0132\032.google.protobuf.BoolV" + + "alueR\006create\022\032\n\010username\030\003 \001(\tR\010username" + + "\022.\n\004sync\030\004 \001(\0132\032.google.protobuf.BoolVal" + + "ueR\004sync\"L\n\024BanGroupUsersRequest\022\031\n\010grou" + + "p_id\030\001 \001(\tR\007groupId\022\031\n\010user_ids\030\002 \003(\tR\007u" + + "serIds\"E\n\023BlockFriendsRequest\022\020\n\003ids\030\001 \003" + + "(\tR\003ids\022\034\n\tusernames\030\002 \003(\tR\tusernames\"\200\004" + + "\n\016ChannelMessage\022\035\n\nchannel_id\030\001 \001(\tR\tch" + + "annelId\022\035\n\nmessage_id\030\002 \001(\tR\tmessageId\022/" + + "\n\004code\030\003 \001(\0132\033.google.protobuf.Int32Valu" + + "eR\004code\022\033\n\tsender_id\030\004 \001(\tR\010senderId\022\032\n\010" + + "username\030\005 \001(\tR\010username\022\030\n\007content\030\006 \001(" + + "\tR\007content\022;\n\013create_time\030\007 \001(\0132\032.google" + + ".protobuf.TimestampR\ncreateTime\022;\n\013updat" + + "e_time\030\010 \001(\0132\032.google.protobuf.Timestamp" + + "R\nupdateTime\022:\n\npersistent\030\t \001(\0132\032.googl" + + "e.protobuf.BoolValueR\npersistent\022\033\n\troom" + + "_name\030\n \001(\tR\010roomName\022\031\n\010group_id\030\013 \001(\tR" + + "\007groupId\022\036\n\013user_id_one\030\014 \001(\tR\tuserIdOne" + + "\022\036\n\013user_id_two\030\r \001(\tR\tuserIdTwo\"\271\001\n\022Cha" + + "nnelMessageList\0226\n\010messages\030\001 \003(\0132\032.naka" + + "ma.api.ChannelMessageR\010messages\022\037\n\013next_" + + "cursor\030\002 \001(\tR\nnextCursor\022\037\n\013prev_cursor\030" + + "\003 \001(\tR\nprevCursor\022)\n\020cacheable_cursor\030\004 " + + "\001(\tR\017cacheableCursor\"\265\001\n\022CreateGroupRequ" + + "est\022\022\n\004name\030\001 \001(\tR\004name\022 \n\013description\030\002" + + " \001(\tR\013description\022\031\n\010lang_tag\030\003 \001(\tR\007lan" + + "gTag\022\035\n\navatar_url\030\004 \001(\tR\tavatarUrl\022\022\n\004o" + + "pen\030\005 \001(\010R\004open\022\033\n\tmax_count\030\006 \001(\005R\010maxC" + + "ount\"F\n\024DeleteFriendsRequest\022\020\n\003ids\030\001 \003(" + + "\tR\003ids\022\034\n\tusernames\030\002 \003(\tR\tusernames\"/\n\022" + + "DeleteGroupRequest\022\031\n\010group_id\030\001 \001(\tR\007gr" + + "oupId\"G\n\036DeleteLeaderboardRecordRequest\022" + + "%\n\016leaderboard_id\030\001 \001(\tR\rleaderboardId\"." + + "\n\032DeleteNotificationsRequest\022\020\n\003ids\030\001 \003(" + + "\tR\003ids\"D\n\035DeleteTournamentRecordRequest\022" + + "#\n\rtournament_id\030\001 \001(\tR\014tournamentId\"c\n\025" + + "DeleteStorageObjectId\022\036\n\ncollection\030\001 \001(" + + "\tR\ncollection\022\020\n\003key\030\002 \001(\tR\003key\022\030\n\007versi" + + "on\030\003 \001(\tR\007version\"_\n\033DeleteStorageObject" + + "sRequest\022@\n\nobject_ids\030\001 \003(\0132!.nakama.ap" + + "i.DeleteStorageObjectIdR\tobjectIds\"\363\001\n\005E" + + "vent\022\022\n\004name\030\001 \001(\tR\004name\022A\n\nproperties\030\002" + + " \003(\0132!.nakama.api.Event.PropertiesEntryR" + + "\nproperties\0228\n\ttimestamp\030\003 \001(\0132\032.google." + + "protobuf.TimestampR\ttimestamp\022\032\n\010externa" + + "l\030\004 \001(\010R\010external\032=\n\017PropertiesEntry\022\020\n\003" + + "key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001" + + "\"\346\001\n\006Friend\022$\n\004user\030\001 \001(\0132\020.nakama.api.U" + + "serR\004user\0221\n\005state\030\002 \001(\0132\033.google.protob" + + "uf.Int32ValueR\005state\022;\n\013update_time\030\003 \001(" + + "\0132\032.google.protobuf.TimestampR\nupdateTim" + + "e\"F\n\005State\022\n\n\006FRIEND\020\000\022\017\n\013INVITE_SENT\020\001\022" + + "\023\n\017INVITE_RECEIVED\020\002\022\013\n\007BLOCKED\020\003\"R\n\nFri" + + "endList\022,\n\007friends\030\001 \003(\0132\022.nakama.api.Fr" + + "iendR\007friends\022\026\n\006cursor\030\002 \001(\tR\006cursor\"\341\001" + + "\n\024FriendsOfFriendsList\022]\n\022friends_of_fri" + + "ends\030\001 \003(\0132/.nakama.api.FriendsOfFriends" + + "List.FriendOfFriendR\020friendsOfFriends\022\026\n" + + "\006cursor\030\002 \001(\tR\006cursor\032R\n\016FriendOfFriend\022" + + "\032\n\010referrer\030\001 \001(\tR\010referrer\022$\n\004user\030\002 \001(" + + "\0132\020.nakama.api.UserR\004user\"d\n\017GetUsersReq" + + "uest\022\020\n\003ids\030\001 \003(\tR\003ids\022\034\n\tusernames\030\002 \003(" + + "\tR\tusernames\022!\n\014facebook_ids\030\003 \003(\tR\013face" + + "bookIds\"7\n\026GetSubscriptionRequest\022\035\n\npro" + + "duct_id\030\001 \001(\tR\tproductId\"\250\003\n\005Group\022\016\n\002id" + + "\030\001 \001(\tR\002id\022\035\n\ncreator_id\030\002 \001(\tR\tcreatorI" + + "d\022\022\n\004name\030\003 \001(\tR\004name\022 \n\013description\030\004 \001" + + "(\tR\013description\022\031\n\010lang_tag\030\005 \001(\tR\007langT" + + "ag\022\032\n\010metadata\030\006 \001(\tR\010metadata\022\035\n\navatar" + + "_url\030\007 \001(\tR\tavatarUrl\022.\n\004open\030\010 \001(\0132\032.go" + + "ogle.protobuf.BoolValueR\004open\022\035\n\nedge_co" + + "unt\030\t \001(\005R\tedgeCount\022\033\n\tmax_count\030\n \001(\005R" + + "\010maxCount\022;\n\013create_time\030\013 \001(\0132\032.google." + + "protobuf.TimestampR\ncreateTime\022;\n\013update" + + "_time\030\014 \001(\0132\032.google.protobuf.TimestampR" + + "\nupdateTime\"N\n\tGroupList\022)\n\006groups\030\001 \003(\013" + + "2\021.nakama.api.GroupR\006groups\022\026\n\006cursor\030\002 " + + "\001(\tR\006cursor\"\226\002\n\rGroupUserList\022D\n\013group_u" + + "sers\030\001 \003(\0132#.nakama.api.GroupUserList.Gr" + + "oupUserR\ngroupUsers\022\026\n\006cursor\030\002 \001(\tR\006cur" + + "sor\032\246\001\n\tGroupUser\022$\n\004user\030\001 \001(\0132\020.nakama" + + ".api.UserR\004user\0221\n\005state\030\002 \001(\0132\033.google." + + "protobuf.Int32ValueR\005state\"@\n\005State\022\016\n\nS" + + "UPERADMIN\020\000\022\t\n\005ADMIN\020\001\022\n\n\006MEMBER\020\002\022\020\n\014JO" + + "IN_REQUEST\020\003\"\207\001\n\034ImportFacebookFriendsRe" + + "quest\0225\n\007account\030\001 \001(\0132\033.nakama.api.Acco" + + "untFacebookR\007account\0220\n\005reset\030\002 \001(\0132\032.go" + + "ogle.protobuf.BoolValueR\005reset\"\201\001\n\031Impor" + + "tSteamFriendsRequest\0222\n\007account\030\001 \001(\0132\030." + + "nakama.api.AccountSteamR\007account\0220\n\005rese" + + "t\030\002 \001(\0132\032.google.protobuf.BoolValueR\005res" + + "et\"-\n\020JoinGroupRequest\022\031\n\010group_id\030\001 \001(\t" + + "R\007groupId\"<\n\025JoinTournamentRequest\022#\n\rto" + + "urnament_id\030\001 \001(\tR\014tournamentId\"M\n\025KickG" + + "roupUsersRequest\022\031\n\010group_id\030\001 \001(\tR\007grou" + + "pId\022\031\n\010user_ids\030\002 \003(\tR\007userIds\"\253\002\n\013Leade" + + "rboard\022\016\n\002id\030\001 \001(\tR\002id\022\035\n\nsort_order\030\002 \001" + + "(\rR\tsortOrder\0220\n\010operator\030\003 \001(\0162\024.nakama" + + ".api.OperatorR\010operator\022\035\n\nprev_reset\030\004 " + + "\001(\rR\tprevReset\022\035\n\nnext_reset\030\005 \001(\rR\tnext" + + "Reset\022\032\n\010metadata\030\006 \001(\tR\010metadata\022;\n\013cre" + + "ate_time\030\007 \001(\0132\032.google.protobuf.Timesta" + + "mpR\ncreateTime\022$\n\rauthoritative\030\010 \001(\010R\ra" + + "uthoritative\"f\n\017LeaderboardList\022;\n\014leade" + + "rboards\030\001 \003(\0132\027.nakama.api.LeaderboardR\014" + + "leaderboards\022\026\n\006cursor\030\002 \001(\tR\006cursor\"\351\003\n" + + "\021LeaderboardRecord\022%\n\016leaderboard_id\030\001 \001" + + "(\tR\rleaderboardId\022\031\n\010owner_id\030\002 \001(\tR\007own" + + "erId\0228\n\010username\030\003 \001(\0132\034.google.protobuf" + + ".StringValueR\010username\022\024\n\005score\030\004 \001(\003R\005s" + + "core\022\032\n\010subscore\030\005 \001(\003R\010subscore\022\033\n\tnum_" + + "score\030\006 \001(\005R\010numScore\022\032\n\010metadata\030\007 \001(\tR" + + "\010metadata\022;\n\013create_time\030\010 \001(\0132\032.google." + + "protobuf.TimestampR\ncreateTime\022;\n\013update" + + "_time\030\t \001(\0132\032.google.protobuf.TimestampR" + + "\nupdateTime\022;\n\013expiry_time\030\n \001(\0132\032.googl" + + "e.protobuf.TimestampR\nexpiryTime\022\022\n\004rank" + + "\030\013 \001(\003R\004rank\022\"\n\rmax_num_score\030\014 \001(\rR\013max" + + "NumScore\"\365\001\n\025LeaderboardRecordList\0227\n\007re" + + "cords\030\001 \003(\0132\035.nakama.api.LeaderboardReco" + + "rdR\007records\022B\n\rowner_records\030\002 \003(\0132\035.nak" + + "ama.api.LeaderboardRecordR\014ownerRecords\022" + + "\037\n\013next_cursor\030\003 \001(\tR\nnextCursor\022\037\n\013prev" + + "_cursor\030\004 \001(\tR\nprevCursor\022\035\n\nrank_count\030" + + "\005 \001(\003R\trankCount\".\n\021LeaveGroupRequest\022\031\n" + + "\010group_id\030\001 \001(\tR\007groupId\"|\n\023LinkFacebook" + + "Request\0225\n\007account\030\001 \001(\0132\033.nakama.api.Ac" + + "countFacebookR\007account\022.\n\004sync\030\002 \001(\0132\032.g" + + "oogle.protobuf.BoolValueR\004sync\"v\n\020LinkSt" + + "eamRequest\0222\n\007account\030\001 \001(\0132\030.nakama.api" + + ".AccountSteamR\007account\022.\n\004sync\030\002 \001(\0132\032.g" + + "oogle.protobuf.BoolValueR\004sync\"\274\001\n\032ListC" + + "hannelMessagesRequest\022\035\n\nchannel_id\030\001 \001(" + + "\tR\tchannelId\0221\n\005limit\030\002 \001(\0132\033.google.pro" + + "tobuf.Int32ValueR\005limit\0224\n\007forward\030\003 \001(\013" + + "2\032.google.protobuf.BoolValueR\007forward\022\026\n" + + "\006cursor\030\004 \001(\tR\006cursor\"\222\001\n\022ListFriendsReq" + + "uest\0221\n\005limit\030\001 \001(\0132\033.google.protobuf.In" + + "t32ValueR\005limit\0221\n\005state\030\002 \001(\0132\033.google." + + "protobuf.Int32ValueR\005state\022\026\n\006cursor\030\003 \001" + + "(\tR\006cursor\"h\n\033ListFriendsOfFriendsReques" + + "t\0221\n\005limit\030\001 \001(\0132\033.google.protobuf.Int32" + + "ValueR\005limit\022\026\n\006cursor\030\002 \001(\tR\006cursor\"\364\001\n" + + "\021ListGroupsRequest\022\022\n\004name\030\001 \001(\tR\004name\022\026" + + "\n\006cursor\030\002 \001(\tR\006cursor\0221\n\005limit\030\003 \001(\0132\033." + + "google.protobuf.Int32ValueR\005limit\022\031\n\010lan" + + "g_tag\030\004 \001(\tR\007langTag\0225\n\007members\030\005 \001(\0132\033." + + "google.protobuf.Int32ValueR\007members\022.\n\004o" + + "pen\030\006 \001(\0132\032.google.protobuf.BoolValueR\004o" + + "pen\"\260\001\n\025ListGroupUsersRequest\022\031\n\010group_i" + + "d\030\001 \001(\tR\007groupId\0221\n\005limit\030\002 \001(\0132\033.google" + + ".protobuf.Int32ValueR\005limit\0221\n\005state\030\003 \001" + + "(\0132\033.google.protobuf.Int32ValueR\005state\022\026" + + "\n\006cursor\030\004 \001(\tR\006cursor\"\355\001\n(ListLeaderboa" + + "rdRecordsAroundOwnerRequest\022%\n\016leaderboa" + + "rd_id\030\001 \001(\tR\rleaderboardId\0222\n\005limit\030\002 \001(" + + "\0132\034.google.protobuf.UInt32ValueR\005limit\022\031" + + "\n\010owner_id\030\003 \001(\tR\007ownerId\0223\n\006expiry\030\004 \001(" + + "\0132\033.google.protobuf.Int64ValueR\006expiry\022\026" + + "\n\006cursor\030\005 \001(\tR\006cursor\"\343\001\n\035ListLeaderboa" + + "rdRecordsRequest\022%\n\016leaderboard_id\030\001 \001(\t" + + "R\rleaderboardId\022\033\n\towner_ids\030\002 \003(\tR\010owne" + + "rIds\0221\n\005limit\030\003 \001(\0132\033.google.protobuf.In" + + "t32ValueR\005limit\022\026\n\006cursor\030\004 \001(\tR\006cursor\022" + + "3\n\006expiry\030\005 \001(\0132\033.google.protobuf.Int64V" + + "alueR\006expiry\"\341\002\n\022ListMatchesRequest\0221\n\005l" + + "imit\030\001 \001(\0132\033.google.protobuf.Int32ValueR" + + "\005limit\022@\n\rauthoritative\030\002 \001(\0132\032.google.p" + + "rotobuf.BoolValueR\rauthoritative\0222\n\005labe" + + "l\030\003 \001(\0132\034.google.protobuf.StringValueR\005l" + + "abel\0226\n\010min_size\030\004 \001(\0132\033.google.protobuf" + + ".Int32ValueR\007minSize\0226\n\010max_size\030\005 \001(\0132\033" + + ".google.protobuf.Int32ValueR\007maxSize\0222\n\005" + + "query\030\006 \001(\0132\034.google.protobuf.StringValu" + + "eR\005query\"x\n\030ListNotificationsRequest\0221\n\005" + + "limit\030\001 \001(\0132\033.google.protobuf.Int32Value" + + "R\005limit\022)\n\020cacheable_cursor\030\002 \001(\tR\017cache" + + "ableCursor\"\237\001\n\031ListStorageObjectsRequest" + + "\022\027\n\007user_id\030\001 \001(\tR\006userId\022\036\n\ncollection\030" + + "\002 \001(\tR\ncollection\0221\n\005limit\030\003 \001(\0132\033.googl" + + "e.protobuf.Int32ValueR\005limit\022\026\n\006cursor\030\004" + + " \001(\tR\006cursor\"e\n\030ListSubscriptionsRequest" + + "\0221\n\005limit\030\001 \001(\0132\033.google.protobuf.Int32V" + + "alueR\005limit\022\026\n\006cursor\030\002 \001(\tR\006cursor\"\352\001\n\'" + + "ListTournamentRecordsAroundOwnerRequest\022" + + "#\n\rtournament_id\030\001 \001(\tR\014tournamentId\0222\n\005" + + "limit\030\002 \001(\0132\034.google.protobuf.UInt32Valu" + + "eR\005limit\022\031\n\010owner_id\030\003 \001(\tR\007ownerId\0223\n\006e" + + "xpiry\030\004 \001(\0132\033.google.protobuf.Int64Value" + + "R\006expiry\022\026\n\006cursor\030\005 \001(\tR\006cursor\"\340\001\n\034Lis" + + "tTournamentRecordsRequest\022#\n\rtournament_" + + "id\030\001 \001(\tR\014tournamentId\022\033\n\towner_ids\030\002 \003(" + + "\tR\010ownerIds\0221\n\005limit\030\003 \001(\0132\033.google.prot" + + "obuf.Int32ValueR\005limit\022\026\n\006cursor\030\004 \001(\tR\006" + + "cursor\0223\n\006expiry\030\005 \001(\0132\033.google.protobuf" + + ".Int64ValueR\006expiry\"\337\002\n\026ListTournamentsR" + + "equest\022C\n\016category_start\030\001 \001(\0132\034.google." + + "protobuf.UInt32ValueR\rcategoryStart\022?\n\014c" + + "ategory_end\030\002 \001(\0132\034.google.protobuf.UInt" + + "32ValueR\013categoryEnd\022;\n\nstart_time\030\003 \001(\013" + + "2\034.google.protobuf.UInt32ValueR\tstartTim" + + "e\0227\n\010end_time\030\004 \001(\0132\034.google.protobuf.UI" + + "nt32ValueR\007endTime\0221\n\005limit\030\006 \001(\0132\033.goog" + + "le.protobuf.Int32ValueR\005limit\022\026\n\006cursor\030" + + "\010 \001(\tR\006cursor\"\256\001\n\025ListUserGroupsRequest\022" + + "\027\n\007user_id\030\001 \001(\tR\006userId\0221\n\005limit\030\002 \001(\0132" + + "\033.google.protobuf.Int32ValueR\005limit\0221\n\005s" + + "tate\030\003 \001(\0132\033.google.protobuf.Int32ValueR" + + "\005state\022\026\n\006cursor\030\004 \001(\tR\006cursor\"\320\001\n\005Match" + + "\022\031\n\010match_id\030\001 \001(\tR\007matchId\022$\n\rauthorita" + + "tive\030\002 \001(\010R\rauthoritative\0222\n\005label\030\003 \001(\013" + + "2\034.google.protobuf.StringValueR\005label\022\022\n" + + "\004size\030\004 \001(\005R\004size\022\033\n\ttick_rate\030\005 \001(\005R\010ti" + + "ckRate\022!\n\014handler_name\030\006 \001(\tR\013handlerNam" + + "e\"8\n\tMatchList\022+\n\007matches\030\001 \003(\0132\021.nakama" + + ".api.MatchR\007matches\"\231\001\n\031MatchmakerComple" + + "tionStats\022;\n\013create_time\030\001 \001(\0132\032.google." + + "protobuf.TimestampR\ncreateTime\022?\n\rcomple" + + "te_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "pR\014completeTime\"\324\001\n\017MatchmakerStats\022!\n\014t" + + "icket_count\030\001 \001(\005R\013ticketCount\022U\n\031oldest" + + "_ticket_create_time\030\002 \001(\0132\032.google.proto" + + "buf.TimestampR\026oldestTicketCreateTime\022G\n" + + "\013completions\030\003 \003(\0132%.nakama.api.Matchmak" + + "erCompletionStatsR\013completions\"\340\001\n\014Notif" + + "ication\022\016\n\002id\030\001 \001(\tR\002id\022\030\n\007subject\030\002 \001(\t" + + "R\007subject\022\030\n\007content\030\003 \001(\tR\007content\022\022\n\004c" + + "ode\030\004 \001(\005R\004code\022\033\n\tsender_id\030\005 \001(\tR\010send" + + "erId\022;\n\013create_time\030\006 \001(\0132\032.google.proto" + + "buf.TimestampR\ncreateTime\022\036\n\npersistent\030" + + "\007 \001(\010R\npersistent\"}\n\020NotificationList\022>\n" + + "\rnotifications\030\001 \003(\0132\030.nakama.api.Notifi" + + "cationR\rnotifications\022)\n\020cacheable_curso" + + "r\030\002 \001(\tR\017cacheableCursor\"P\n\030PromoteGroup" + + "UsersRequest\022\031\n\010group_id\030\001 \001(\tR\007groupId\022" + + "\031\n\010user_ids\030\002 \003(\tR\007userIds\"O\n\027DemoteGrou" + + "pUsersRequest\022\031\n\010group_id\030\001 \001(\tR\007groupId" + + "\022\031\n\010user_ids\030\002 \003(\tR\007userIds\"`\n\023ReadStora" + + "geObjectId\022\036\n\ncollection\030\001 \001(\tR\ncollecti" + + "on\022\020\n\003key\030\002 \001(\tR\003key\022\027\n\007user_id\030\003 \001(\tR\006u" + + "serId\"[\n\031ReadStorageObjectsRequest\022>\n\nob" + + "ject_ids\030\001 \003(\0132\037.nakama.api.ReadStorageO" + + "bjectIdR\tobjectIds\"J\n\003Rpc\022\016\n\002id\030\001 \001(\tR\002i" + + "d\022\030\n\007payload\030\002 \001(\tR\007payload\022\031\n\010http_key\030" + + "\003 \001(\tR\007httpKey\"^\n\007Session\022\030\n\007created\030\001 \001" + + "(\010R\007created\022\024\n\005token\030\002 \001(\tR\005token\022#\n\rref" + + "resh_token\030\003 \001(\tR\014refreshToken\"\330\002\n\rStora" + + "geObject\022\036\n\ncollection\030\001 \001(\tR\ncollection" + + "\022\020\n\003key\030\002 \001(\tR\003key\022\027\n\007user_id\030\003 \001(\tR\006use" + + "rId\022\024\n\005value\030\004 \001(\tR\005value\022\030\n\007version\030\005 \001" + + "(\tR\007version\022\'\n\017permission_read\030\006 \001(\005R\016pe" + + "rmissionRead\022)\n\020permission_write\030\007 \001(\005R\017" + + "permissionWrite\022;\n\013create_time\030\010 \001(\0132\032.g" + + "oogle.protobuf.TimestampR\ncreateTime\022;\n\013" + + "update_time\030\t \001(\0132\032.google.protobuf.Time" + + "stampR\nupdateTime\"\361\001\n\020StorageObjectAck\022\036" + + "\n\ncollection\030\001 \001(\tR\ncollection\022\020\n\003key\030\002 " + + "\001(\tR\003key\022\030\n\007version\030\003 \001(\tR\007version\022\027\n\007us" + + "er_id\030\004 \001(\tR\006userId\022;\n\013create_time\030\005 \001(\013" + + "2\032.google.protobuf.TimestampR\ncreateTime" + + "\022;\n\013update_time\030\006 \001(\0132\032.google.protobuf." + + "TimestampR\nupdateTime\"E\n\021StorageObjectAc" + + "ks\0220\n\004acks\030\001 \003(\0132\034.nakama.api.StorageObj" + + "ectAckR\004acks\"E\n\016StorageObjects\0223\n\007object" + + "s\030\001 \003(\0132\031.nakama.api.StorageObjectR\007obje" + + "cts\"`\n\021StorageObjectList\0223\n\007objects\030\001 \003(" + + "\0132\031.nakama.api.StorageObjectR\007objects\022\026\n" + + "\006cursor\030\002 \001(\tR\006cursor\"\276\005\n\nTournament\022\016\n\002" + + "id\030\001 \001(\tR\002id\022\024\n\005title\030\002 \001(\tR\005title\022 \n\013de" + + "scription\030\003 \001(\tR\013description\022\032\n\010category" + + "\030\004 \001(\rR\010category\022\035\n\nsort_order\030\005 \001(\rR\tso" + + "rtOrder\022\022\n\004size\030\006 \001(\rR\004size\022\031\n\010max_size\030" + + "\007 \001(\rR\007maxSize\022\"\n\rmax_num_score\030\010 \001(\rR\013m" + + "axNumScore\022\033\n\tcan_enter\030\t \001(\010R\010canEnter\022" + + "\035\n\nend_active\030\n \001(\rR\tendActive\022\035\n\nnext_r" + + "eset\030\013 \001(\rR\tnextReset\022\032\n\010metadata\030\014 \001(\tR" + + "\010metadata\022;\n\013create_time\030\r \001(\0132\032.google." + + "protobuf.TimestampR\ncreateTime\0229\n\nstart_" + + "time\030\016 \001(\0132\032.google.protobuf.TimestampR\t" + + "startTime\0225\n\010end_time\030\017 \001(\0132\032.google.pro" + + "tobuf.TimestampR\007endTime\022\032\n\010duration\030\020 \001" + + "(\rR\010duration\022!\n\014start_active\030\021 \001(\rR\013star" + + "tActive\022\035\n\nprev_reset\030\022 \001(\rR\tprevReset\0220" + + "\n\010operator\030\023 \001(\0162\024.nakama.api.OperatorR\010" + + "operator\022$\n\rauthoritative\030\024 \001(\010R\rauthori" + + "tative\"b\n\016TournamentList\0228\n\013tournaments\030" + + "\001 \003(\0132\026.nakama.api.TournamentR\013tournamen" + + "ts\022\026\n\006cursor\030\002 \001(\tR\006cursor\"\364\001\n\024Tournamen" + + "tRecordList\0227\n\007records\030\001 \003(\0132\035.nakama.ap" + + "i.LeaderboardRecordR\007records\022B\n\rowner_re" + + "cords\030\002 \003(\0132\035.nakama.api.LeaderboardReco" + + "rdR\014ownerRecords\022\037\n\013next_cursor\030\003 \001(\tR\nn" + + "extCursor\022\037\n\013prev_cursor\030\004 \001(\tR\nprevCurs" + + "or\022\035\n\nrank_count\030\005 \001(\003R\trankCount\"\373\002\n\024Up" + + "dateAccountRequest\0228\n\010username\030\001 \001(\0132\034.g" + + "oogle.protobuf.StringValueR\010username\022?\n\014" + + "display_name\030\002 \001(\0132\034.google.protobuf.Str", + "ingValueR\013displayName\022;\n\navatar_url\030\003 \001(" + + "\0132\034.google.protobuf.StringValueR\tavatarU" + + "rl\0227\n\010lang_tag\030\004 \001(\0132\034.google.protobuf.S" + + "tringValueR\007langTag\0228\n\010location\030\005 \001(\0132\034." + + "google.protobuf.StringValueR\010location\0228\n" + + "\010timezone\030\006 \001(\0132\034.google.protobuf.String" + + "ValueR\010timezone\"\307\002\n\022UpdateGroupRequest\022\031" + + "\n\010group_id\030\001 \001(\tR\007groupId\0220\n\004name\030\002 \001(\0132" + + "\034.google.protobuf.StringValueR\004name\022>\n\013d" + + "escription\030\003 \001(\0132\034.google.protobuf.Strin" + + "gValueR\013description\0227\n\010lang_tag\030\004 \001(\0132\034." + + "google.protobuf.StringValueR\007langTag\022;\n\n" + + "avatar_url\030\005 \001(\0132\034.google.protobuf.Strin" + + "gValueR\tavatarUrl\022.\n\004open\030\006 \001(\0132\032.google" + + ".protobuf.BoolValueR\004open\"\346\004\n\004User\022\016\n\002id" + + "\030\001 \001(\tR\002id\022\032\n\010username\030\002 \001(\tR\010username\022!" + + "\n\014display_name\030\003 \001(\tR\013displayName\022\035\n\nava" + + "tar_url\030\004 \001(\tR\tavatarUrl\022\031\n\010lang_tag\030\005 \001" + + "(\tR\007langTag\022\032\n\010location\030\006 \001(\tR\010location\022" + + "\032\n\010timezone\030\007 \001(\tR\010timezone\022\032\n\010metadata\030" + + "\010 \001(\tR\010metadata\022\037\n\013facebook_id\030\t \001(\tR\nfa" + + "cebookId\022\033\n\tgoogle_id\030\n \001(\tR\010googleId\022#\n" + + "\rgamecenter_id\030\013 \001(\tR\014gamecenterId\022\031\n\010st" + + "eam_id\030\014 \001(\tR\007steamId\022\026\n\006online\030\r \001(\010R\006o" + + "nline\022\035\n\nedge_count\030\016 \001(\005R\tedgeCount\022;\n\013" + + "create_time\030\017 \001(\0132\032.google.protobuf.Time" + + "stampR\ncreateTime\022;\n\013update_time\030\020 \001(\0132\032" + + ".google.protobuf.TimestampR\nupdateTime\0227" + + "\n\030facebook_instant_game_id\030\021 \001(\tR\025facebo" + + "okInstantGameId\022\031\n\010apple_id\030\022 \001(\tR\007apple" + + "Id\"\231\002\n\rUserGroupList\022D\n\013user_groups\030\001 \003(" + + "\0132#.nakama.api.UserGroupList.UserGroupR\n" + + "userGroups\022\026\n\006cursor\030\002 \001(\tR\006cursor\032\251\001\n\tU" + + "serGroup\022\'\n\005group\030\001 \001(\0132\021.nakama.api.Gro" + + "upR\005group\0221\n\005state\030\002 \001(\0132\033.google.protob" + + "uf.Int32ValueR\005state\"@\n\005State\022\016\n\nSUPERAD" + + "MIN\020\000\022\t\n\005ADMIN\020\001\022\n\n\006MEMBER\020\002\022\020\n\014JOIN_REQ" + + "UEST\020\003\"/\n\005Users\022&\n\005users\030\001 \003(\0132\020.nakama." + + "api.UserR\005users\"n\n\034ValidatePurchaseApple" + + "Request\022\030\n\007receipt\030\001 \001(\tR\007receipt\0224\n\007per" + + "sist\030\002 \001(\0132\032.google.protobuf.BoolValueR\007" + + "persist\"r\n ValidateSubscriptionAppleRequ" + + "est\022\030\n\007receipt\030\001 \001(\tR\007receipt\0224\n\007persist" + + "\030\002 \001(\0132\032.google.protobuf.BoolValueR\007pers" + + "ist\"q\n\035ValidatePurchaseGoogleRequest\022\032\n\010" + + "purchase\030\001 \001(\tR\010purchase\0224\n\007persist\030\002 \001(" + + "\0132\032.google.protobuf.BoolValueR\007persist\"s" + + "\n!ValidateSubscriptionGoogleRequest\022\030\n\007r" + + "eceipt\030\001 \001(\tR\007receipt\0224\n\007persist\030\002 \001(\0132\032" + + ".google.protobuf.BoolValueR\007persist\"\217\001\n\035" + + "ValidatePurchaseHuaweiRequest\022\032\n\010purchas" + + "e\030\001 \001(\tR\010purchase\022\034\n\tsignature\030\002 \001(\tR\tsi" + + "gnature\0224\n\007persist\030\003 \001(\0132\032.google.protob" + + "uf.BoolValueR\007persist\"\205\001\n&ValidatePurcha" + + "seFacebookInstantRequest\022%\n\016signed_reque" + + "st\030\001 \001(\tR\rsignedRequest\0224\n\007persist\030\002 \001(\013" + + "2\032.google.protobuf.BoolValueR\007persist\"\251\004" + + "\n\021ValidatedPurchase\022\027\n\007user_id\030\001 \001(\tR\006us" + + "erId\022\035\n\nproduct_id\030\002 \001(\tR\tproductId\022%\n\016t" + + "ransaction_id\030\003 \001(\tR\rtransactionId\022/\n\005st" + + "ore\030\004 \001(\0162\031.nakama.api.StoreProviderR\005st" + + "ore\022?\n\rpurchase_time\030\005 \001(\0132\032.google.prot" + + "obuf.TimestampR\014purchaseTime\022;\n\013create_t" + + "ime\030\006 \001(\0132\032.google.protobuf.TimestampR\nc" + + "reateTime\022;\n\013update_time\030\007 \001(\0132\032.google." + + "protobuf.TimestampR\nupdateTime\022;\n\013refund" + + "_time\030\010 \001(\0132\032.google.protobuf.TimestampR" + + "\nrefundTime\022+\n\021provider_response\030\t \001(\tR\020" + + "providerResponse\022>\n\013environment\030\n \001(\0162\034." + + "nakama.api.StoreEnvironmentR\013environment" + + "\022\037\n\013seen_before\030\013 \001(\010R\nseenBefore\"j\n\030Val" + + "idatePurchaseResponse\022N\n\023validated_purch" + + "ases\030\001 \003(\0132\035.nakama.api.ValidatedPurchas" + + "eR\022validatedPurchases\"x\n\034ValidateSubscri" + + "ptionResponse\022X\n\026validated_subscription\030" + + "\001 \001(\0132!.nakama.api.ValidatedSubscription" + + "R\025validatedSubscription\"\247\005\n\025ValidatedSub" + + "scription\022\027\n\007user_id\030\001 \001(\tR\006userId\022\035\n\npr" + + "oduct_id\030\002 \001(\tR\tproductId\0226\n\027original_tr" + + "ansaction_id\030\003 \001(\tR\025originalTransactionI" + + "d\022/\n\005store\030\004 \001(\0162\031.nakama.api.StoreProvi" + + "derR\005store\022?\n\rpurchase_time\030\005 \001(\0132\032.goog" + + "le.protobuf.TimestampR\014purchaseTime\022;\n\013c" + + "reate_time\030\006 \001(\0132\032.google.protobuf.Times" + + "tampR\ncreateTime\022;\n\013update_time\030\007 \001(\0132\032." + + "google.protobuf.TimestampR\nupdateTime\022>\n" + + "\013environment\030\010 \001(\0162\034.nakama.api.StoreEnv" + + "ironmentR\013environment\022;\n\013expiry_time\030\t \001" + + "(\0132\032.google.protobuf.TimestampR\nexpiryTi" + + "me\022;\n\013refund_time\030\n \001(\0132\032.google.protobu" + + "f.TimestampR\nrefundTime\022+\n\021provider_resp" + + "onse\030\013 \001(\tR\020providerResponse\0223\n\025provider" + + "_notification\030\014 \001(\tR\024providerNotificatio" + + "n\022\026\n\006active\030\r \001(\010R\006active\"\227\001\n\014PurchaseLi" + + "st\022N\n\023validated_purchases\030\001 \003(\0132\035.nakama" + + ".api.ValidatedPurchaseR\022validatedPurchas" + + "es\022\026\n\006cursor\030\002 \001(\tR\006cursor\022\037\n\013prev_curso" + + "r\030\003 \001(\tR\nprevCursor\"\247\001\n\020SubscriptionList" + + "\022Z\n\027validated_subscriptions\030\001 \003(\0132!.naka" + + "ma.api.ValidatedSubscriptionR\026validatedS" + + "ubscriptions\022\026\n\006cursor\030\002 \001(\tR\006cursor\022\037\n\013" + + "prev_cursor\030\003 \001(\tR\nprevCursor\"\273\002\n\035WriteL" + + "eaderboardRecordRequest\022%\n\016leaderboard_i" + + "d\030\001 \001(\tR\rleaderboardId\022X\n\006record\030\002 \001(\0132@" + + ".nakama.api.WriteLeaderboardRecordReques" + + "t.LeaderboardRecordWriteR\006record\032\230\001\n\026Lea" + + "derboardRecordWrite\022\024\n\005score\030\001 \001(\003R\005scor" + + "e\022\032\n\010subscore\030\002 \001(\003R\010subscore\022\032\n\010metadat" + + "a\030\003 \001(\tR\010metadata\0220\n\010operator\030\004 \001(\0162\024.na" + + "kama.api.OperatorR\010operator\"\204\002\n\022WriteSto" + + "rageObject\022\036\n\ncollection\030\001 \001(\tR\ncollecti" + + "on\022\020\n\003key\030\002 \001(\tR\003key\022\024\n\005value\030\003 \001(\tR\005val" + + "ue\022\030\n\007version\030\004 \001(\tR\007version\022D\n\017permissi" + + "on_read\030\005 \001(\0132\033.google.protobuf.Int32Val" + + "ueR\016permissionRead\022F\n\020permission_write\030\006" + + " \001(\0132\033.google.protobuf.Int32ValueR\017permi" + + "ssionWrite\"V\n\032WriteStorageObjectsRequest" + + "\0228\n\007objects\030\001 \003(\0132\036.nakama.api.WriteStor" + + "ageObjectR\007objects\"\265\002\n\034WriteTournamentRe" + + "cordRequest\022#\n\rtournament_id\030\001 \001(\tR\014tour" + + "namentId\022V\n\006record\030\002 \001(\0132>.nakama.api.Wr" + + "iteTournamentRecordRequest.TournamentRec" + + "ordWriteR\006record\032\227\001\n\025TournamentRecordWri" + + "te\022\024\n\005score\030\001 \001(\003R\005score\022\032\n\010subscore\030\002 \001" + + "(\003R\010subscore\022\032\n\010metadata\030\003 \001(\tR\010metadata" + + "\0220\n\010operator\030\004 \001(\0162\024.nakama.api.Operator" + + "R\010operator*o\n\rStoreProvider\022\023\n\017APPLE_APP" + + "_STORE\020\000\022\025\n\021GOOGLE_PLAY_STORE\020\001\022\026\n\022HUAWE" + + "I_APP_GALLERY\020\002\022\032\n\026FACEBOOK_INSTANT_STOR" + + "E\020\003*<\n\020StoreEnvironment\022\013\n\007UNKNOWN\020\000\022\013\n\007" + + "SANDBOX\020\001\022\016\n\nPRODUCTION\020\002*L\n\010Operator\022\017\n" + + "\013NO_OVERRIDE\020\000\022\010\n\004BEST\020\001\022\007\n\003SET\020\002\022\r\n\tINC" + + "REMENT\020\003\022\r\n\tDECREMENT\020\004B\227\001\n\031com.heroicla" + + "bs.nakama.apiB\010ApiProtoP\001Z\'github.com/he" + + "roiclabs/nakama-common/api\242\002\003NAX\252\002\nNakam" + + "a.Api\312\002\nNakama\\Api\342\002\026Nakama\\Api\\GPBMetad" + + "ata\352\002\013Nakama::Apib\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + }); + internal_static_nakama_api_Account_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_nakama_api_Account_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Account_descriptor, + new java.lang.String[] { "User", "Wallet", "Email", "Devices", "CustomId", "VerifyTime", "DisableTime", }); + internal_static_nakama_api_AccountRefresh_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_nakama_api_AccountRefresh_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountRefresh_descriptor, + new java.lang.String[] { "Token", "Vars", }); + internal_static_nakama_api_AccountRefresh_VarsEntry_descriptor = + internal_static_nakama_api_AccountRefresh_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountRefresh_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountRefresh_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountApple_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_nakama_api_AccountApple_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountApple_descriptor, + new java.lang.String[] { "Token", "Vars", }); + internal_static_nakama_api_AccountApple_VarsEntry_descriptor = + internal_static_nakama_api_AccountApple_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountApple_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountApple_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountCustom_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_nakama_api_AccountCustom_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountCustom_descriptor, + new java.lang.String[] { "Id", "Vars", }); + internal_static_nakama_api_AccountCustom_VarsEntry_descriptor = + internal_static_nakama_api_AccountCustom_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountCustom_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountCustom_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountDevice_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_nakama_api_AccountDevice_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountDevice_descriptor, + new java.lang.String[] { "Id", "Vars", }); + internal_static_nakama_api_AccountDevice_VarsEntry_descriptor = + internal_static_nakama_api_AccountDevice_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountDevice_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountDevice_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountEmail_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_nakama_api_AccountEmail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountEmail_descriptor, + new java.lang.String[] { "Email", "Password", "Vars", }); + internal_static_nakama_api_AccountEmail_VarsEntry_descriptor = + internal_static_nakama_api_AccountEmail_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountEmail_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountEmail_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountFacebook_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_nakama_api_AccountFacebook_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountFacebook_descriptor, + new java.lang.String[] { "Token", "Vars", }); + internal_static_nakama_api_AccountFacebook_VarsEntry_descriptor = + internal_static_nakama_api_AccountFacebook_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountFacebook_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountFacebook_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountFacebookInstantGame_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_nakama_api_AccountFacebookInstantGame_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountFacebookInstantGame_descriptor, + new java.lang.String[] { "SignedPlayerInfo", "Vars", }); + internal_static_nakama_api_AccountFacebookInstantGame_VarsEntry_descriptor = + internal_static_nakama_api_AccountFacebookInstantGame_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountFacebookInstantGame_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountFacebookInstantGame_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountGameCenter_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_nakama_api_AccountGameCenter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountGameCenter_descriptor, + new java.lang.String[] { "PlayerId", "BundleId", "TimestampSeconds", "Salt", "Signature", "PublicKeyUrl", "Vars", }); + internal_static_nakama_api_AccountGameCenter_VarsEntry_descriptor = + internal_static_nakama_api_AccountGameCenter_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountGameCenter_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountGameCenter_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountGoogle_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_nakama_api_AccountGoogle_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountGoogle_descriptor, + new java.lang.String[] { "Token", "Vars", }); + internal_static_nakama_api_AccountGoogle_VarsEntry_descriptor = + internal_static_nakama_api_AccountGoogle_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountGoogle_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountGoogle_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AccountSteam_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_nakama_api_AccountSteam_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountSteam_descriptor, + new java.lang.String[] { "Token", "Vars", }); + internal_static_nakama_api_AccountSteam_VarsEntry_descriptor = + internal_static_nakama_api_AccountSteam_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_AccountSteam_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AccountSteam_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_AddFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_nakama_api_AddFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AddFriendsRequest_descriptor, + new java.lang.String[] { "Ids", "Usernames", }); + internal_static_nakama_api_AddGroupUsersRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_nakama_api_AddGroupUsersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AddGroupUsersRequest_descriptor, + new java.lang.String[] { "GroupId", "UserIds", }); + internal_static_nakama_api_SessionRefreshRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_nakama_api_SessionRefreshRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_SessionRefreshRequest_descriptor, + new java.lang.String[] { "Token", "Vars", }); + internal_static_nakama_api_SessionRefreshRequest_VarsEntry_descriptor = + internal_static_nakama_api_SessionRefreshRequest_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_SessionRefreshRequest_VarsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_SessionRefreshRequest_VarsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_SessionLogoutRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_nakama_api_SessionLogoutRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_SessionLogoutRequest_descriptor, + new java.lang.String[] { "Token", "RefreshToken", }); + internal_static_nakama_api_AuthenticateAppleRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_nakama_api_AuthenticateAppleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateAppleRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", }); + internal_static_nakama_api_AuthenticateCustomRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_nakama_api_AuthenticateCustomRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateCustomRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", }); + internal_static_nakama_api_AuthenticateDeviceRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_nakama_api_AuthenticateDeviceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateDeviceRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", }); + internal_static_nakama_api_AuthenticateEmailRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_nakama_api_AuthenticateEmailRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateEmailRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", }); + internal_static_nakama_api_AuthenticateFacebookRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_nakama_api_AuthenticateFacebookRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateFacebookRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", "Sync", }); + internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", }); + internal_static_nakama_api_AuthenticateGameCenterRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_nakama_api_AuthenticateGameCenterRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateGameCenterRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", }); + internal_static_nakama_api_AuthenticateGoogleRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_nakama_api_AuthenticateGoogleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateGoogleRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", }); + internal_static_nakama_api_AuthenticateSteamRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_nakama_api_AuthenticateSteamRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_AuthenticateSteamRequest_descriptor, + new java.lang.String[] { "Account", "Create", "Username", "Sync", }); + internal_static_nakama_api_BanGroupUsersRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_nakama_api_BanGroupUsersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_BanGroupUsersRequest_descriptor, + new java.lang.String[] { "GroupId", "UserIds", }); + internal_static_nakama_api_BlockFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_nakama_api_BlockFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_BlockFriendsRequest_descriptor, + new java.lang.String[] { "Ids", "Usernames", }); + internal_static_nakama_api_ChannelMessage_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_nakama_api_ChannelMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ChannelMessage_descriptor, + new java.lang.String[] { "ChannelId", "MessageId", "Code", "SenderId", "Username", "Content", "CreateTime", "UpdateTime", "Persistent", "RoomName", "GroupId", "UserIdOne", "UserIdTwo", }); + internal_static_nakama_api_ChannelMessageList_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_nakama_api_ChannelMessageList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ChannelMessageList_descriptor, + new java.lang.String[] { "Messages", "NextCursor", "PrevCursor", "CacheableCursor", }); + internal_static_nakama_api_CreateGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_nakama_api_CreateGroupRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_CreateGroupRequest_descriptor, + new java.lang.String[] { "Name", "Description", "LangTag", "AvatarUrl", "Open", "MaxCount", }); + internal_static_nakama_api_DeleteFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_nakama_api_DeleteFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DeleteFriendsRequest_descriptor, + new java.lang.String[] { "Ids", "Usernames", }); + internal_static_nakama_api_DeleteGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_nakama_api_DeleteGroupRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DeleteGroupRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_nakama_api_DeleteLeaderboardRecordRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_nakama_api_DeleteLeaderboardRecordRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DeleteLeaderboardRecordRequest_descriptor, + new java.lang.String[] { "LeaderboardId", }); + internal_static_nakama_api_DeleteNotificationsRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_nakama_api_DeleteNotificationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DeleteNotificationsRequest_descriptor, + new java.lang.String[] { "Ids", }); + internal_static_nakama_api_DeleteTournamentRecordRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_nakama_api_DeleteTournamentRecordRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DeleteTournamentRecordRequest_descriptor, + new java.lang.String[] { "TournamentId", }); + internal_static_nakama_api_DeleteStorageObjectId_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_nakama_api_DeleteStorageObjectId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DeleteStorageObjectId_descriptor, + new java.lang.String[] { "Collection", "Key", "Version", }); + internal_static_nakama_api_DeleteStorageObjectsRequest_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_nakama_api_DeleteStorageObjectsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DeleteStorageObjectsRequest_descriptor, + new java.lang.String[] { "ObjectIds", }); + internal_static_nakama_api_Event_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_nakama_api_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Event_descriptor, + new java.lang.String[] { "Name", "Properties", "Timestamp", "External", }); + internal_static_nakama_api_Event_PropertiesEntry_descriptor = + internal_static_nakama_api_Event_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_Event_PropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Event_PropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_api_Friend_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_nakama_api_Friend_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Friend_descriptor, + new java.lang.String[] { "User", "State", "UpdateTime", }); + internal_static_nakama_api_FriendList_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_nakama_api_FriendList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_FriendList_descriptor, + new java.lang.String[] { "Friends", "Cursor", }); + internal_static_nakama_api_FriendsOfFriendsList_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_nakama_api_FriendsOfFriendsList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_FriendsOfFriendsList_descriptor, + new java.lang.String[] { "FriendsOfFriends", "Cursor", }); + internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_descriptor = + internal_static_nakama_api_FriendsOfFriendsList_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_descriptor, + new java.lang.String[] { "Referrer", "User", }); + internal_static_nakama_api_GetUsersRequest_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_nakama_api_GetUsersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_GetUsersRequest_descriptor, + new java.lang.String[] { "Ids", "Usernames", "FacebookIds", }); + internal_static_nakama_api_GetSubscriptionRequest_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_nakama_api_GetSubscriptionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_GetSubscriptionRequest_descriptor, + new java.lang.String[] { "ProductId", }); + internal_static_nakama_api_Group_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_nakama_api_Group_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Group_descriptor, + new java.lang.String[] { "Id", "CreatorId", "Name", "Description", "LangTag", "Metadata", "AvatarUrl", "Open", "EdgeCount", "MaxCount", "CreateTime", "UpdateTime", }); + internal_static_nakama_api_GroupList_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_nakama_api_GroupList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_GroupList_descriptor, + new java.lang.String[] { "Groups", "Cursor", }); + internal_static_nakama_api_GroupUserList_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_nakama_api_GroupUserList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_GroupUserList_descriptor, + new java.lang.String[] { "GroupUsers", "Cursor", }); + internal_static_nakama_api_GroupUserList_GroupUser_descriptor = + internal_static_nakama_api_GroupUserList_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_GroupUserList_GroupUser_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_GroupUserList_GroupUser_descriptor, + new java.lang.String[] { "User", "State", }); + internal_static_nakama_api_ImportFacebookFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_nakama_api_ImportFacebookFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ImportFacebookFriendsRequest_descriptor, + new java.lang.String[] { "Account", "Reset", }); + internal_static_nakama_api_ImportSteamFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_nakama_api_ImportSteamFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ImportSteamFriendsRequest_descriptor, + new java.lang.String[] { "Account", "Reset", }); + internal_static_nakama_api_JoinGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_nakama_api_JoinGroupRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_JoinGroupRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_nakama_api_JoinTournamentRequest_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_nakama_api_JoinTournamentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_JoinTournamentRequest_descriptor, + new java.lang.String[] { "TournamentId", }); + internal_static_nakama_api_KickGroupUsersRequest_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_nakama_api_KickGroupUsersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_KickGroupUsersRequest_descriptor, + new java.lang.String[] { "GroupId", "UserIds", }); + internal_static_nakama_api_Leaderboard_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_nakama_api_Leaderboard_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Leaderboard_descriptor, + new java.lang.String[] { "Id", "SortOrder", "Operator", "PrevReset", "NextReset", "Metadata", "CreateTime", "Authoritative", }); + internal_static_nakama_api_LeaderboardList_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_nakama_api_LeaderboardList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_LeaderboardList_descriptor, + new java.lang.String[] { "Leaderboards", "Cursor", }); + internal_static_nakama_api_LeaderboardRecord_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_nakama_api_LeaderboardRecord_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_LeaderboardRecord_descriptor, + new java.lang.String[] { "LeaderboardId", "OwnerId", "Username", "Score", "Subscore", "NumScore", "Metadata", "CreateTime", "UpdateTime", "ExpiryTime", "Rank", "MaxNumScore", }); + internal_static_nakama_api_LeaderboardRecordList_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_nakama_api_LeaderboardRecordList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_LeaderboardRecordList_descriptor, + new java.lang.String[] { "Records", "OwnerRecords", "NextCursor", "PrevCursor", "RankCount", }); + internal_static_nakama_api_LeaveGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_nakama_api_LeaveGroupRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_LeaveGroupRequest_descriptor, + new java.lang.String[] { "GroupId", }); + internal_static_nakama_api_LinkFacebookRequest_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_nakama_api_LinkFacebookRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_LinkFacebookRequest_descriptor, + new java.lang.String[] { "Account", "Sync", }); + internal_static_nakama_api_LinkSteamRequest_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_nakama_api_LinkSteamRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_LinkSteamRequest_descriptor, + new java.lang.String[] { "Account", "Sync", }); + internal_static_nakama_api_ListChannelMessagesRequest_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_nakama_api_ListChannelMessagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListChannelMessagesRequest_descriptor, + new java.lang.String[] { "ChannelId", "Limit", "Forward", "Cursor", }); + internal_static_nakama_api_ListFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_nakama_api_ListFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListFriendsRequest_descriptor, + new java.lang.String[] { "Limit", "State", "Cursor", }); + internal_static_nakama_api_ListFriendsOfFriendsRequest_descriptor = + getDescriptor().getMessageTypes().get(59); + internal_static_nakama_api_ListFriendsOfFriendsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListFriendsOfFriendsRequest_descriptor, + new java.lang.String[] { "Limit", "Cursor", }); + internal_static_nakama_api_ListGroupsRequest_descriptor = + getDescriptor().getMessageTypes().get(60); + internal_static_nakama_api_ListGroupsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListGroupsRequest_descriptor, + new java.lang.String[] { "Name", "Cursor", "Limit", "LangTag", "Members", "Open", }); + internal_static_nakama_api_ListGroupUsersRequest_descriptor = + getDescriptor().getMessageTypes().get(61); + internal_static_nakama_api_ListGroupUsersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListGroupUsersRequest_descriptor, + new java.lang.String[] { "GroupId", "Limit", "State", "Cursor", }); + internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_descriptor = + getDescriptor().getMessageTypes().get(62); + internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_descriptor, + new java.lang.String[] { "LeaderboardId", "Limit", "OwnerId", "Expiry", "Cursor", }); + internal_static_nakama_api_ListLeaderboardRecordsRequest_descriptor = + getDescriptor().getMessageTypes().get(63); + internal_static_nakama_api_ListLeaderboardRecordsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListLeaderboardRecordsRequest_descriptor, + new java.lang.String[] { "LeaderboardId", "OwnerIds", "Limit", "Cursor", "Expiry", }); + internal_static_nakama_api_ListMatchesRequest_descriptor = + getDescriptor().getMessageTypes().get(64); + internal_static_nakama_api_ListMatchesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListMatchesRequest_descriptor, + new java.lang.String[] { "Limit", "Authoritative", "Label", "MinSize", "MaxSize", "Query", }); + internal_static_nakama_api_ListNotificationsRequest_descriptor = + getDescriptor().getMessageTypes().get(65); + internal_static_nakama_api_ListNotificationsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListNotificationsRequest_descriptor, + new java.lang.String[] { "Limit", "CacheableCursor", }); + internal_static_nakama_api_ListStorageObjectsRequest_descriptor = + getDescriptor().getMessageTypes().get(66); + internal_static_nakama_api_ListStorageObjectsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListStorageObjectsRequest_descriptor, + new java.lang.String[] { "UserId", "Collection", "Limit", "Cursor", }); + internal_static_nakama_api_ListSubscriptionsRequest_descriptor = + getDescriptor().getMessageTypes().get(67); + internal_static_nakama_api_ListSubscriptionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListSubscriptionsRequest_descriptor, + new java.lang.String[] { "Limit", "Cursor", }); + internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_descriptor = + getDescriptor().getMessageTypes().get(68); + internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_descriptor, + new java.lang.String[] { "TournamentId", "Limit", "OwnerId", "Expiry", "Cursor", }); + internal_static_nakama_api_ListTournamentRecordsRequest_descriptor = + getDescriptor().getMessageTypes().get(69); + internal_static_nakama_api_ListTournamentRecordsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListTournamentRecordsRequest_descriptor, + new java.lang.String[] { "TournamentId", "OwnerIds", "Limit", "Cursor", "Expiry", }); + internal_static_nakama_api_ListTournamentsRequest_descriptor = + getDescriptor().getMessageTypes().get(70); + internal_static_nakama_api_ListTournamentsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListTournamentsRequest_descriptor, + new java.lang.String[] { "CategoryStart", "CategoryEnd", "StartTime", "EndTime", "Limit", "Cursor", }); + internal_static_nakama_api_ListUserGroupsRequest_descriptor = + getDescriptor().getMessageTypes().get(71); + internal_static_nakama_api_ListUserGroupsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ListUserGroupsRequest_descriptor, + new java.lang.String[] { "UserId", "Limit", "State", "Cursor", }); + internal_static_nakama_api_Match_descriptor = + getDescriptor().getMessageTypes().get(72); + internal_static_nakama_api_Match_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Match_descriptor, + new java.lang.String[] { "MatchId", "Authoritative", "Label", "Size", "TickRate", "HandlerName", }); + internal_static_nakama_api_MatchList_descriptor = + getDescriptor().getMessageTypes().get(73); + internal_static_nakama_api_MatchList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_MatchList_descriptor, + new java.lang.String[] { "Matches", }); + internal_static_nakama_api_MatchmakerCompletionStats_descriptor = + getDescriptor().getMessageTypes().get(74); + internal_static_nakama_api_MatchmakerCompletionStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_MatchmakerCompletionStats_descriptor, + new java.lang.String[] { "CreateTime", "CompleteTime", }); + internal_static_nakama_api_MatchmakerStats_descriptor = + getDescriptor().getMessageTypes().get(75); + internal_static_nakama_api_MatchmakerStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_MatchmakerStats_descriptor, + new java.lang.String[] { "TicketCount", "OldestTicketCreateTime", "Completions", }); + internal_static_nakama_api_Notification_descriptor = + getDescriptor().getMessageTypes().get(76); + internal_static_nakama_api_Notification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Notification_descriptor, + new java.lang.String[] { "Id", "Subject", "Content", "Code", "SenderId", "CreateTime", "Persistent", }); + internal_static_nakama_api_NotificationList_descriptor = + getDescriptor().getMessageTypes().get(77); + internal_static_nakama_api_NotificationList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_NotificationList_descriptor, + new java.lang.String[] { "Notifications", "CacheableCursor", }); + internal_static_nakama_api_PromoteGroupUsersRequest_descriptor = + getDescriptor().getMessageTypes().get(78); + internal_static_nakama_api_PromoteGroupUsersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_PromoteGroupUsersRequest_descriptor, + new java.lang.String[] { "GroupId", "UserIds", }); + internal_static_nakama_api_DemoteGroupUsersRequest_descriptor = + getDescriptor().getMessageTypes().get(79); + internal_static_nakama_api_DemoteGroupUsersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_DemoteGroupUsersRequest_descriptor, + new java.lang.String[] { "GroupId", "UserIds", }); + internal_static_nakama_api_ReadStorageObjectId_descriptor = + getDescriptor().getMessageTypes().get(80); + internal_static_nakama_api_ReadStorageObjectId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ReadStorageObjectId_descriptor, + new java.lang.String[] { "Collection", "Key", "UserId", }); + internal_static_nakama_api_ReadStorageObjectsRequest_descriptor = + getDescriptor().getMessageTypes().get(81); + internal_static_nakama_api_ReadStorageObjectsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ReadStorageObjectsRequest_descriptor, + new java.lang.String[] { "ObjectIds", }); + internal_static_nakama_api_Rpc_descriptor = + getDescriptor().getMessageTypes().get(82); + internal_static_nakama_api_Rpc_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Rpc_descriptor, + new java.lang.String[] { "Id", "Payload", "HttpKey", }); + internal_static_nakama_api_Session_descriptor = + getDescriptor().getMessageTypes().get(83); + internal_static_nakama_api_Session_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Session_descriptor, + new java.lang.String[] { "Created", "Token", "RefreshToken", }); + internal_static_nakama_api_StorageObject_descriptor = + getDescriptor().getMessageTypes().get(84); + internal_static_nakama_api_StorageObject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_StorageObject_descriptor, + new java.lang.String[] { "Collection", "Key", "UserId", "Value", "Version", "PermissionRead", "PermissionWrite", "CreateTime", "UpdateTime", }); + internal_static_nakama_api_StorageObjectAck_descriptor = + getDescriptor().getMessageTypes().get(85); + internal_static_nakama_api_StorageObjectAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_StorageObjectAck_descriptor, + new java.lang.String[] { "Collection", "Key", "Version", "UserId", "CreateTime", "UpdateTime", }); + internal_static_nakama_api_StorageObjectAcks_descriptor = + getDescriptor().getMessageTypes().get(86); + internal_static_nakama_api_StorageObjectAcks_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_StorageObjectAcks_descriptor, + new java.lang.String[] { "Acks", }); + internal_static_nakama_api_StorageObjects_descriptor = + getDescriptor().getMessageTypes().get(87); + internal_static_nakama_api_StorageObjects_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_StorageObjects_descriptor, + new java.lang.String[] { "Objects", }); + internal_static_nakama_api_StorageObjectList_descriptor = + getDescriptor().getMessageTypes().get(88); + internal_static_nakama_api_StorageObjectList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_StorageObjectList_descriptor, + new java.lang.String[] { "Objects", "Cursor", }); + internal_static_nakama_api_Tournament_descriptor = + getDescriptor().getMessageTypes().get(89); + internal_static_nakama_api_Tournament_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Tournament_descriptor, + new java.lang.String[] { "Id", "Title", "Description", "Category", "SortOrder", "Size", "MaxSize", "MaxNumScore", "CanEnter", "EndActive", "NextReset", "Metadata", "CreateTime", "StartTime", "EndTime", "Duration", "StartActive", "PrevReset", "Operator", "Authoritative", }); + internal_static_nakama_api_TournamentList_descriptor = + getDescriptor().getMessageTypes().get(90); + internal_static_nakama_api_TournamentList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_TournamentList_descriptor, + new java.lang.String[] { "Tournaments", "Cursor", }); + internal_static_nakama_api_TournamentRecordList_descriptor = + getDescriptor().getMessageTypes().get(91); + internal_static_nakama_api_TournamentRecordList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_TournamentRecordList_descriptor, + new java.lang.String[] { "Records", "OwnerRecords", "NextCursor", "PrevCursor", "RankCount", }); + internal_static_nakama_api_UpdateAccountRequest_descriptor = + getDescriptor().getMessageTypes().get(92); + internal_static_nakama_api_UpdateAccountRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_UpdateAccountRequest_descriptor, + new java.lang.String[] { "Username", "DisplayName", "AvatarUrl", "LangTag", "Location", "Timezone", }); + internal_static_nakama_api_UpdateGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(93); + internal_static_nakama_api_UpdateGroupRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_UpdateGroupRequest_descriptor, + new java.lang.String[] { "GroupId", "Name", "Description", "LangTag", "AvatarUrl", "Open", }); + internal_static_nakama_api_User_descriptor = + getDescriptor().getMessageTypes().get(94); + internal_static_nakama_api_User_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_User_descriptor, + new java.lang.String[] { "Id", "Username", "DisplayName", "AvatarUrl", "LangTag", "Location", "Timezone", "Metadata", "FacebookId", "GoogleId", "GamecenterId", "SteamId", "Online", "EdgeCount", "CreateTime", "UpdateTime", "FacebookInstantGameId", "AppleId", }); + internal_static_nakama_api_UserGroupList_descriptor = + getDescriptor().getMessageTypes().get(95); + internal_static_nakama_api_UserGroupList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_UserGroupList_descriptor, + new java.lang.String[] { "UserGroups", "Cursor", }); + internal_static_nakama_api_UserGroupList_UserGroup_descriptor = + internal_static_nakama_api_UserGroupList_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_UserGroupList_UserGroup_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_UserGroupList_UserGroup_descriptor, + new java.lang.String[] { "Group", "State", }); + internal_static_nakama_api_Users_descriptor = + getDescriptor().getMessageTypes().get(96); + internal_static_nakama_api_Users_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_Users_descriptor, + new java.lang.String[] { "Users", }); + internal_static_nakama_api_ValidatePurchaseAppleRequest_descriptor = + getDescriptor().getMessageTypes().get(97); + internal_static_nakama_api_ValidatePurchaseAppleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidatePurchaseAppleRequest_descriptor, + new java.lang.String[] { "Receipt", "Persist", }); + internal_static_nakama_api_ValidateSubscriptionAppleRequest_descriptor = + getDescriptor().getMessageTypes().get(98); + internal_static_nakama_api_ValidateSubscriptionAppleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidateSubscriptionAppleRequest_descriptor, + new java.lang.String[] { "Receipt", "Persist", }); + internal_static_nakama_api_ValidatePurchaseGoogleRequest_descriptor = + getDescriptor().getMessageTypes().get(99); + internal_static_nakama_api_ValidatePurchaseGoogleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidatePurchaseGoogleRequest_descriptor, + new java.lang.String[] { "Purchase", "Persist", }); + internal_static_nakama_api_ValidateSubscriptionGoogleRequest_descriptor = + getDescriptor().getMessageTypes().get(100); + internal_static_nakama_api_ValidateSubscriptionGoogleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidateSubscriptionGoogleRequest_descriptor, + new java.lang.String[] { "Receipt", "Persist", }); + internal_static_nakama_api_ValidatePurchaseHuaweiRequest_descriptor = + getDescriptor().getMessageTypes().get(101); + internal_static_nakama_api_ValidatePurchaseHuaweiRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidatePurchaseHuaweiRequest_descriptor, + new java.lang.String[] { "Purchase", "Signature", "Persist", }); + internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_descriptor = + getDescriptor().getMessageTypes().get(102); + internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_descriptor, + new java.lang.String[] { "SignedRequest", "Persist", }); + internal_static_nakama_api_ValidatedPurchase_descriptor = + getDescriptor().getMessageTypes().get(103); + internal_static_nakama_api_ValidatedPurchase_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidatedPurchase_descriptor, + new java.lang.String[] { "UserId", "ProductId", "TransactionId", "Store", "PurchaseTime", "CreateTime", "UpdateTime", "RefundTime", "ProviderResponse", "Environment", "SeenBefore", }); + internal_static_nakama_api_ValidatePurchaseResponse_descriptor = + getDescriptor().getMessageTypes().get(104); + internal_static_nakama_api_ValidatePurchaseResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidatePurchaseResponse_descriptor, + new java.lang.String[] { "ValidatedPurchases", }); + internal_static_nakama_api_ValidateSubscriptionResponse_descriptor = + getDescriptor().getMessageTypes().get(105); + internal_static_nakama_api_ValidateSubscriptionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidateSubscriptionResponse_descriptor, + new java.lang.String[] { "ValidatedSubscription", }); + internal_static_nakama_api_ValidatedSubscription_descriptor = + getDescriptor().getMessageTypes().get(106); + internal_static_nakama_api_ValidatedSubscription_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_ValidatedSubscription_descriptor, + new java.lang.String[] { "UserId", "ProductId", "OriginalTransactionId", "Store", "PurchaseTime", "CreateTime", "UpdateTime", "Environment", "ExpiryTime", "RefundTime", "ProviderResponse", "ProviderNotification", "Active", }); + internal_static_nakama_api_PurchaseList_descriptor = + getDescriptor().getMessageTypes().get(107); + internal_static_nakama_api_PurchaseList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_PurchaseList_descriptor, + new java.lang.String[] { "ValidatedPurchases", "Cursor", "PrevCursor", }); + internal_static_nakama_api_SubscriptionList_descriptor = + getDescriptor().getMessageTypes().get(108); + internal_static_nakama_api_SubscriptionList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_SubscriptionList_descriptor, + new java.lang.String[] { "ValidatedSubscriptions", "Cursor", "PrevCursor", }); + internal_static_nakama_api_WriteLeaderboardRecordRequest_descriptor = + getDescriptor().getMessageTypes().get(109); + internal_static_nakama_api_WriteLeaderboardRecordRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_WriteLeaderboardRecordRequest_descriptor, + new java.lang.String[] { "LeaderboardId", "Record", }); + internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_descriptor = + internal_static_nakama_api_WriteLeaderboardRecordRequest_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_descriptor, + new java.lang.String[] { "Score", "Subscore", "Metadata", "Operator", }); + internal_static_nakama_api_WriteStorageObject_descriptor = + getDescriptor().getMessageTypes().get(110); + internal_static_nakama_api_WriteStorageObject_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_WriteStorageObject_descriptor, + new java.lang.String[] { "Collection", "Key", "Value", "Version", "PermissionRead", "PermissionWrite", }); + internal_static_nakama_api_WriteStorageObjectsRequest_descriptor = + getDescriptor().getMessageTypes().get(111); + internal_static_nakama_api_WriteStorageObjectsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_WriteStorageObjectsRequest_descriptor, + new java.lang.String[] { "Objects", }); + internal_static_nakama_api_WriteTournamentRecordRequest_descriptor = + getDescriptor().getMessageTypes().get(112); + internal_static_nakama_api_WriteTournamentRecordRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_WriteTournamentRecordRequest_descriptor, + new java.lang.String[] { "TournamentId", "Record", }); + internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_descriptor = + internal_static_nakama_api_WriteTournamentRecordRequest_descriptor.getNestedTypes().get(0); + internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_descriptor, + new java.lang.String[] { "Score", "Subscore", "Metadata", "Operator", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ApigrpcProto.java b/src/main/java/com/heroiclabs/nakama/api/ApigrpcProto.java new file mode 100644 index 00000000..001680ce --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ApigrpcProto.java @@ -0,0 +1,333 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama/api/apigrpc.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public final class ApigrpcProto { + private ApigrpcProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ApigrpcProto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n.github.com/heroiclabs/nakama/api/apigr" + + "pc.proto\022\nnakama.api\032\034google/api/annotat" + + "ions.proto\032\033google/protobuf/empty.proto\032" + + ".protoc-gen-openapiv2/options/annotation" + + "s.proto\0321github.com/heroiclabs/nakama-co" + + "mmon/api/api.proto2\237O\n\006Nakama\022W\n\nAddFrie" + + "nds\022\035.nakama.api.AddFriendsRequest\032\026.goo" + + "gle.protobuf.Empty\"\022\202\323\344\223\002\014\"\n/v2/friend\022k" + + "\n\rAddGroupUsers\022 .nakama.api.AddGroupUse" + + "rsRequest\032\026.google.protobuf.Empty\" \202\323\344\223\002" + + "\032\"\030/v2/group/{group_id}/add\022\204\001\n\016SessionR" + + "efresh\022!.nakama.api.SessionRefreshReques" + + "t\032\023.nakama.api.Session\":\222A\021b\017\n\r\n\tBasicAu" + + "th\022\000\202\323\344\223\002 \"\033/v2/account/session/refresh:" + + "\001*\022h\n\rSessionLogout\022 .nakama.api.Session" + + "LogoutRequest\032\026.google.protobuf.Empty\"\035\202" + + "\323\344\223\002\027\"\022/v2/session/logout:\001*\022\223\001\n\021Authent" + + "icateApple\022$.nakama.api.AuthenticateAppl" + + "eRequest\032\023.nakama.api.Session\"C\222A\021b\017\n\r\n\t" + + "BasicAuth\022\000\202\323\344\223\002)\"\036/v2/account/authentic" + + "ate/apple:\007account\022\226\001\n\022AuthenticateCusto" + + "m\022%.nakama.api.AuthenticateCustomRequest" + + "\032\023.nakama.api.Session\"D\222A\021b\017\n\r\n\tBasicAut" + + "h\022\000\202\323\344\223\002*\"\037/v2/account/authenticate/cust" + + "om:\007account\022\226\001\n\022AuthenticateDevice\022%.nak" + + "ama.api.AuthenticateDeviceRequest\032\023.naka" + + "ma.api.Session\"D\222A\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223" + + "\002*\"\037/v2/account/authenticate/device:\007acc" + + "ount\022\223\001\n\021AuthenticateEmail\022$.nakama.api." + + "AuthenticateEmailRequest\032\023.nakama.api.Se" + + "ssion\"C\222A\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223\002)\"\036/v2/a" + + "ccount/authenticate/email:\007account\022\234\001\n\024A" + + "uthenticateFacebook\022\'.nakama.api.Authent" + + "icateFacebookRequest\032\023.nakama.api.Sessio" + + "n\"F\222A\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223\002,\"!/v2/accou" + + "nt/authenticate/facebook:\007account\022\275\001\n\037Au" + + "thenticateFacebookInstantGame\0222.nakama.a" + + "pi.AuthenticateFacebookInstantGameReques" + + "t\032\023.nakama.api.Session\"Q\222A\021b\017\n\r\n\tBasicAu" + + "th\022\000\202\323\344\223\0027\",/v2/account/authenticate/fac" + + "ebookinstantgame:\007account\022\242\001\n\026Authentica" + + "teGameCenter\022).nakama.api.AuthenticateGa" + + "meCenterRequest\032\023.nakama.api.Session\"H\222A" + + "\021b\017\n\r\n\tBasicAuth\022\000\202\323\344\223\002.\"#/v2/account/au" + + "thenticate/gamecenter:\007account\022\226\001\n\022Authe" + + "nticateGoogle\022%.nakama.api.AuthenticateG" + + "oogleRequest\032\023.nakama.api.Session\"D\222A\021b\017" + + "\n\r\n\tBasicAuth\022\000\202\323\344\223\002*\"\037/v2/account/authe" + + "nticate/google:\007account\022\223\001\n\021Authenticate" + + "Steam\022$.nakama.api.AuthenticateSteamRequ" + + "est\032\023.nakama.api.Session\"C\222A\021b\017\n\r\n\tBasic" + + "Auth\022\000\202\323\344\223\002)\"\036/v2/account/authenticate/s" + + "team:\007account\022k\n\rBanGroupUsers\022 .nakama." + + "api.BanGroupUsersRequest\032\026.google.protob" + + "uf.Empty\" \202\323\344\223\002\032\"\030/v2/group/{group_id}/b" + + "an\022a\n\014BlockFriends\022\037.nakama.api.BlockFri" + + "endsRequest\032\026.google.protobuf.Empty\"\030\202\323\344" + + "\223\002\022\"\020/v2/friend/block\022V\n\013CreateGroup\022\036.n" + + "akama.api.CreateGroupRequest\032\021.nakama.ap" + + "i.Group\"\024\202\323\344\223\002\016\"\t/v2/group:\001*\022T\n\rDeleteA" + + "ccount\022\026.google.protobuf.Empty\032\026.google." + + "protobuf.Empty\"\023\202\323\344\223\002\r*\013/v2/account\022]\n\rD" + + "eleteFriends\022 .nakama.api.DeleteFriendsR" + + "equest\032\026.google.protobuf.Empty\"\022\202\323\344\223\002\014*\n" + + "/v2/friend\022c\n\013DeleteGroup\022\036.nakama.api.D" + + "eleteGroupRequest\032\026.google.protobuf.Empt" + + "y\"\034\202\323\344\223\002\026*\024/v2/group/{group_id}\022\207\001\n\027Dele" + + "teLeaderboardRecord\022*.nakama.api.DeleteL" + + "eaderboardRecordRequest\032\026.google.protobu" + + "f.Empty\"(\202\323\344\223\002\"* /v2/leaderboard/{leader" + + "board_id}\022o\n\023DeleteNotifications\022&.nakam" + + "a.api.DeleteNotificationsRequest\032\026.googl" + + "e.protobuf.Empty\"\030\202\323\344\223\002\022*\020/v2/notificati" + + "on\022\203\001\n\026DeleteTournamentRecord\022).nakama.a" + + "pi.DeleteTournamentRecordRequest\032\026.googl" + + "e.protobuf.Empty\"&\202\323\344\223\002 *\036/v2/tournament" + + "/{tournament_id}\022v\n\024DeleteStorageObjects" + + "\022\'.nakama.api.DeleteStorageObjectsReques" + + "t\032\026.google.protobuf.Empty\"\035\202\323\344\223\002\027\032\022/v2/s" + + "torage/delete:\001*\022H\n\005Event\022\021.nakama.api.E" + + "vent\032\026.google.protobuf.Empty\"\024\202\323\344\223\002\016\"\t/v" + + "2/event:\001*\022N\n\nGetAccount\022\026.google.protob" + + "uf.Empty\032\023.nakama.api.Account\"\023\202\323\344\223\002\r\022\013/" + + "v2/account\022L\n\010GetUsers\022\033.nakama.api.GetU" + + "sersRequest\032\021.nakama.api.Users\"\020\202\323\344\223\002\n\022\010" + + "/v2/user\022\203\001\n\017GetSubscription\022\".nakama.ap" + + "i.GetSubscriptionRequest\032!.nakama.api.Va" + + "lidatedSubscription\")\202\323\344\223\002#\022!/v2/iap/sub" + + "scription/{product_id}\022g\n\022GetMatchmakerS" + + "tats\022\026.google.protobuf.Empty\032\033.nakama.ap" + + "i.MatchmakerStats\"\034\202\323\344\223\002\026\022\024/v2/matchmake" + + "r/stats\022S\n\013Healthcheck\022\026.google.protobuf" + + ".Empty\032\026.google.protobuf.Empty\"\024\202\323\344\223\002\016\022\014" + + "/healthcheck\022\177\n\025ImportFacebookFriends\022(." + + "nakama.api.ImportFacebookFriendsRequest\032" + + "\026.google.protobuf.Empty\"$\202\323\344\223\002\036\"\023/v2/fri" + + "end/facebook:\007account\022v\n\022ImportSteamFrie" + + "nds\022%.nakama.api.ImportSteamFriendsReque" + + "st\032\026.google.protobuf.Empty\"!\202\323\344\223\002\033\"\020/v2/" + + "friend/steam:\007account\022d\n\tJoinGroup\022\034.nak" + + "ama.api.JoinGroupRequest\032\026.google.protob" + + "uf.Empty\"!\202\323\344\223\002\033\"\031/v2/group/{group_id}/j" + + "oin\022x\n\016JoinTournament\022!.nakama.api.JoinT" + + "ournamentRequest\032\026.google.protobuf.Empty" + + "\"+\202\323\344\223\002%\"#/v2/tournament/{tournament_id}" + + "/join\022n\n\016KickGroupUsers\022!.nakama.api.Kic" + + "kGroupUsersRequest\032\026.google.protobuf.Emp" + + "ty\"!\202\323\344\223\002\033\"\031/v2/group/{group_id}/kick\022g\n" + + "\nLeaveGroup\022\035.nakama.api.LeaveGroupReque" + + "st\032\026.google.protobuf.Empty\"\"\202\323\344\223\002\034\"\032/v2/" + + "group/{group_id}/leave\022`\n\tLinkApple\022\030.na" + + "kama.api.AccountApple\032\026.google.protobuf." + + "Empty\"!\202\323\344\223\002\033\"\026/v2/account/link/apple:\001*" + + "\022c\n\nLinkCustom\022\031.nakama.api.AccountCusto" + + "m\032\026.google.protobuf.Empty\"\"\202\323\344\223\002\034\"\027/v2/a" + + "ccount/link/custom:\001*\022c\n\nLinkDevice\022\031.na" + + "kama.api.AccountDevice\032\026.google.protobuf" + + ".Empty\"\"\202\323\344\223\002\034\"\027/v2/account/link/device:" + + "\001*\022`\n\tLinkEmail\022\030.nakama.api.AccountEmai" + + "l\032\026.google.protobuf.Empty\"!\202\323\344\223\002\033\"\026/v2/a" + + "ccount/link/email:\001*\022s\n\014LinkFacebook\022\037.n" + + "akama.api.LinkFacebookRequest\032\026.google.p" + + "rotobuf.Empty\"*\202\323\344\223\002$\"\031/v2/account/link/" + + "facebook:\007account\022\212\001\n\027LinkFacebookInstan" + + "tGame\022&.nakama.api.AccountFacebookInstan" + + "tGame\032\026.google.protobuf.Empty\"/\202\323\344\223\002)\"$/" + + "v2/account/link/facebookinstantgame:\001*\022o" + + "\n\016LinkGameCenter\022\035.nakama.api.AccountGam" + + "eCenter\032\026.google.protobuf.Empty\"&\202\323\344\223\002 \"" + + "\033/v2/account/link/gamecenter:\001*\022c\n\nLinkG" + + "oogle\022\031.nakama.api.AccountGoogle\032\026.googl" + + "e.protobuf.Empty\"\"\202\323\344\223\002\034\"\027/v2/account/li" + + "nk/google:\001*\022d\n\tLinkSteam\022\034.nakama.api.L" + + "inkSteamRequest\032\026.google.protobuf.Empty\"" + + "!\202\323\344\223\002\033\"\026/v2/account/link/steam:\001*\022\177\n\023Li" + + "stChannelMessages\022&.nakama.api.ListChann" + + "elMessagesRequest\032\036.nakama.api.ChannelMe" + + "ssageList\" \202\323\344\223\002\032\022\030/v2/channel/{channel_" + + "id}\022Y\n\013ListFriends\022\036.nakama.api.ListFrie" + + "ndsRequest\032\026.nakama.api.FriendList\"\022\202\323\344\223" + + "\002\014\022\n/v2/friend\022}\n\024ListFriendsOfFriends\022\'" + + ".nakama.api.ListFriendsOfFriendsRequest\032" + + " .nakama.api.FriendsOfFriendsList\"\032\202\323\344\223\002" + + "\024\022\022/v2/friend/friends\022U\n\nListGroups\022\035.na" + + "kama.api.ListGroupsRequest\032\025.nakama.api." + + "GroupList\"\021\202\323\344\223\002\013\022\t/v2/group\022q\n\016ListGrou" + + "pUsers\022!.nakama.api.ListGroupUsersReques" + + "t\032\031.nakama.api.GroupUserList\"!\202\323\344\223\002\033\022\031/v" + + "2/group/{group_id}/user\022\220\001\n\026ListLeaderbo" + + "ardRecords\022).nakama.api.ListLeaderboardR" + + "ecordsRequest\032!.nakama.api.LeaderboardRe" + + "cordList\"(\202\323\344\223\002\"\022 /v2/leaderboard/{leade" + + "rboard_id}\022\267\001\n!ListLeaderboardRecordsAro" + + "undOwner\0224.nakama.api.ListLeaderboardRec" + + "ordsAroundOwnerRequest\032!.nakama.api.Lead" + + "erboardRecordList\"9\202\323\344\223\0023\0221/v2/leaderboa" + + "rd/{leaderboard_id}/owner/{owner_id}\022W\n\013" + + "ListMatches\022\036.nakama.api.ListMatchesRequ" + + "est\032\025.nakama.api.MatchList\"\021\202\323\344\223\002\013\022\t/v2/" + + "match\022q\n\021ListNotifications\022$.nakama.api." + + "ListNotificationsRequest\032\034.nakama.api.No" + + "tificationList\"\030\202\323\344\223\002\022\022\020/v2/notification" + + "\022\242\001\n\022ListStorageObjects\022%.nakama.api.Lis" + + "tStorageObjectsRequest\032\035.nakama.api.Stor" + + "ageObjectList\"F\202\323\344\223\002@\022\030/v2/storage/{coll" + + "ection}Z$\022\"/v2/storage/{collection}/{use" + + "r_id}\022x\n\021ListSubscriptions\022$.nakama.api." + + "ListSubscriptionsRequest\032\034.nakama.api.Su" + + "bscriptionList\"\037\202\323\344\223\002\031\"\024/v2/iap/subscrip" + + "tion:\001*\022i\n\017ListTournaments\022\".nakama.api." + + "ListTournamentsRequest\032\032.nakama.api.Tour" + + "namentList\"\026\202\323\344\223\002\020\022\016/v2/tournament\022\213\001\n\025L" + + "istTournamentRecords\022(.nakama.api.ListTo" + + "urnamentRecordsRequest\032 .nakama.api.Tour" + + "namentRecordList\"&\202\323\344\223\002 \022\036/v2/tournament" + + "/{tournament_id}\022\262\001\n ListTournamentRecor" + + "dsAroundOwner\0223.nakama.api.ListTournamen" + + "tRecordsAroundOwnerRequest\032 .nakama.api." + + "TournamentRecordList\"7\202\323\344\223\0021\022//v2/tourna" + + "ment/{tournament_id}/owner/{owner_id}\022p\n" + + "\016ListUserGroups\022!.nakama.api.ListUserGro" + + "upsRequest\032\031.nakama.api.UserGroupList\" \202" + + "\323\344\223\002\032\022\030/v2/user/{user_id}/group\022w\n\021Promo" + + "teGroupUsers\022$.nakama.api.PromoteGroupUs" + + "ersRequest\032\026.google.protobuf.Empty\"$\202\323\344\223" + + "\002\036\"\034/v2/group/{group_id}/promote\022t\n\020Demo" + + "teGroupUsers\022#.nakama.api.DemoteGroupUse" + + "rsRequest\032\026.google.protobuf.Empty\"#\202\323\344\223\002" + + "\035\"\033/v2/group/{group_id}/demote\022o\n\022ReadSt" + + "orageObjects\022%.nakama.api.ReadStorageObj" + + "ectsRequest\032\032.nakama.api.StorageObjects\"" + + "\026\202\323\344\223\002\020\"\013/v2/storage:\001*\022\177\n\007RpcFunc\022\017.nak" + + "ama.api.Rpc\032\017.nakama.api.Rpc\"R\222A\"b \n\r\n\tB" + + "earerJwt\022\000\n\017\n\013HttpKeyAuth\022\000\202\323\344\223\002\'\"\014/v2/r" + + "pc/{id}:\007payloadZ\016\022\014/v2/rpc/{id}\022d\n\013Unli" + + "nkApple\022\030.nakama.api.AccountApple\032\026.goog" + + "le.protobuf.Empty\"#\202\323\344\223\002\035\"\030/v2/account/u" + + "nlink/apple:\001*\022g\n\014UnlinkCustom\022\031.nakama." + + "api.AccountCustom\032\026.google.protobuf.Empt" + + "y\"$\202\323\344\223\002\036\"\031/v2/account/unlink/custom:\001*\022" + + "g\n\014UnlinkDevice\022\031.nakama.api.AccountDevi" + + "ce\032\026.google.protobuf.Empty\"$\202\323\344\223\002\036\"\031/v2/" + + "account/unlink/device:\001*\022d\n\013UnlinkEmail\022" + + "\030.nakama.api.AccountEmail\032\026.google.proto" + + "buf.Empty\"#\202\323\344\223\002\035\"\030/v2/account/unlink/em" + + "ail:\001*\022m\n\016UnlinkFacebook\022\033.nakama.api.Ac" + + "countFacebook\032\026.google.protobuf.Empty\"&\202" + + "\323\344\223\002 \"\033/v2/account/unlink/facebook:\001*\022\216\001" + + "\n\031UnlinkFacebookInstantGame\022&.nakama.api" + + ".AccountFacebookInstantGame\032\026.google.pro" + + "tobuf.Empty\"1\202\323\344\223\002+\"&/v2/account/unlink/" + + "facebookinstantgame:\001*\022s\n\020UnlinkGameCent" + + "er\022\035.nakama.api.AccountGameCenter\032\026.goog" + + "le.protobuf.Empty\"(\202\323\344\223\002\"\"\035/v2/account/u" + + "nlink/gamecenter:\001*\022g\n\014UnlinkGoogle\022\031.na" + + "kama.api.AccountGoogle\032\026.google.protobuf" + + ".Empty\"$\202\323\344\223\002\036\"\031/v2/account/unlink/googl" + + "e:\001*\022d\n\013UnlinkSteam\022\030.nakama.api.Account" + + "Steam\032\026.google.protobuf.Empty\"#\202\323\344\223\002\035\"\030/" + + "v2/account/unlink/steam:\001*\022a\n\rUpdateAcco" + + "unt\022 .nakama.api.UpdateAccountRequest\032\026." + + "google.protobuf.Empty\"\026\202\323\344\223\002\020\032\013/v2/accou" + + "nt:\001*\022f\n\013UpdateGroup\022\036.nakama.api.Update" + + "GroupRequest\032\026.google.protobuf.Empty\"\037\202\323" + + "\344\223\002\031\032\024/v2/group/{group_id}:\001*\022\212\001\n\025Valida" + + "tePurchaseApple\022(.nakama.api.ValidatePur" + + "chaseAppleRequest\032$.nakama.api.ValidateP" + + "urchaseResponse\"!\202\323\344\223\002\033\"\026/v2/iap/purchas" + + "e/apple:\001*\022\232\001\n\031ValidateSubscriptionApple" + + "\022,.nakama.api.ValidateSubscriptionAppleR" + + "equest\032(.nakama.api.ValidateSubscription" + + "Response\"%\202\323\344\223\002\037\"\032/v2/iap/subscription/a" + + "pple:\001*\022\215\001\n\026ValidatePurchaseGoogle\022).nak" + + "ama.api.ValidatePurchaseGoogleRequest\032$." + + "nakama.api.ValidatePurchaseResponse\"\"\202\323\344" + + "\223\002\034\"\027/v2/iap/purchase/google:\001*\022\235\001\n\032Vali" + + "dateSubscriptionGoogle\022-.nakama.api.Vali" + + "dateSubscriptionGoogleRequest\032(.nakama.a" + + "pi.ValidateSubscriptionResponse\"&\202\323\344\223\002 \"" + + "\033/v2/iap/subscription/google:\001*\022\215\001\n\026Vali" + + "datePurchaseHuawei\022).nakama.api.Validate" + + "PurchaseHuaweiRequest\032$.nakama.api.Valid" + + "atePurchaseResponse\"\"\202\323\344\223\002\034\"\027/v2/iap/pur" + + "chase/huawei:\001*\022\250\001\n\037ValidatePurchaseFace" + + "bookInstant\0222.nakama.api.ValidatePurchas" + + "eFacebookInstantRequest\032$.nakama.api.Val" + + "idatePurchaseResponse\"+\202\323\344\223\002%\" /v2/iap/p" + + "urchase/facebookinstant:\001*\022\224\001\n\026WriteLead" + + "erboardRecord\022).nakama.api.WriteLeaderbo" + + "ardRecordRequest\032\035.nakama.api.Leaderboar" + + "dRecord\"0\202\323\344\223\002*\" /v2/leaderboard/{leader" + + "board_id}:\006record\022t\n\023WriteStorageObjects" + + "\022&.nakama.api.WriteStorageObjectsRequest" + + "\032\035.nakama.api.StorageObjectAcks\"\026\202\323\344\223\002\020\032" + + "\013/v2/storage:\001*\022\272\001\n\025WriteTournamentRecor" + + "d\022(.nakama.api.WriteTournamentRecordRequ" + + "est\032\035.nakama.api.LeaderboardRecord\"X\202\323\344\223" + + "\002R\032\036/v2/tournament/{tournament_id}:\006reco" + + "rdZ(\"\036/v2/tournament/{tournament_id}:\006re" + + "cordB\356\003\n\031com.heroiclabs.nakama.apiB\014Apig" + + "rpcProtoP\001Z\'github.com/heroiclabs/nakama" + + "/v3/apigrpc\242\002\003NAX\252\002\nNakama.Api\312\002\nNakama\\" + + "Api\342\002\026Nakama\\Api\\GPBMetadata\352\002\013Nakama::A" + + "pi\222A\317\002\022u\n\rNakama API v2\"_\n!The Nakama Au" + + "thors & Contributors\022$https://github.com" + + "/heroiclabs/nakama\032\024hello@heroiclabs.com" + + "2\0032.0\032\016127.0.0.1:7350*\001\0012\020application/js" + + "on:\020application/jsonZR\n\017\n\tBasicAuth\022\002\010\001\n" + + " \n\tBearerJwt\022\023\010\002\032\rAuthorization \002\n\035\n\013Htt" + + "pKeyAuth\022\016\010\002\032\010http_key \002b\017\n\r\n\tBearerJwt\022" + + "\000r:\n\033Nakama server documentation\022\033https:" + + "//heroiclabs.com/docsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(), + com.heroiclabs.nakama.api.ApiProto.getDescriptor(), + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(); + com.heroiclabs.nakama.api.ApiProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequest.java new file mode 100644 index 00000000..80d7db95 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with Apple Sign In.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateAppleRequest} + */ +public final class AuthenticateAppleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateAppleRequest) + AuthenticateAppleRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateAppleRequest.class.getName()); + } + // Use AuthenticateAppleRequest.newBuilder() to construct. + private AuthenticateAppleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateAppleRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateAppleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateAppleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateAppleRequest.class, com.heroiclabs.nakama.api.AuthenticateAppleRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountApple account_; + /** + *
+   * The Apple account details.
+   * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Apple account details.
+   * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountApple getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountApple.getDefaultInstance() : account_; + } + /** + *
+   * The Apple account details.
+   * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountAppleOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountApple.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateAppleRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateAppleRequest other = (com.heroiclabs.nakama.api.AuthenticateAppleRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateAppleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with Apple Sign In.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateAppleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateAppleRequest) + com.heroiclabs.nakama.api.AuthenticateAppleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateAppleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateAppleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateAppleRequest.class, com.heroiclabs.nakama.api.AuthenticateAppleRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateAppleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateAppleRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateAppleRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateAppleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateAppleRequest build() { + com.heroiclabs.nakama.api.AuthenticateAppleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateAppleRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateAppleRequest result = new com.heroiclabs.nakama.api.AuthenticateAppleRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateAppleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateAppleRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateAppleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateAppleRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateAppleRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountApple account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountApple, com.heroiclabs.nakama.api.AccountApple.Builder, com.heroiclabs.nakama.api.AccountAppleOrBuilder> accountBuilder_; + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountApple getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountApple.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountApple value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountApple.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountApple value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountApple.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountApple.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountAppleOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountApple.getDefaultInstance() : account_; + } + } + /** + *
+     * The Apple account details.
+     * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountApple, com.heroiclabs.nakama.api.AccountApple.Builder, com.heroiclabs.nakama.api.AccountAppleOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountApple, com.heroiclabs.nakama.api.AccountApple.Builder, com.heroiclabs.nakama.api.AccountAppleOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateAppleRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateAppleRequest) + private static final com.heroiclabs.nakama.api.AuthenticateAppleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateAppleRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateAppleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateAppleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateAppleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequestOrBuilder.java new file mode 100644 index 00000000..d2983e12 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateAppleRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateAppleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateAppleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Apple account details.
+   * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Apple account details.
+   * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountApple getAccount(); + /** + *
+   * The Apple account details.
+   * 
+ * + * .nakama.api.AccountApple account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountAppleOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequest.java new file mode 100644 index 00000000..23ddb7bb --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with a custom ID.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateCustomRequest} + */ +public final class AuthenticateCustomRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateCustomRequest) + AuthenticateCustomRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateCustomRequest.class.getName()); + } + // Use AuthenticateCustomRequest.newBuilder() to construct. + private AuthenticateCustomRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateCustomRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateCustomRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateCustomRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateCustomRequest.class, com.heroiclabs.nakama.api.AuthenticateCustomRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountCustom account_; + /** + *
+   * The custom account details.
+   * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The custom account details.
+   * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountCustom getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance() : account_; + } + /** + *
+   * The custom account details.
+   * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountCustomOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateCustomRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateCustomRequest other = (com.heroiclabs.nakama.api.AuthenticateCustomRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateCustomRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with a custom ID.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateCustomRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateCustomRequest) + com.heroiclabs.nakama.api.AuthenticateCustomRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateCustomRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateCustomRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateCustomRequest.class, com.heroiclabs.nakama.api.AuthenticateCustomRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateCustomRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateCustomRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateCustomRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateCustomRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateCustomRequest build() { + com.heroiclabs.nakama.api.AuthenticateCustomRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateCustomRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateCustomRequest result = new com.heroiclabs.nakama.api.AuthenticateCustomRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateCustomRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateCustomRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateCustomRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateCustomRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateCustomRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountCustom account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountCustom, com.heroiclabs.nakama.api.AccountCustom.Builder, com.heroiclabs.nakama.api.AccountCustomOrBuilder> accountBuilder_; + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountCustom getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountCustom value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountCustom.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountCustom value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountCustom.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountCustomOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance() : account_; + } + } + /** + *
+     * The custom account details.
+     * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountCustom, com.heroiclabs.nakama.api.AccountCustom.Builder, com.heroiclabs.nakama.api.AccountCustomOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountCustom, com.heroiclabs.nakama.api.AccountCustom.Builder, com.heroiclabs.nakama.api.AccountCustomOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateCustomRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateCustomRequest) + private static final com.heroiclabs.nakama.api.AuthenticateCustomRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateCustomRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateCustomRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateCustomRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateCustomRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequestOrBuilder.java new file mode 100644 index 00000000..a7e6b43d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateCustomRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateCustomRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateCustomRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The custom account details.
+   * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The custom account details.
+   * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountCustom getAccount(); + /** + *
+   * The custom account details.
+   * 
+ * + * .nakama.api.AccountCustom account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountCustomOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequest.java new file mode 100644 index 00000000..a49e5416 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with a device ID.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateDeviceRequest} + */ +public final class AuthenticateDeviceRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateDeviceRequest) + AuthenticateDeviceRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateDeviceRequest.class.getName()); + } + // Use AuthenticateDeviceRequest.newBuilder() to construct. + private AuthenticateDeviceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateDeviceRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateDeviceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateDeviceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateDeviceRequest.class, com.heroiclabs.nakama.api.AuthenticateDeviceRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountDevice account_; + /** + *
+   * The device account details.
+   * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The device account details.
+   * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDevice getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance() : account_; + } + /** + *
+   * The device account details.
+   * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountDeviceOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateDeviceRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateDeviceRequest other = (com.heroiclabs.nakama.api.AuthenticateDeviceRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateDeviceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with a device ID.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateDeviceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateDeviceRequest) + com.heroiclabs.nakama.api.AuthenticateDeviceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateDeviceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateDeviceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateDeviceRequest.class, com.heroiclabs.nakama.api.AuthenticateDeviceRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateDeviceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateDeviceRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateDeviceRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateDeviceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateDeviceRequest build() { + com.heroiclabs.nakama.api.AuthenticateDeviceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateDeviceRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateDeviceRequest result = new com.heroiclabs.nakama.api.AuthenticateDeviceRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateDeviceRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateDeviceRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateDeviceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateDeviceRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateDeviceRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountDevice account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountDevice, com.heroiclabs.nakama.api.AccountDevice.Builder, com.heroiclabs.nakama.api.AccountDeviceOrBuilder> accountBuilder_; + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountDevice getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountDevice value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountDevice.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountDevice value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountDevice.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountDeviceOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance() : account_; + } + } + /** + *
+     * The device account details.
+     * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountDevice, com.heroiclabs.nakama.api.AccountDevice.Builder, com.heroiclabs.nakama.api.AccountDeviceOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountDevice, com.heroiclabs.nakama.api.AccountDevice.Builder, com.heroiclabs.nakama.api.AccountDeviceOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateDeviceRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateDeviceRequest) + private static final com.heroiclabs.nakama.api.AuthenticateDeviceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateDeviceRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateDeviceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateDeviceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateDeviceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequestOrBuilder.java new file mode 100644 index 00000000..e028c9e0 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateDeviceRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateDeviceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateDeviceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The device account details.
+   * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The device account details.
+   * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountDevice getAccount(); + /** + *
+   * The device account details.
+   * 
+ * + * .nakama.api.AccountDevice account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountDeviceOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequest.java new file mode 100644 index 00000000..b76ea64a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with email+password.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateEmailRequest} + */ +public final class AuthenticateEmailRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateEmailRequest) + AuthenticateEmailRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateEmailRequest.class.getName()); + } + // Use AuthenticateEmailRequest.newBuilder() to construct. + private AuthenticateEmailRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateEmailRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateEmailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateEmailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateEmailRequest.class, com.heroiclabs.nakama.api.AuthenticateEmailRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountEmail account_; + /** + *
+   * The email account details.
+   * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The email account details.
+   * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountEmail getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance() : account_; + } + /** + *
+   * The email account details.
+   * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountEmailOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateEmailRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateEmailRequest other = (com.heroiclabs.nakama.api.AuthenticateEmailRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateEmailRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with email+password.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateEmailRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateEmailRequest) + com.heroiclabs.nakama.api.AuthenticateEmailRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateEmailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateEmailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateEmailRequest.class, com.heroiclabs.nakama.api.AuthenticateEmailRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateEmailRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateEmailRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateEmailRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateEmailRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateEmailRequest build() { + com.heroiclabs.nakama.api.AuthenticateEmailRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateEmailRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateEmailRequest result = new com.heroiclabs.nakama.api.AuthenticateEmailRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateEmailRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateEmailRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateEmailRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateEmailRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateEmailRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountEmail account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountEmail, com.heroiclabs.nakama.api.AccountEmail.Builder, com.heroiclabs.nakama.api.AccountEmailOrBuilder> accountBuilder_; + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountEmail getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountEmail value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountEmail.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountEmail value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountEmail.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountEmailOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance() : account_; + } + } + /** + *
+     * The email account details.
+     * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountEmail, com.heroiclabs.nakama.api.AccountEmail.Builder, com.heroiclabs.nakama.api.AccountEmailOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountEmail, com.heroiclabs.nakama.api.AccountEmail.Builder, com.heroiclabs.nakama.api.AccountEmailOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateEmailRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateEmailRequest) + private static final com.heroiclabs.nakama.api.AuthenticateEmailRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateEmailRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateEmailRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateEmailRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateEmailRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequestOrBuilder.java new file mode 100644 index 00000000..6f285070 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateEmailRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateEmailRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateEmailRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The email account details.
+   * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The email account details.
+   * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountEmail getAccount(); + /** + *
+   * The email account details.
+   * 
+ * + * .nakama.api.AccountEmail account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountEmailOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequest.java new file mode 100644 index 00000000..9ea618da --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with Facebook Instant Game token.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateFacebookInstantGameRequest} + */ +public final class AuthenticateFacebookInstantGameRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateFacebookInstantGameRequest) + AuthenticateFacebookInstantGameRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateFacebookInstantGameRequest.class.getName()); + } + // Use AuthenticateFacebookInstantGameRequest.newBuilder() to construct. + private AuthenticateFacebookInstantGameRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateFacebookInstantGameRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.class, com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountFacebookInstantGame account_; + /** + *
+   * The Facebook Instant Game account details.
+   * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Facebook Instant Game account details.
+   * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookInstantGame getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance() : account_; + } + /** + *
+   * The Facebook Instant Game account details.
+   * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest other = (com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with Facebook Instant Game token.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateFacebookInstantGameRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateFacebookInstantGameRequest) + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.class, com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookInstantGameRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest build() { + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest result = new com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountFacebookInstantGame account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebookInstantGame, com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder, com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder> accountBuilder_; + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountFacebookInstantGame getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountFacebookInstantGame value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountFacebookInstantGame value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance() : account_; + } + } + /** + *
+     * The Facebook Instant Game account details.
+     * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebookInstantGame, com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder, com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebookInstantGame, com.heroiclabs.nakama.api.AccountFacebookInstantGame.Builder, com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateFacebookInstantGameRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateFacebookInstantGameRequest) + private static final com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateFacebookInstantGameRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequestOrBuilder.java new file mode 100644 index 00000000..fc648865 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookInstantGameRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateFacebookInstantGameRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateFacebookInstantGameRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Facebook Instant Game account details.
+   * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Facebook Instant Game account details.
+   * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountFacebookInstantGame getAccount(); + /** + *
+   * The Facebook Instant Game account details.
+   * 
+ * + * .nakama.api.AccountFacebookInstantGame account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountFacebookInstantGameOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequest.java new file mode 100644 index 00000000..e33a9afd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequest.java @@ -0,0 +1,1244 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with Facebook.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateFacebookRequest} + */ +public final class AuthenticateFacebookRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateFacebookRequest) + AuthenticateFacebookRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateFacebookRequest.class.getName()); + } + // Use AuthenticateFacebookRequest.newBuilder() to construct. + private AuthenticateFacebookRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateFacebookRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateFacebookRequest.class, com.heroiclabs.nakama.api.AuthenticateFacebookRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountFacebook account_; + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebook getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYNC_FIELD_NUMBER = 4; + private com.google.protobuf.BoolValue sync_; + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + @java.lang.Override + public boolean hasSync() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return The sync. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getSync() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getSync()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSync()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateFacebookRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateFacebookRequest other = (com.heroiclabs.nakama.api.AuthenticateFacebookRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (hasSync() != other.hasSync()) return false; + if (hasSync()) { + if (!getSync() + .equals(other.getSync())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + if (hasSync()) { + hash = (37 * hash) + SYNC_FIELD_NUMBER; + hash = (53 * hash) + getSync().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateFacebookRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with Facebook.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateFacebookRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateFacebookRequest) + com.heroiclabs.nakama.api.AuthenticateFacebookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateFacebookRequest.class, com.heroiclabs.nakama.api.AuthenticateFacebookRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateFacebookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + getSyncFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateFacebookRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateFacebookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookRequest build() { + com.heroiclabs.nakama.api.AuthenticateFacebookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateFacebookRequest result = new com.heroiclabs.nakama.api.AuthenticateFacebookRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateFacebookRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sync_ = syncBuilder_ == null + ? sync_ + : syncBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateFacebookRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateFacebookRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateFacebookRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateFacebookRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSync()) { + mergeSync(other.getSync()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getSyncFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountFacebook account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder> accountBuilder_; + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountFacebook getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountFacebook value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebook.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue sync_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> syncBuilder_; + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + public boolean hasSync() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return The sync. + */ + public com.google.protobuf.BoolValue getSync() { + if (syncBuilder_ == null) { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } else { + return syncBuilder_.getMessage(); + } + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder setSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sync_ = value; + } else { + syncBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder setSync( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (syncBuilder_ == null) { + sync_ = builderForValue.build(); + } else { + syncBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder mergeSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + sync_ != null && + sync_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getSyncBuilder().mergeFrom(value); + } else { + sync_ = value; + } + } else { + syncBuilder_.mergeFrom(value); + } + if (sync_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder clearSync() { + bitField0_ = (bitField0_ & ~0x00000008); + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValue.Builder getSyncBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSyncFieldBuilder().getBuilder(); + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + if (syncBuilder_ != null) { + return syncBuilder_.getMessageOrBuilder(); + } else { + return sync_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getSyncFieldBuilder() { + if (syncBuilder_ == null) { + syncBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getSync(), + getParentForChildren(), + isClean()); + sync_ = null; + } + return syncBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateFacebookRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateFacebookRequest) + private static final com.heroiclabs.nakama.api.AuthenticateFacebookRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateFacebookRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateFacebookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateFacebookRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateFacebookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequestOrBuilder.java new file mode 100644 index 00000000..b0351c8a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateFacebookRequestOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateFacebookRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateFacebookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountFacebook getAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + boolean hasSync(); + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return The sync. + */ + com.google.protobuf.BoolValue getSync(); + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequest.java new file mode 100644 index 00000000..d1757798 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with Apple's Game Center.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateGameCenterRequest} + */ +public final class AuthenticateGameCenterRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateGameCenterRequest) + AuthenticateGameCenterRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateGameCenterRequest.class.getName()); + } + // Use AuthenticateGameCenterRequest.newBuilder() to construct. + private AuthenticateGameCenterRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateGameCenterRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGameCenterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGameCenterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.class, com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountGameCenter account_; + /** + *
+   * The Game Center account details.
+   * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Game Center account details.
+   * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGameCenter getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance() : account_; + } + /** + *
+   * The Game Center account details.
+   * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGameCenterOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateGameCenterRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest other = (com.heroiclabs.nakama.api.AuthenticateGameCenterRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateGameCenterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with Apple's Game Center.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateGameCenterRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateGameCenterRequest) + com.heroiclabs.nakama.api.AuthenticateGameCenterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGameCenterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGameCenterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.class, com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGameCenterRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGameCenterRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGameCenterRequest build() { + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGameCenterRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest result = new com.heroiclabs.nakama.api.AuthenticateGameCenterRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateGameCenterRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateGameCenterRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateGameCenterRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateGameCenterRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountGameCenter account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountGameCenter, com.heroiclabs.nakama.api.AccountGameCenter.Builder, com.heroiclabs.nakama.api.AccountGameCenterOrBuilder> accountBuilder_; + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountGameCenter getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountGameCenter value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountGameCenter.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountGameCenter value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountGameCenter.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountGameCenterOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance() : account_; + } + } + /** + *
+     * The Game Center account details.
+     * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountGameCenter, com.heroiclabs.nakama.api.AccountGameCenter.Builder, com.heroiclabs.nakama.api.AccountGameCenterOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountGameCenter, com.heroiclabs.nakama.api.AccountGameCenter.Builder, com.heroiclabs.nakama.api.AccountGameCenterOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateGameCenterRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateGameCenterRequest) + private static final com.heroiclabs.nakama.api.AuthenticateGameCenterRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateGameCenterRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateGameCenterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateGameCenterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGameCenterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequestOrBuilder.java new file mode 100644 index 00000000..82c78d3e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGameCenterRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateGameCenterRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateGameCenterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Game Center account details.
+   * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Game Center account details.
+   * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountGameCenter getAccount(); + /** + *
+   * The Game Center account details.
+   * 
+ * + * .nakama.api.AccountGameCenter account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountGameCenterOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequest.java new file mode 100644 index 00000000..b616d3d1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with Google.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateGoogleRequest} + */ +public final class AuthenticateGoogleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateGoogleRequest) + AuthenticateGoogleRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateGoogleRequest.class.getName()); + } + // Use AuthenticateGoogleRequest.newBuilder() to construct. + private AuthenticateGoogleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateGoogleRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateGoogleRequest.class, com.heroiclabs.nakama.api.AuthenticateGoogleRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountGoogle account_; + /** + *
+   * The Google account details.
+   * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Google account details.
+   * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGoogle getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance() : account_; + } + /** + *
+   * The Google account details.
+   * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountGoogleOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateGoogleRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateGoogleRequest other = (com.heroiclabs.nakama.api.AuthenticateGoogleRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateGoogleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with Google.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateGoogleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateGoogleRequest) + com.heroiclabs.nakama.api.AuthenticateGoogleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateGoogleRequest.class, com.heroiclabs.nakama.api.AuthenticateGoogleRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateGoogleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateGoogleRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGoogleRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateGoogleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGoogleRequest build() { + com.heroiclabs.nakama.api.AuthenticateGoogleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGoogleRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateGoogleRequest result = new com.heroiclabs.nakama.api.AuthenticateGoogleRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateGoogleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateGoogleRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateGoogleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateGoogleRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateGoogleRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountGoogle account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountGoogle, com.heroiclabs.nakama.api.AccountGoogle.Builder, com.heroiclabs.nakama.api.AccountGoogleOrBuilder> accountBuilder_; + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountGoogle getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountGoogle value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountGoogle.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountGoogle value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountGoogle.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountGoogleOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance() : account_; + } + } + /** + *
+     * The Google account details.
+     * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountGoogle, com.heroiclabs.nakama.api.AccountGoogle.Builder, com.heroiclabs.nakama.api.AccountGoogleOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountGoogle, com.heroiclabs.nakama.api.AccountGoogle.Builder, com.heroiclabs.nakama.api.AccountGoogleOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateGoogleRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateGoogleRequest) + private static final com.heroiclabs.nakama.api.AuthenticateGoogleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateGoogleRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateGoogleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateGoogleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateGoogleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequestOrBuilder.java new file mode 100644 index 00000000..36a4eadd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateGoogleRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateGoogleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateGoogleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google account details.
+   * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Google account details.
+   * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountGoogle getAccount(); + /** + *
+   * The Google account details.
+   * 
+ * + * .nakama.api.AccountGoogle account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountGoogleOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequest.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequest.java new file mode 100644 index 00000000..d54eab30 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequest.java @@ -0,0 +1,1244 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with Steam.
+ * 
+ * + * Protobuf type {@code nakama.api.AuthenticateSteamRequest} + */ +public final class AuthenticateSteamRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.AuthenticateSteamRequest) + AuthenticateSteamRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateSteamRequest.class.getName()); + } + // Use AuthenticateSteamRequest.newBuilder() to construct. + private AuthenticateSteamRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateSteamRequest() { + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateSteamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateSteamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateSteamRequest.class, com.heroiclabs.nakama.api.AuthenticateSteamRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountSteam account_; + /** + *
+   * The Steam account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Steam account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteam getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + /** + *
+   * The Steam account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + + public static final int CREATE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue create_; + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + @java.lang.Override + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getCreate() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYNC_FIELD_NUMBER = 4; + private com.google.protobuf.BoolValue sync_; + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + @java.lang.Override + public boolean hasSync() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return The sync. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getSync() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getSync()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreate()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSync()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.AuthenticateSteamRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.AuthenticateSteamRequest other = (com.heroiclabs.nakama.api.AuthenticateSteamRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasCreate() != other.hasCreate()) return false; + if (hasCreate()) { + if (!getCreate() + .equals(other.getCreate())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (hasSync() != other.hasSync()) return false; + if (hasSync()) { + if (!getSync() + .equals(other.getSync())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasCreate()) { + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + if (hasSync()) { + hash = (37 * hash) + SYNC_FIELD_NUMBER; + hash = (53 * hash) + getSync().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.AuthenticateSteamRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with Steam.
+   * 
+ * + * Protobuf type {@code nakama.api.AuthenticateSteamRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.AuthenticateSteamRequest) + com.heroiclabs.nakama.api.AuthenticateSteamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateSteamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateSteamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.AuthenticateSteamRequest.class, com.heroiclabs.nakama.api.AuthenticateSteamRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.AuthenticateSteamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getCreateFieldBuilder(); + getSyncFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + username_ = ""; + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_AuthenticateSteamRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateSteamRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.AuthenticateSteamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateSteamRequest build() { + com.heroiclabs.nakama.api.AuthenticateSteamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateSteamRequest buildPartial() { + com.heroiclabs.nakama.api.AuthenticateSteamRequest result = new com.heroiclabs.nakama.api.AuthenticateSteamRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.AuthenticateSteamRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.create_ = createBuilder_ == null + ? create_ + : createBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sync_ = syncBuilder_ == null + ? sync_ + : syncBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.AuthenticateSteamRequest) { + return mergeFrom((com.heroiclabs.nakama.api.AuthenticateSteamRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.AuthenticateSteamRequest other) { + if (other == com.heroiclabs.nakama.api.AuthenticateSteamRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasCreate()) { + mergeCreate(other.getCreate()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSync()) { + mergeSync(other.getSync()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCreateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getSyncFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountSteam account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder> accountBuilder_; + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountSteam getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountSteam value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountSteam.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountSteam value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountSteam.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + } + /** + *
+     * The Steam account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue create_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> createBuilder_; + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + public boolean hasCreate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + public com.google.protobuf.BoolValue getCreate() { + if (createBuilder_ == null) { + return create_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } else { + return createBuilder_.getMessage(); + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + create_ = value; + } else { + createBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder setCreate( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (createBuilder_ == null) { + create_ = builderForValue.build(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder mergeCreate(com.google.protobuf.BoolValue value) { + if (createBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + create_ != null && + create_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getCreateBuilder().mergeFrom(value); + } else { + create_ = value; + } + } else { + createBuilder_.mergeFrom(value); + } + if (create_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public Builder clearCreate() { + bitField0_ = (bitField0_ & ~0x00000002); + create_ = null; + if (createBuilder_ != null) { + createBuilder_.dispose(); + createBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValue.Builder getCreateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + public com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder() { + if (createBuilder_ != null) { + return createBuilder_.getMessageOrBuilder(); + } else { + return create_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : create_; + } + } + /** + *
+     * Register the account if the user does not already exist.
+     * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + createBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getCreate(), + getParentForChildren(), + isClean()); + create_ = null; + } + return createBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Set the username on the account at register. Must be unique.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue sync_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> syncBuilder_; + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + public boolean hasSync() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return The sync. + */ + public com.google.protobuf.BoolValue getSync() { + if (syncBuilder_ == null) { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } else { + return syncBuilder_.getMessage(); + } + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder setSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sync_ = value; + } else { + syncBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder setSync( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (syncBuilder_ == null) { + sync_ = builderForValue.build(); + } else { + syncBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder mergeSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + sync_ != null && + sync_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getSyncBuilder().mergeFrom(value); + } else { + sync_ = value; + } + } else { + syncBuilder_.mergeFrom(value); + } + if (sync_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public Builder clearSync() { + bitField0_ = (bitField0_ & ~0x00000008); + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValue.Builder getSyncBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSyncFieldBuilder().getBuilder(); + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + if (syncBuilder_ != null) { + return syncBuilder_.getMessageOrBuilder(); + } else { + return sync_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getSyncFieldBuilder() { + if (syncBuilder_ == null) { + syncBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getSync(), + getParentForChildren(), + isClean()); + sync_ = null; + } + return syncBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.AuthenticateSteamRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.AuthenticateSteamRequest) + private static final com.heroiclabs.nakama.api.AuthenticateSteamRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.AuthenticateSteamRequest(); + } + + public static com.heroiclabs.nakama.api.AuthenticateSteamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateSteamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.AuthenticateSteamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequestOrBuilder.java new file mode 100644 index 00000000..9aaba992 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/AuthenticateSteamRequestOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface AuthenticateSteamRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.AuthenticateSteamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Steam account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Steam account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountSteam getAccount(); + /** + *
+   * The Steam account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder(); + + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return Whether the create field is set. + */ + boolean hasCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + * @return The create. + */ + com.google.protobuf.BoolValue getCreate(); + /** + *
+   * Register the account if the user does not already exist.
+   * 
+ * + * .google.protobuf.BoolValue create = 2 [json_name = "create"]; + */ + com.google.protobuf.BoolValueOrBuilder getCreateOrBuilder(); + + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Set the username on the account at register. Must be unique.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + boolean hasSync(); + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + * @return The sync. + */ + com.google.protobuf.BoolValue getSync(); + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 4 [json_name = "sync"]; + */ + com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequest.java b/src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequest.java new file mode 100644 index 00000000..b73a479b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Ban users from a group.
+ * 
+ * + * Protobuf type {@code nakama.api.BanGroupUsersRequest} + */ +public final class BanGroupUsersRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.BanGroupUsersRequest) + BanGroupUsersRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + BanGroupUsersRequest.class.getName()); + } + // Use BanGroupUsersRequest.newBuilder() to construct. + private BanGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BanGroupUsersRequest() { + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.BanGroupUsersRequest.class, com.heroiclabs.nakama.api.BanGroupUsersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group to ban users from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group to ban users from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + return userIds_; + } + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + for (int i = 0; i < userIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, userIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < userIds_.size(); i++) { + dataSize += computeStringSizeNoTag(userIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.BanGroupUsersRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.BanGroupUsersRequest other = (com.heroiclabs.nakama.api.BanGroupUsersRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdsList() + .equals(other.getUserIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getUserIdsCount() > 0) { + hash = (37 * hash) + USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUserIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.BanGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.BanGroupUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Ban users from a group.
+   * 
+ * + * Protobuf type {@code nakama.api.BanGroupUsersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.BanGroupUsersRequest) + com.heroiclabs.nakama.api.BanGroupUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.BanGroupUsersRequest.class, com.heroiclabs.nakama.api.BanGroupUsersRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.BanGroupUsersRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BanGroupUsersRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BanGroupUsersRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.BanGroupUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BanGroupUsersRequest build() { + com.heroiclabs.nakama.api.BanGroupUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BanGroupUsersRequest buildPartial() { + com.heroiclabs.nakama.api.BanGroupUsersRequest result = new com.heroiclabs.nakama.api.BanGroupUsersRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.BanGroupUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + userIds_.makeImmutable(); + result.userIds_ = userIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.BanGroupUsersRequest) { + return mergeFrom((com.heroiclabs.nakama.api.BanGroupUsersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.BanGroupUsersRequest other) { + if (other == com.heroiclabs.nakama.api.BanGroupUsersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.userIds_.isEmpty()) { + if (userIds_.isEmpty()) { + userIds_ = other.userIds_; + bitField0_ |= 0x00000002; + } else { + ensureUserIdsIsMutable(); + userIds_.addAll(other.userIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserIdsIsMutable(); + userIds_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group to ban users from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group to ban users from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group to ban users from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group to ban users from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group to ban users from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUserIdsIsMutable() { + if (!userIds_.isModifiable()) { + userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + userIds_.makeImmutable(); + return userIds_; + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index to set the value at. + * @param value The userIds to set. + * @return This builder for chaining. + */ + public Builder setUserIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param values The userIds to add. + * @return This builder for chaining. + */ + public Builder addAllUserIds( + java.lang.Iterable values) { + ensureUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return This builder for chaining. + */ + public Builder clearUserIds() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The users to ban.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The bytes of the userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.BanGroupUsersRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.BanGroupUsersRequest) + private static final com.heroiclabs.nakama.api.BanGroupUsersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.BanGroupUsersRequest(); + } + + public static com.heroiclabs.nakama.api.BanGroupUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BanGroupUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BanGroupUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequestOrBuilder.java new file mode 100644 index 00000000..c9542d25 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/BanGroupUsersRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface BanGroupUsersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.BanGroupUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group to ban users from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group to ban users from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + java.util.List + getUserIdsList(); + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + int getUserIdsCount(); + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + java.lang.String getUserIds(int index); + /** + *
+   * The users to ban.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + com.google.protobuf.ByteString + getUserIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequest.java b/src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequest.java new file mode 100644 index 00000000..d23b609f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Block one or more friends for the current user.
+ * 
+ * + * Protobuf type {@code nakama.api.BlockFriendsRequest} + */ +public final class BlockFriendsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.BlockFriendsRequest) + BlockFriendsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + BlockFriendsRequest.class.getName()); + } + // Use BlockFriendsRequest.newBuilder() to construct. + private BlockFriendsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BlockFriendsRequest() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BlockFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BlockFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.BlockFriendsRequest.class, com.heroiclabs.nakama.api.BlockFriendsRequest.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + return ids_; + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + + public static final int USERNAMES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + return usernames_; + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < ids_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i)); + } + for (int i = 0; i < usernames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, usernames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ids_.size(); i++) { + dataSize += computeStringSizeNoTag(ids_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < usernames_.size(); i++) { + dataSize += computeStringSizeNoTag(usernames_.getRaw(i)); + } + size += dataSize; + size += 1 * getUsernamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.BlockFriendsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.BlockFriendsRequest other = (com.heroiclabs.nakama.api.BlockFriendsRequest) obj; + + if (!getIdsList() + .equals(other.getIdsList())) return false; + if (!getUsernamesList() + .equals(other.getUsernamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getUsernamesCount() > 0) { + hash = (37 * hash) + USERNAMES_FIELD_NUMBER; + hash = (53 * hash) + getUsernamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.BlockFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.BlockFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Block one or more friends for the current user.
+   * 
+ * + * Protobuf type {@code nakama.api.BlockFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.BlockFriendsRequest) + com.heroiclabs.nakama.api.BlockFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BlockFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BlockFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.BlockFriendsRequest.class, com.heroiclabs.nakama.api.BlockFriendsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.BlockFriendsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_BlockFriendsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BlockFriendsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.BlockFriendsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BlockFriendsRequest build() { + com.heroiclabs.nakama.api.BlockFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BlockFriendsRequest buildPartial() { + com.heroiclabs.nakama.api.BlockFriendsRequest result = new com.heroiclabs.nakama.api.BlockFriendsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.BlockFriendsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + usernames_.makeImmutable(); + result.usernames_ = usernames_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.BlockFriendsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.BlockFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.BlockFriendsRequest other) { + if (other == com.heroiclabs.nakama.api.BlockFriendsRequest.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ |= 0x00000001; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.usernames_.isEmpty()) { + if (usernames_.isEmpty()) { + usernames_ = other.usernames_; + bitField0_ |= 0x00000002; + } else { + ensureUsernamesIsMutable(); + usernames_.addAll(other.usernames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureIdsIsMutable(); + ids_.add(s); + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUsernamesIsMutable(); + usernames_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = new com.google.protobuf.LazyStringArrayList(ids_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds( + java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ids_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The bytes of the ids to add. + * @return This builder for chaining. + */ + public Builder addIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUsernamesIsMutable() { + if (!usernames_.isModifiable()) { + usernames_ = new com.google.protobuf.LazyStringArrayList(usernames_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + usernames_.makeImmutable(); + return usernames_; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index to set the value at. + * @param value The usernames to set. + * @return This builder for chaining. + */ + public Builder setUsernames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param values The usernames to add. + * @return This builder for chaining. + */ + public Builder addAllUsernames( + java.lang.Iterable values) { + ensureUsernamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, usernames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return This builder for chaining. + */ + public Builder clearUsernames() { + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The bytes of the usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.BlockFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.BlockFriendsRequest) + private static final com.heroiclabs.nakama.api.BlockFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.BlockFriendsRequest(); + } + + public static com.heroiclabs.nakama.api.BlockFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BlockFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.BlockFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequestOrBuilder.java new file mode 100644 index 00000000..583731b4 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/BlockFriendsRequestOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface BlockFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.BlockFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + java.util.List + getIdsList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + int getIdsCount(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + java.lang.String getIds(int index); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + com.google.protobuf.ByteString + getIdsBytes(int index); + + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + java.util.List + getUsernamesList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + int getUsernamesCount(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + java.lang.String getUsernames(int index); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + com.google.protobuf.ByteString + getUsernamesBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ChannelMessage.java b/src/main/java/com/heroiclabs/nakama/api/ChannelMessage.java new file mode 100644 index 00000000..4cd15c0d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ChannelMessage.java @@ -0,0 +1,2789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A message sent on a channel.
+ * 
+ * + * Protobuf type {@code nakama.api.ChannelMessage} + */ +public final class ChannelMessage extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ChannelMessage) + ChannelMessageOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelMessage.class.getName()); + } + // Use ChannelMessage.newBuilder() to construct. + private ChannelMessage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelMessage() { + channelId_ = ""; + messageId_ = ""; + senderId_ = ""; + username_ = ""; + content_ = ""; + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ChannelMessage.class, com.heroiclabs.nakama.api.ChannelMessage.Builder.class); + } + + private int bitField0_; + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The channel this message belongs to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The channel this message belongs to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object messageId_ = ""; + /** + *
+   * The unique ID of this message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } + } + /** + *
+   * The unique ID of this message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value code_; + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return Whether the code field is set. + */ + @java.lang.Override + public boolean hasCode() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return The code. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getCode() { + return code_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getCodeOrBuilder() { + return code_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } + + public static final int SENDER_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object senderId_ = ""; + /** + *
+   * Message sender, usually a user ID.
+   * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @return The senderId. + */ + @java.lang.Override + public java.lang.String getSenderId() { + java.lang.Object ref = senderId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + senderId_ = s; + return s; + } + } + /** + *
+   * Message sender, usually a user ID.
+   * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @return The bytes for senderId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderIdBytes() { + java.lang.Object ref = senderId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + senderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * The username of the message sender, if any.
+   * 
+ * + * string username = 5 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * The username of the message sender, if any.
+   * 
+ * + * string username = 5 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + *
+   * The content payload.
+   * 
+ * + * string content = 6 [json_name = "content"]; + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + *
+   * The content payload.
+   * 
+ * + * string content = 6 [json_name = "content"]; + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int PERSISTENT_FIELD_NUMBER = 9; + private com.google.protobuf.BoolValue persistent_; + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + * @return Whether the persistent field is set. + */ + @java.lang.Override + public boolean hasPersistent() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + * @return The persistent. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersistent() { + return persistent_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistentOrBuilder() { + return persistent_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } + + public static final int ROOM_NAME_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object roomName_ = ""; + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @return The roomName. + */ + @java.lang.Override + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } + } + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_ONE_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdOne_ = ""; + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + @java.lang.Override + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } + } + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_TWO_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdTwo_ = ""; + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + @java.lang.Override + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } + } + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, messageId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCode()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(senderId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, senderId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, username_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, content_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getPersistent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, userIdTwo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, messageId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCode()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(senderId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, senderId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, username_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, content_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getPersistent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, userIdTwo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ChannelMessage)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ChannelMessage other = (com.heroiclabs.nakama.api.ChannelMessage) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (!getMessageId() + .equals(other.getMessageId())) return false; + if (hasCode() != other.hasCode()) return false; + if (hasCode()) { + if (!getCode() + .equals(other.getCode())) return false; + } + if (!getSenderId() + .equals(other.getSenderId())) return false; + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasPersistent() != other.hasPersistent()) return false; + if (hasPersistent()) { + if (!getPersistent() + .equals(other.getPersistent())) return false; + } + if (!getRoomName() + .equals(other.getRoomName())) return false; + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdOne() + .equals(other.getUserIdOne())) return false; + if (!getUserIdTwo() + .equals(other.getUserIdTwo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + hash = (37 * hash) + MESSAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMessageId().hashCode(); + if (hasCode()) { + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + } + hash = (37 * hash) + SENDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSenderId().hashCode(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasPersistent()) { + hash = (37 * hash) + PERSISTENT_FIELD_NUMBER; + hash = (53 * hash) + getPersistent().hashCode(); + } + hash = (37 * hash) + ROOM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRoomName().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + USER_ID_ONE_FIELD_NUMBER; + hash = (53 * hash) + getUserIdOne().hashCode(); + hash = (37 * hash) + USER_ID_TWO_FIELD_NUMBER; + hash = (53 * hash) + getUserIdTwo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ChannelMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ChannelMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ChannelMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ChannelMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A message sent on a channel.
+   * 
+ * + * Protobuf type {@code nakama.api.ChannelMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ChannelMessage) + com.heroiclabs.nakama.api.ChannelMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ChannelMessage.class, com.heroiclabs.nakama.api.ChannelMessage.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ChannelMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCodeFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getPersistentFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + messageId_ = ""; + code_ = null; + if (codeBuilder_ != null) { + codeBuilder_.dispose(); + codeBuilder_ = null; + } + senderId_ = ""; + username_ = ""; + content_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + persistent_ = null; + if (persistentBuilder_ != null) { + persistentBuilder_.dispose(); + persistentBuilder_ = null; + } + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessage_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessage getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessage build() { + com.heroiclabs.nakama.api.ChannelMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessage buildPartial() { + com.heroiclabs.nakama.api.ChannelMessage result = new com.heroiclabs.nakama.api.ChannelMessage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ChannelMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messageId_ = messageId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.code_ = codeBuilder_ == null + ? code_ + : codeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.senderId_ = senderId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.persistent_ = persistentBuilder_ == null + ? persistent_ + : persistentBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.roomName_ = roomName_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.userIdOne_ = userIdOne_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.userIdTwo_ = userIdTwo_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ChannelMessage) { + return mergeFrom((com.heroiclabs.nakama.api.ChannelMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ChannelMessage other) { + if (other == com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMessageId().isEmpty()) { + messageId_ = other.messageId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCode()) { + mergeCode(other.getCode()); + } + if (!other.getSenderId().isEmpty()) { + senderId_ = other.senderId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasPersistent()) { + mergePersistent(other.getPersistent()); + } + if (!other.getRoomName().isEmpty()) { + roomName_ = other.roomName_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getUserIdOne().isEmpty()) { + userIdOne_ = other.userIdOne_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getUserIdTwo().isEmpty()) { + userIdTwo_ = other.userIdTwo_; + bitField0_ |= 0x00001000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + messageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getCodeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + senderId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + input.readMessage( + getPersistentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + roomName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + userIdOne_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + userIdTwo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The channel this message belongs to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The channel this message belongs to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The channel this message belongs to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The channel this message belongs to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The channel this message belongs to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object messageId_ = ""; + /** + *
+     * The unique ID of this message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unique ID of this message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unique ID of this message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The unique ID of this message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return This builder for chaining. + */ + public Builder clearMessageId() { + messageId_ = getDefaultInstance().getMessageId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The unique ID of this message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value code_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> codeBuilder_; + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return Whether the code field is set. + */ + public boolean hasCode() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return The code. + */ + public com.google.protobuf.Int32Value getCode() { + if (codeBuilder_ == null) { + return code_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } else { + return codeBuilder_.getMessage(); + } + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder setCode(com.google.protobuf.Int32Value value) { + if (codeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + } else { + codeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder setCode( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (codeBuilder_ == null) { + code_ = builderForValue.build(); + } else { + codeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder mergeCode(com.google.protobuf.Int32Value value) { + if (codeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + code_ != null && + code_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getCodeBuilder().mergeFrom(value); + } else { + code_ = value; + } + } else { + codeBuilder_.mergeFrom(value); + } + if (code_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000004); + code_ = null; + if (codeBuilder_ != null) { + codeBuilder_.dispose(); + codeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public com.google.protobuf.Int32Value.Builder getCodeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCodeFieldBuilder().getBuilder(); + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getCodeOrBuilder() { + if (codeBuilder_ != null) { + return codeBuilder_.getMessageOrBuilder(); + } else { + return code_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getCodeFieldBuilder() { + if (codeBuilder_ == null) { + codeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getCode(), + getParentForChildren(), + isClean()); + code_ = null; + } + return codeBuilder_; + } + + private java.lang.Object senderId_ = ""; + /** + *
+     * Message sender, usually a user ID.
+     * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @return The senderId. + */ + public java.lang.String getSenderId() { + java.lang.Object ref = senderId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + senderId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Message sender, usually a user ID.
+     * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @return The bytes for senderId. + */ + public com.google.protobuf.ByteString + getSenderIdBytes() { + java.lang.Object ref = senderId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + senderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Message sender, usually a user ID.
+     * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @param value The senderId to set. + * @return This builder for chaining. + */ + public Builder setSenderId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + senderId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Message sender, usually a user ID.
+     * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @return This builder for chaining. + */ + public Builder clearSenderId() { + senderId_ = getDefaultInstance().getSenderId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Message sender, usually a user ID.
+     * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @param value The bytes for senderId to set. + * @return This builder for chaining. + */ + public Builder setSenderIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + senderId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object username_ = ""; + /** + *
+     * The username of the message sender, if any.
+     * 
+ * + * string username = 5 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The username of the message sender, if any.
+     * 
+ * + * string username = 5 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The username of the message sender, if any.
+     * 
+ * + * string username = 5 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The username of the message sender, if any.
+     * 
+ * + * string username = 5 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The username of the message sender, if any.
+     * 
+ * + * string username = 5 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + *
+     * The content payload.
+     * 
+ * + * string content = 6 [json_name = "content"]; + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The content payload.
+     * 
+ * + * string content = 6 [json_name = "content"]; + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The content payload.
+     * 
+ * + * string content = 6 [json_name = "content"]; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The content payload.
+     * 
+ * + * string content = 6 [json_name = "content"]; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The content payload.
+     * 
+ * + * string content = 6 [json_name = "content"]; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.BoolValue persistent_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistentBuilder_; + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + * @return Whether the persistent field is set. + */ + public boolean hasPersistent() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + * @return The persistent. + */ + public com.google.protobuf.BoolValue getPersistent() { + if (persistentBuilder_ == null) { + return persistent_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } else { + return persistentBuilder_.getMessage(); + } + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + public Builder setPersistent(com.google.protobuf.BoolValue value) { + if (persistentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistent_ = value; + } else { + persistentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + public Builder setPersistent( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistentBuilder_ == null) { + persistent_ = builderForValue.build(); + } else { + persistentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + public Builder mergePersistent(com.google.protobuf.BoolValue value) { + if (persistentBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + persistent_ != null && + persistent_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistentBuilder().mergeFrom(value); + } else { + persistent_ = value; + } + } else { + persistentBuilder_.mergeFrom(value); + } + if (persistent_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + public Builder clearPersistent() { + bitField0_ = (bitField0_ & ~0x00000100); + persistent_ = null; + if (persistentBuilder_ != null) { + persistentBuilder_.dispose(); + persistentBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistentBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getPersistentFieldBuilder().getBuilder(); + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistentOrBuilder() { + if (persistentBuilder_ != null) { + return persistentBuilder_.getMessageOrBuilder(); + } else { + return persistent_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistentFieldBuilder() { + if (persistentBuilder_ == null) { + persistentBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersistent(), + getParentForChildren(), + isClean()); + persistent_ = null; + } + return persistentBuilder_; + } + + private java.lang.Object roomName_ = ""; + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @return The roomName. + */ + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @param value The roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + roomName_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @return This builder for chaining. + */ + public Builder clearRoomName() { + roomName_ = getDefaultInstance().getRoomName(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @param value The bytes for roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + roomName_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object userIdOne_ = ""; + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @param value The userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOne( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdOne_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @return This builder for chaining. + */ + public Builder clearUserIdOne() { + userIdOne_ = getDefaultInstance().getUserIdOne(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @param value The bytes for userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdOne_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object userIdTwo_ = ""; + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @param value The userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdTwo_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @return This builder for chaining. + */ + public Builder clearUserIdTwo() { + userIdTwo_ = getDefaultInstance().getUserIdTwo(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @param value The bytes for userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdTwo_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ChannelMessage) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ChannelMessage) + private static final com.heroiclabs.nakama.api.ChannelMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ChannelMessage(); + } + + public static com.heroiclabs.nakama.api.ChannelMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ChannelMessageList.java b/src/main/java/com/heroiclabs/nakama/api/ChannelMessageList.java new file mode 100644 index 00000000..5bb320cf --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ChannelMessageList.java @@ -0,0 +1,1311 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of channel messages, usually a result of a list operation.
+ * 
+ * + * Protobuf type {@code nakama.api.ChannelMessageList} + */ +public final class ChannelMessageList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ChannelMessageList) + ChannelMessageListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelMessageList.class.getName()); + } + // Use ChannelMessageList.newBuilder() to construct. + private ChannelMessageList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelMessageList() { + messages_ = java.util.Collections.emptyList(); + nextCursor_ = ""; + prevCursor_ = ""; + cacheableCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessageList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessageList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ChannelMessageList.class, com.heroiclabs.nakama.api.ChannelMessageList.Builder.class); + } + + public static final int MESSAGES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List messages_; + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public java.util.List getMessagesList() { + return messages_; + } + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public java.util.List + getMessagesOrBuilderList() { + return messages_; + } + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public int getMessagesCount() { + return messages_.size(); + } + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessage getMessages(int index) { + return messages_.get(index); + } + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessageOrBuilder getMessagesOrBuilder( + int index) { + return messages_.get(index); + } + + public static final int NEXT_CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + @java.lang.Override + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREV_CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object prevCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + @java.lang.Override + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CACHEABLE_CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cacheableCursor_ = ""; + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + @java.lang.Override + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } + } + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < messages_.size(); i++) { + output.writeMessage(1, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, prevCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cacheableCursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < messages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, prevCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cacheableCursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ChannelMessageList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ChannelMessageList other = (com.heroiclabs.nakama.api.ChannelMessageList) obj; + + if (!getMessagesList() + .equals(other.getMessagesList())) return false; + if (!getNextCursor() + .equals(other.getNextCursor())) return false; + if (!getPrevCursor() + .equals(other.getPrevCursor())) return false; + if (!getCacheableCursor() + .equals(other.getCacheableCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMessagesCount() > 0) { + hash = (37 * hash) + MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getMessagesList().hashCode(); + } + hash = (37 * hash) + NEXT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getNextCursor().hashCode(); + hash = (37 * hash) + PREV_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getPrevCursor().hashCode(); + hash = (37 * hash) + CACHEABLE_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCacheableCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ChannelMessageList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ChannelMessageList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ChannelMessageList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ChannelMessageList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of channel messages, usually a result of a list operation.
+   * 
+ * + * Protobuf type {@code nakama.api.ChannelMessageList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ChannelMessageList) + com.heroiclabs.nakama.api.ChannelMessageListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessageList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessageList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ChannelMessageList.class, com.heroiclabs.nakama.api.ChannelMessageList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ChannelMessageList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + } else { + messages_ = null; + messagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextCursor_ = ""; + prevCursor_ = ""; + cacheableCursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ChannelMessageList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessageList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ChannelMessageList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessageList build() { + com.heroiclabs.nakama.api.ChannelMessageList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessageList buildPartial() { + com.heroiclabs.nakama.api.ChannelMessageList result = new com.heroiclabs.nakama.api.ChannelMessageList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.ChannelMessageList result) { + if (messagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + messages_ = java.util.Collections.unmodifiableList(messages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.messages_ = messages_; + } else { + result.messages_ = messagesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.ChannelMessageList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextCursor_ = nextCursor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.prevCursor_ = prevCursor_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cacheableCursor_ = cacheableCursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ChannelMessageList) { + return mergeFrom((com.heroiclabs.nakama.api.ChannelMessageList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ChannelMessageList other) { + if (other == com.heroiclabs.nakama.api.ChannelMessageList.getDefaultInstance()) return this; + if (messagesBuilder_ == null) { + if (!other.messages_.isEmpty()) { + if (messages_.isEmpty()) { + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMessagesIsMutable(); + messages_.addAll(other.messages_); + } + onChanged(); + } + } else { + if (!other.messages_.isEmpty()) { + if (messagesBuilder_.isEmpty()) { + messagesBuilder_.dispose(); + messagesBuilder_ = null; + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000001); + messagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMessagesFieldBuilder() : null; + } else { + messagesBuilder_.addAllMessages(other.messages_); + } + } + } + if (!other.getNextCursor().isEmpty()) { + nextCursor_ = other.nextCursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPrevCursor().isEmpty()) { + prevCursor_ = other.prevCursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getCacheableCursor().isEmpty()) { + cacheableCursor_ = other.cacheableCursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.ChannelMessage m = + input.readMessage( + com.heroiclabs.nakama.api.ChannelMessage.parser(), + extensionRegistry); + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(m); + } else { + messagesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + prevCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cacheableCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List messages_ = + java.util.Collections.emptyList(); + private void ensureMessagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + messages_ = new java.util.ArrayList(messages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ChannelMessage, com.heroiclabs.nakama.api.ChannelMessage.Builder, com.heroiclabs.nakama.api.ChannelMessageOrBuilder> messagesBuilder_; + + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public java.util.List getMessagesList() { + if (messagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(messages_); + } else { + return messagesBuilder_.getMessageList(); + } + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public int getMessagesCount() { + if (messagesBuilder_ == null) { + return messages_.size(); + } else { + return messagesBuilder_.getCount(); + } + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.nakama.api.ChannelMessage getMessages(int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessage(index); + } + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder setMessages( + int index, com.heroiclabs.nakama.api.ChannelMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.set(index, value); + onChanged(); + } else { + messagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder setMessages( + int index, com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.set(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder addMessages(com.heroiclabs.nakama.api.ChannelMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(value); + onChanged(); + } else { + messagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder addMessages( + int index, com.heroiclabs.nakama.api.ChannelMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(index, value); + onChanged(); + } else { + messagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder addMessages( + com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder addMessages( + int index, com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder addAllMessages( + java.lang.Iterable values) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, messages_); + onChanged(); + } else { + messagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder clearMessages() { + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + messagesBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public Builder removeMessages(int index) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.remove(index); + onChanged(); + } else { + messagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.nakama.api.ChannelMessage.Builder getMessagesBuilder( + int index) { + return getMessagesFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.nakama.api.ChannelMessageOrBuilder getMessagesOrBuilder( + int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); } else { + return messagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public java.util.List + getMessagesOrBuilderList() { + if (messagesBuilder_ != null) { + return messagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messages_); + } + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.nakama.api.ChannelMessage.Builder addMessagesBuilder() { + return getMessagesFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance()); + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.nakama.api.ChannelMessage.Builder addMessagesBuilder( + int index) { + return getMessagesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance()); + } + /** + *
+     * A list of messages.
+     * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + public java.util.List + getMessagesBuilderList() { + return getMessagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ChannelMessage, com.heroiclabs.nakama.api.ChannelMessage.Builder, com.heroiclabs.nakama.api.ChannelMessageOrBuilder> + getMessagesFieldBuilder() { + if (messagesBuilder_ == null) { + messagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ChannelMessage, com.heroiclabs.nakama.api.ChannelMessage.Builder, com.heroiclabs.nakama.api.ChannelMessageOrBuilder>( + messages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + messages_ = null; + } + return messagesBuilder_; + } + + private java.lang.Object nextCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @param value The nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return This builder for chaining. + */ + public Builder clearNextCursor() { + nextCursor_ = getDefaultInstance().getNextCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @param value The bytes for nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object prevCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return This builder for chaining. + */ + public Builder clearPrevCursor() { + prevCursor_ = getDefaultInstance().getPrevCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The bytes for prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object cacheableCursor_ = ""; + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @param value The cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cacheableCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return This builder for chaining. + */ + public Builder clearCacheableCursor() { + cacheableCursor_ = getDefaultInstance().getCacheableCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @param value The bytes for cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cacheableCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ChannelMessageList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ChannelMessageList) + private static final com.heroiclabs.nakama.api.ChannelMessageList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ChannelMessageList(); + } + + public static com.heroiclabs.nakama.api.ChannelMessageList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelMessageList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessageList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ChannelMessageListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ChannelMessageListOrBuilder.java new file mode 100644 index 00000000..9c9270c0 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ChannelMessageListOrBuilder.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ChannelMessageListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ChannelMessageList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + java.util.List + getMessagesList(); + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + com.heroiclabs.nakama.api.ChannelMessage getMessages(int index); + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + int getMessagesCount(); + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + java.util.List + getMessagesOrBuilderList(); + /** + *
+   * A list of messages.
+   * 
+ * + * repeated .nakama.api.ChannelMessage messages = 1 [json_name = "messages"]; + */ + com.heroiclabs.nakama.api.ChannelMessageOrBuilder getMessagesOrBuilder( + int index); + + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + java.lang.String getNextCursor(); + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + com.google.protobuf.ByteString + getNextCursorBytes(); + + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + java.lang.String getPrevCursor(); + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + com.google.protobuf.ByteString + getPrevCursorBytes(); + + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + java.lang.String getCacheableCursor(); + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + com.google.protobuf.ByteString + getCacheableCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ChannelMessageOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ChannelMessageOrBuilder.java new file mode 100644 index 00000000..d4063c5d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ChannelMessageOrBuilder.java @@ -0,0 +1,299 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ChannelMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ChannelMessage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel this message belongs to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The channel this message belongs to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * The unique ID of this message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + java.lang.String getMessageId(); + /** + *
+   * The unique ID of this message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString + getMessageIdBytes(); + + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return Whether the code field is set. + */ + boolean hasCode(); + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return The code. + */ + com.google.protobuf.Int32Value getCode(); + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + com.google.protobuf.Int32ValueOrBuilder getCodeOrBuilder(); + + /** + *
+   * Message sender, usually a user ID.
+   * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @return The senderId. + */ + java.lang.String getSenderId(); + /** + *
+   * Message sender, usually a user ID.
+   * 
+ * + * string sender_id = 4 [json_name = "senderId"]; + * @return The bytes for senderId. + */ + com.google.protobuf.ByteString + getSenderIdBytes(); + + /** + *
+   * The username of the message sender, if any.
+   * 
+ * + * string username = 5 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * The username of the message sender, if any.
+   * 
+ * + * string username = 5 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + *
+   * The content payload.
+   * 
+ * + * string content = 6 [json_name = "content"]; + * @return The content. + */ + java.lang.String getContent(); + /** + *
+   * The content payload.
+   * 
+ * + * string content = 6 [json_name = "content"]; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + * @return Whether the persistent field is set. + */ + boolean hasPersistent(); + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + * @return The persistent. + */ + com.google.protobuf.BoolValue getPersistent(); + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 9 [json_name = "persistent"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistentOrBuilder(); + + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @return The roomName. + */ + java.lang.String getRoomName(); + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 10 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + com.google.protobuf.ByteString + getRoomNameBytes(); + + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 11 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + java.lang.String getUserIdOne(); + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 12 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + com.google.protobuf.ByteString + getUserIdOneBytes(); + + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + java.lang.String getUserIdTwo(); + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 13 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + com.google.protobuf.ByteString + getUserIdTwoBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/CreateGroupRequest.java b/src/main/java/com/heroiclabs/nakama/api/CreateGroupRequest.java new file mode 100644 index 00000000..dce354c6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/CreateGroupRequest.java @@ -0,0 +1,1194 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Create a group with the current user as owner.
+ * 
+ * + * Protobuf type {@code nakama.api.CreateGroupRequest} + */ +public final class CreateGroupRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.CreateGroupRequest) + CreateGroupRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + CreateGroupRequest.class.getName()); + } + // Use CreateGroupRequest.newBuilder() to construct. + private CreateGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private CreateGroupRequest() { + name_ = ""; + description_ = ""; + langTag_ = ""; + avatarUrl_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_CreateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_CreateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.CreateGroupRequest.class, com.heroiclabs.nakama.api.CreateGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * A unique name for the group.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * A unique name for the group.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANG_TAG_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object langTag_ = ""; + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @return The langTag. + */ + @java.lang.Override + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } + } + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATAR_URL_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarUrl_ = ""; + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + @java.lang.Override + public java.lang.String getAvatarUrl() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarUrl_ = s; + return s; + } + } + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarUrlBytes() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPEN_FIELD_NUMBER = 5; + private boolean open_ = false; + /** + *
+   * Mark a group as open or not where only admins can accept members.
+   * 
+ * + * bool open = 5 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public boolean getOpen() { + return open_; + } + + public static final int MAX_COUNT_FIELD_NUMBER = 6; + private int maxCount_ = 0; + /** + *
+   * Maximum number of group members.
+   * 
+ * + * int32 max_count = 6 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, langTag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(avatarUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, avatarUrl_); + } + if (open_ != false) { + output.writeBool(5, open_); + } + if (maxCount_ != 0) { + output.writeInt32(6, maxCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, langTag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(avatarUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, avatarUrl_); + } + if (open_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, open_); + } + if (maxCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, maxCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.CreateGroupRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.CreateGroupRequest other = (com.heroiclabs.nakama.api.CreateGroupRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getLangTag() + .equals(other.getLangTag())) return false; + if (!getAvatarUrl() + .equals(other.getAvatarUrl())) return false; + if (getOpen() + != other.getOpen()) return false; + if (getMaxCount() + != other.getMaxCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + LANG_TAG_FIELD_NUMBER; + hash = (53 * hash) + getLangTag().hashCode(); + hash = (37 * hash) + AVATAR_URL_FIELD_NUMBER; + hash = (53 * hash) + getAvatarUrl().hashCode(); + hash = (37 * hash) + OPEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOpen()); + hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.CreateGroupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.CreateGroupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.CreateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.CreateGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Create a group with the current user as owner.
+   * 
+ * + * Protobuf type {@code nakama.api.CreateGroupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.CreateGroupRequest) + com.heroiclabs.nakama.api.CreateGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_CreateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_CreateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.CreateGroupRequest.class, com.heroiclabs.nakama.api.CreateGroupRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.CreateGroupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + langTag_ = ""; + avatarUrl_ = ""; + open_ = false; + maxCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_CreateGroupRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.CreateGroupRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.CreateGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.CreateGroupRequest build() { + com.heroiclabs.nakama.api.CreateGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.CreateGroupRequest buildPartial() { + com.heroiclabs.nakama.api.CreateGroupRequest result = new com.heroiclabs.nakama.api.CreateGroupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.CreateGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.langTag_ = langTag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.avatarUrl_ = avatarUrl_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.open_ = open_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.maxCount_ = maxCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.CreateGroupRequest) { + return mergeFrom((com.heroiclabs.nakama.api.CreateGroupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.CreateGroupRequest other) { + if (other == com.heroiclabs.nakama.api.CreateGroupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLangTag().isEmpty()) { + langTag_ = other.langTag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAvatarUrl().isEmpty()) { + avatarUrl_ = other.avatarUrl_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getOpen() != false) { + setOpen(other.getOpen()); + } + if (other.getMaxCount() != 0) { + setMaxCount(other.getMaxCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + langTag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + avatarUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + open_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + maxCount_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * A unique name for the group.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A unique name for the group.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A unique name for the group.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * A unique name for the group.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A unique name for the group.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object langTag_ = ""; + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @return The langTag. + */ + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @param value The langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTag( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + langTag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @return This builder for chaining. + */ + public Builder clearLangTag() { + langTag_ = getDefaultInstance().getLangTag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @param value The bytes for langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + langTag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object avatarUrl_ = ""; + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + public java.lang.String getAvatarUrl() { + java.lang.Object ref = avatarUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + public com.google.protobuf.ByteString + getAvatarUrlBytes() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @param value The avatarUrl to set. + * @return This builder for chaining. + */ + public Builder setAvatarUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return This builder for chaining. + */ + public Builder clearAvatarUrl() { + avatarUrl_ = getDefaultInstance().getAvatarUrl(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @param value The bytes for avatarUrl to set. + * @return This builder for chaining. + */ + public Builder setAvatarUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean open_ ; + /** + *
+     * Mark a group as open or not where only admins can accept members.
+     * 
+ * + * bool open = 5 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public boolean getOpen() { + return open_; + } + /** + *
+     * Mark a group as open or not where only admins can accept members.
+     * 
+ * + * bool open = 5 [json_name = "open"]; + * @param value The open to set. + * @return This builder for chaining. + */ + public Builder setOpen(boolean value) { + + open_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Mark a group as open or not where only admins can accept members.
+     * 
+ * + * bool open = 5 [json_name = "open"]; + * @return This builder for chaining. + */ + public Builder clearOpen() { + bitField0_ = (bitField0_ & ~0x00000010); + open_ = false; + onChanged(); + return this; + } + + private int maxCount_ ; + /** + *
+     * Maximum number of group members.
+     * 
+ * + * int32 max_count = 6 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + /** + *
+     * Maximum number of group members.
+     * 
+ * + * int32 max_count = 6 [json_name = "maxCount"]; + * @param value The maxCount to set. + * @return This builder for chaining. + */ + public Builder setMaxCount(int value) { + + maxCount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Maximum number of group members.
+     * 
+ * + * int32 max_count = 6 [json_name = "maxCount"]; + * @return This builder for chaining. + */ + public Builder clearMaxCount() { + bitField0_ = (bitField0_ & ~0x00000020); + maxCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.CreateGroupRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.CreateGroupRequest) + private static final com.heroiclabs.nakama.api.CreateGroupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.CreateGroupRequest(); + } + + public static com.heroiclabs.nakama.api.CreateGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.CreateGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/CreateGroupRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/CreateGroupRequestOrBuilder.java new file mode 100644 index 00000000..df55129a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/CreateGroupRequestOrBuilder.java @@ -0,0 +1,111 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface CreateGroupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.CreateGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A unique name for the group.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * A unique name for the group.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @return The langTag. + */ + java.lang.String getLangTag(); + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 3 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + com.google.protobuf.ByteString + getLangTagBytes(); + + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + java.lang.String getAvatarUrl(); + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + com.google.protobuf.ByteString + getAvatarUrlBytes(); + + /** + *
+   * Mark a group as open or not where only admins can accept members.
+   * 
+ * + * bool open = 5 [json_name = "open"]; + * @return The open. + */ + boolean getOpen(); + + /** + *
+   * Maximum number of group members.
+   * 
+ * + * int32 max_count = 6 [json_name = "maxCount"]; + * @return The maxCount. + */ + int getMaxCount(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequest.java b/src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequest.java new file mode 100644 index 00000000..6fc89e3b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Delete one or more friends for the current user.
+ * 
+ * + * Protobuf type {@code nakama.api.DeleteFriendsRequest} + */ +public final class DeleteFriendsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DeleteFriendsRequest) + DeleteFriendsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteFriendsRequest.class.getName()); + } + // Use DeleteFriendsRequest.newBuilder() to construct. + private DeleteFriendsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteFriendsRequest() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteFriendsRequest.class, com.heroiclabs.nakama.api.DeleteFriendsRequest.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + return ids_; + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + + public static final int USERNAMES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + return usernames_; + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < ids_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i)); + } + for (int i = 0; i < usernames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, usernames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ids_.size(); i++) { + dataSize += computeStringSizeNoTag(ids_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < usernames_.size(); i++) { + dataSize += computeStringSizeNoTag(usernames_.getRaw(i)); + } + size += dataSize; + size += 1 * getUsernamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DeleteFriendsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DeleteFriendsRequest other = (com.heroiclabs.nakama.api.DeleteFriendsRequest) obj; + + if (!getIdsList() + .equals(other.getIdsList())) return false; + if (!getUsernamesList() + .equals(other.getUsernamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getUsernamesCount() > 0) { + hash = (37 * hash) + USERNAMES_FIELD_NUMBER; + hash = (53 * hash) + getUsernamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DeleteFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Delete one or more friends for the current user.
+   * 
+ * + * Protobuf type {@code nakama.api.DeleteFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DeleteFriendsRequest) + com.heroiclabs.nakama.api.DeleteFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteFriendsRequest.class, com.heroiclabs.nakama.api.DeleteFriendsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DeleteFriendsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteFriendsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteFriendsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DeleteFriendsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteFriendsRequest build() { + com.heroiclabs.nakama.api.DeleteFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteFriendsRequest buildPartial() { + com.heroiclabs.nakama.api.DeleteFriendsRequest result = new com.heroiclabs.nakama.api.DeleteFriendsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.DeleteFriendsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + usernames_.makeImmutable(); + result.usernames_ = usernames_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DeleteFriendsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.DeleteFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DeleteFriendsRequest other) { + if (other == com.heroiclabs.nakama.api.DeleteFriendsRequest.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ |= 0x00000001; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.usernames_.isEmpty()) { + if (usernames_.isEmpty()) { + usernames_ = other.usernames_; + bitField0_ |= 0x00000002; + } else { + ensureUsernamesIsMutable(); + usernames_.addAll(other.usernames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureIdsIsMutable(); + ids_.add(s); + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUsernamesIsMutable(); + usernames_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = new com.google.protobuf.LazyStringArrayList(ids_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds( + java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ids_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The bytes of the ids to add. + * @return This builder for chaining. + */ + public Builder addIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUsernamesIsMutable() { + if (!usernames_.isModifiable()) { + usernames_ = new com.google.protobuf.LazyStringArrayList(usernames_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + usernames_.makeImmutable(); + return usernames_; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index to set the value at. + * @param value The usernames to set. + * @return This builder for chaining. + */ + public Builder setUsernames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param values The usernames to add. + * @return This builder for chaining. + */ + public Builder addAllUsernames( + java.lang.Iterable values) { + ensureUsernamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, usernames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return This builder for chaining. + */ + public Builder clearUsernames() { + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The bytes of the usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DeleteFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DeleteFriendsRequest) + private static final com.heroiclabs.nakama.api.DeleteFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DeleteFriendsRequest(); + } + + public static com.heroiclabs.nakama.api.DeleteFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequestOrBuilder.java new file mode 100644 index 00000000..71bdc9c9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteFriendsRequestOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DeleteFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DeleteFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + java.util.List + getIdsList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + int getIdsCount(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + java.lang.String getIds(int index); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + com.google.protobuf.ByteString + getIdsBytes(int index); + + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + java.util.List + getUsernamesList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + int getUsernamesCount(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + java.lang.String getUsernames(int index); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + com.google.protobuf.ByteString + getUsernamesBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequest.java b/src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequest.java new file mode 100644 index 00000000..9b1ee8f0 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Delete a group the user has access to.
+ * 
+ * + * Protobuf type {@code nakama.api.DeleteGroupRequest} + */ +public final class DeleteGroupRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DeleteGroupRequest) + DeleteGroupRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteGroupRequest.class.getName()); + } + // Use DeleteGroupRequest.newBuilder() to construct. + private DeleteGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteGroupRequest() { + groupId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteGroupRequest.class, com.heroiclabs.nakama.api.DeleteGroupRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The id of a group.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The id of a group.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DeleteGroupRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DeleteGroupRequest other = (com.heroiclabs.nakama.api.DeleteGroupRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DeleteGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Delete a group the user has access to.
+   * 
+ * + * Protobuf type {@code nakama.api.DeleteGroupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DeleteGroupRequest) + com.heroiclabs.nakama.api.DeleteGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteGroupRequest.class, com.heroiclabs.nakama.api.DeleteGroupRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DeleteGroupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteGroupRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteGroupRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DeleteGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteGroupRequest build() { + com.heroiclabs.nakama.api.DeleteGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteGroupRequest buildPartial() { + com.heroiclabs.nakama.api.DeleteGroupRequest result = new com.heroiclabs.nakama.api.DeleteGroupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.DeleteGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DeleteGroupRequest) { + return mergeFrom((com.heroiclabs.nakama.api.DeleteGroupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DeleteGroupRequest other) { + if (other == com.heroiclabs.nakama.api.DeleteGroupRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The id of a group.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The id of a group.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The id of a group.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The id of a group.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The id of a group.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DeleteGroupRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DeleteGroupRequest) + private static final com.heroiclabs.nakama.api.DeleteGroupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DeleteGroupRequest(); + } + + public static com.heroiclabs.nakama.api.DeleteGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequestOrBuilder.java new file mode 100644 index 00000000..3661b9bf --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteGroupRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DeleteGroupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DeleteGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The id of a group.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The id of a group.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequest.java b/src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequest.java new file mode 100644 index 00000000..0eabd457 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Delete a leaderboard record.
+ * 
+ * + * Protobuf type {@code nakama.api.DeleteLeaderboardRecordRequest} + */ +public final class DeleteLeaderboardRecordRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DeleteLeaderboardRecordRequest) + DeleteLeaderboardRecordRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteLeaderboardRecordRequest.class.getName()); + } + // Use DeleteLeaderboardRecordRequest.newBuilder() to construct. + private DeleteLeaderboardRecordRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteLeaderboardRecordRequest() { + leaderboardId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteLeaderboardRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteLeaderboardRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.class, com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.Builder.class); + } + + public static final int LEADERBOARD_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object leaderboardId_ = ""; + /** + *
+   * The leaderboard ID to delete from.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + @java.lang.Override + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } + } + /** + *
+   * The leaderboard ID to delete from.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, leaderboardId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, leaderboardId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest other = (com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest) obj; + + if (!getLeaderboardId() + .equals(other.getLeaderboardId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEADERBOARD_ID_FIELD_NUMBER; + hash = (53 * hash) + getLeaderboardId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Delete a leaderboard record.
+   * 
+ * + * Protobuf type {@code nakama.api.DeleteLeaderboardRecordRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DeleteLeaderboardRecordRequest) + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteLeaderboardRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteLeaderboardRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.class, com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + leaderboardId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteLeaderboardRecordRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest build() { + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest buildPartial() { + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest result = new com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.leaderboardId_ = leaderboardId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest) { + return mergeFrom((com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest other) { + if (other == com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.getDefaultInstance()) return this; + if (!other.getLeaderboardId().isEmpty()) { + leaderboardId_ = other.leaderboardId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + leaderboardId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object leaderboardId_ = ""; + /** + *
+     * The leaderboard ID to delete from.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The leaderboard ID to delete from.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The leaderboard ID to delete from.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The leaderboard ID to delete from.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return This builder for chaining. + */ + public Builder clearLeaderboardId() { + leaderboardId_ = getDefaultInstance().getLeaderboardId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The leaderboard ID to delete from.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The bytes for leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DeleteLeaderboardRecordRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DeleteLeaderboardRecordRequest) + private static final com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest(); + } + + public static com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteLeaderboardRecordRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequestOrBuilder.java new file mode 100644 index 00000000..3e62ef36 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteLeaderboardRecordRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DeleteLeaderboardRecordRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DeleteLeaderboardRecordRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The leaderboard ID to delete from.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + java.lang.String getLeaderboardId(); + /** + *
+   * The leaderboard ID to delete from.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + com.google.protobuf.ByteString + getLeaderboardIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequest.java b/src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequest.java new file mode 100644 index 00000000..b6371986 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequest.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Delete one or more notifications for the current user.
+ * 
+ * + * Protobuf type {@code nakama.api.DeleteNotificationsRequest} + */ +public final class DeleteNotificationsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DeleteNotificationsRequest) + DeleteNotificationsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteNotificationsRequest.class.getName()); + } + // Use DeleteNotificationsRequest.newBuilder() to construct. + private DeleteNotificationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteNotificationsRequest() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteNotificationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteNotificationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteNotificationsRequest.class, com.heroiclabs.nakama.api.DeleteNotificationsRequest.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + return ids_; + } + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < ids_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ids_.size(); i++) { + dataSize += computeStringSizeNoTag(ids_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DeleteNotificationsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DeleteNotificationsRequest other = (com.heroiclabs.nakama.api.DeleteNotificationsRequest) obj; + + if (!getIdsList() + .equals(other.getIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DeleteNotificationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Delete one or more notifications for the current user.
+   * 
+ * + * Protobuf type {@code nakama.api.DeleteNotificationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DeleteNotificationsRequest) + com.heroiclabs.nakama.api.DeleteNotificationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteNotificationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteNotificationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteNotificationsRequest.class, com.heroiclabs.nakama.api.DeleteNotificationsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DeleteNotificationsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteNotificationsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteNotificationsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DeleteNotificationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteNotificationsRequest build() { + com.heroiclabs.nakama.api.DeleteNotificationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteNotificationsRequest buildPartial() { + com.heroiclabs.nakama.api.DeleteNotificationsRequest result = new com.heroiclabs.nakama.api.DeleteNotificationsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.DeleteNotificationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DeleteNotificationsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.DeleteNotificationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DeleteNotificationsRequest other) { + if (other == com.heroiclabs.nakama.api.DeleteNotificationsRequest.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ |= 0x00000001; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureIdsIsMutable(); + ids_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = new com.google.protobuf.LazyStringArrayList(ids_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds( + java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ids_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * The id of notifications.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The bytes of the ids to add. + * @return This builder for chaining. + */ + public Builder addIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DeleteNotificationsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DeleteNotificationsRequest) + private static final com.heroiclabs.nakama.api.DeleteNotificationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DeleteNotificationsRequest(); + } + + public static com.heroiclabs.nakama.api.DeleteNotificationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNotificationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteNotificationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequestOrBuilder.java new file mode 100644 index 00000000..31d0b44f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteNotificationsRequestOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DeleteNotificationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DeleteNotificationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + java.util.List + getIdsList(); + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + int getIdsCount(); + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + java.lang.String getIds(int index); + /** + *
+   * The id of notifications.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + com.google.protobuf.ByteString + getIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectId.java b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectId.java new file mode 100644 index 00000000..a4000d81 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectId.java @@ -0,0 +1,865 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Storage objects to delete.
+ * 
+ * + * Protobuf type {@code nakama.api.DeleteStorageObjectId} + */ +public final class DeleteStorageObjectId extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DeleteStorageObjectId) + DeleteStorageObjectIdOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteStorageObjectId.class.getName()); + } + // Use DeleteStorageObjectId.newBuilder() to construct. + private DeleteStorageObjectId(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteStorageObjectId() { + collection_ = ""; + key_ = ""; + version_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteStorageObjectId.class, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder.class); + } + + public static final int COLLECTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, version_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, version_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DeleteStorageObjectId)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DeleteStorageObjectId other = (com.heroiclabs.nakama.api.DeleteStorageObjectId) obj; + + if (!getCollection() + .equals(other.getCollection())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DeleteStorageObjectId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Storage objects to delete.
+   * 
+ * + * Protobuf type {@code nakama.api.DeleteStorageObjectId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DeleteStorageObjectId) + com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteStorageObjectId.class, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DeleteStorageObjectId.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + collection_ = ""; + key_ = ""; + version_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectId_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectId getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DeleteStorageObjectId.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectId build() { + com.heroiclabs.nakama.api.DeleteStorageObjectId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectId buildPartial() { + com.heroiclabs.nakama.api.DeleteStorageObjectId result = new com.heroiclabs.nakama.api.DeleteStorageObjectId(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.DeleteStorageObjectId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.version_ = version_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DeleteStorageObjectId) { + return mergeFrom((com.heroiclabs.nakama.api.DeleteStorageObjectId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DeleteStorageObjectId other) { + if (other == com.heroiclabs.nakama.api.DeleteStorageObjectId.getDefaultInstance()) return this; + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object collection_ = ""; + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DeleteStorageObjectId) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DeleteStorageObjectId) + private static final com.heroiclabs.nakama.api.DeleteStorageObjectId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DeleteStorageObjectId(); + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteStorageObjectId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectIdOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectIdOrBuilder.java new file mode 100644 index 00000000..2dcec22b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectIdOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DeleteStorageObjectIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DeleteStorageObjectId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + java.lang.String getCollection(); + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequest.java b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequest.java new file mode 100644 index 00000000..3c45b768 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequest.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Batch delete storage objects.
+ * 
+ * + * Protobuf type {@code nakama.api.DeleteStorageObjectsRequest} + */ +public final class DeleteStorageObjectsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DeleteStorageObjectsRequest) + DeleteStorageObjectsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteStorageObjectsRequest.class.getName()); + } + // Use DeleteStorageObjectsRequest.newBuilder() to construct. + private DeleteStorageObjectsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteStorageObjectsRequest() { + objectIds_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.class, com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.Builder.class); + } + + public static final int OBJECT_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List objectIds_; + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public java.util.List getObjectIdsList() { + return objectIds_; + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public java.util.List + getObjectIdsOrBuilderList() { + return objectIds_; + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public int getObjectIdsCount() { + return objectIds_.size(); + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectId getObjectIds(int index) { + return objectIds_.get(index); + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder getObjectIdsOrBuilder( + int index) { + return objectIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < objectIds_.size(); i++) { + output.writeMessage(1, objectIds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < objectIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, objectIds_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DeleteStorageObjectsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest other = (com.heroiclabs.nakama.api.DeleteStorageObjectsRequest) obj; + + if (!getObjectIdsList() + .equals(other.getObjectIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getObjectIdsCount() > 0) { + hash = (37 * hash) + OBJECT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getObjectIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DeleteStorageObjectsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Batch delete storage objects.
+   * 
+ * + * Protobuf type {@code nakama.api.DeleteStorageObjectsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DeleteStorageObjectsRequest) + com.heroiclabs.nakama.api.DeleteStorageObjectsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.class, com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (objectIdsBuilder_ == null) { + objectIds_ = java.util.Collections.emptyList(); + } else { + objectIds_ = null; + objectIdsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteStorageObjectsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectsRequest build() { + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectsRequest buildPartial() { + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest result = new com.heroiclabs.nakama.api.DeleteStorageObjectsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.DeleteStorageObjectsRequest result) { + if (objectIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + objectIds_ = java.util.Collections.unmodifiableList(objectIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objectIds_ = objectIds_; + } else { + result.objectIds_ = objectIdsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.DeleteStorageObjectsRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DeleteStorageObjectsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.DeleteStorageObjectsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DeleteStorageObjectsRequest other) { + if (other == com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.getDefaultInstance()) return this; + if (objectIdsBuilder_ == null) { + if (!other.objectIds_.isEmpty()) { + if (objectIds_.isEmpty()) { + objectIds_ = other.objectIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectIdsIsMutable(); + objectIds_.addAll(other.objectIds_); + } + onChanged(); + } + } else { + if (!other.objectIds_.isEmpty()) { + if (objectIdsBuilder_.isEmpty()) { + objectIdsBuilder_.dispose(); + objectIdsBuilder_ = null; + objectIds_ = other.objectIds_; + bitField0_ = (bitField0_ & ~0x00000001); + objectIdsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getObjectIdsFieldBuilder() : null; + } else { + objectIdsBuilder_.addAllMessages(other.objectIds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.DeleteStorageObjectId m = + input.readMessage( + com.heroiclabs.nakama.api.DeleteStorageObjectId.parser(), + extensionRegistry); + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.add(m); + } else { + objectIdsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List objectIds_ = + java.util.Collections.emptyList(); + private void ensureObjectIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objectIds_ = new java.util.ArrayList(objectIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.DeleteStorageObjectId, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder, com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder> objectIdsBuilder_; + + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public java.util.List getObjectIdsList() { + if (objectIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectIds_); + } else { + return objectIdsBuilder_.getMessageList(); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public int getObjectIdsCount() { + if (objectIdsBuilder_ == null) { + return objectIds_.size(); + } else { + return objectIdsBuilder_.getCount(); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.DeleteStorageObjectId getObjectIds(int index) { + if (objectIdsBuilder_ == null) { + return objectIds_.get(index); + } else { + return objectIdsBuilder_.getMessage(index); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder setObjectIds( + int index, com.heroiclabs.nakama.api.DeleteStorageObjectId value) { + if (objectIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectIdsIsMutable(); + objectIds_.set(index, value); + onChanged(); + } else { + objectIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder setObjectIds( + int index, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.set(index, builderForValue.build()); + onChanged(); + } else { + objectIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds(com.heroiclabs.nakama.api.DeleteStorageObjectId value) { + if (objectIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectIdsIsMutable(); + objectIds_.add(value); + onChanged(); + } else { + objectIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds( + int index, com.heroiclabs.nakama.api.DeleteStorageObjectId value) { + if (objectIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectIdsIsMutable(); + objectIds_.add(index, value); + onChanged(); + } else { + objectIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds( + com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.add(builderForValue.build()); + onChanged(); + } else { + objectIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds( + int index, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder builderForValue) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.add(index, builderForValue.build()); + onChanged(); + } else { + objectIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addAllObjectIds( + java.lang.Iterable values) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectIds_); + onChanged(); + } else { + objectIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder clearObjectIds() { + if (objectIdsBuilder_ == null) { + objectIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + objectIdsBuilder_.clear(); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder removeObjectIds(int index) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.remove(index); + onChanged(); + } else { + objectIdsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder getObjectIdsBuilder( + int index) { + return getObjectIdsFieldBuilder().getBuilder(index); + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder getObjectIdsOrBuilder( + int index) { + if (objectIdsBuilder_ == null) { + return objectIds_.get(index); } else { + return objectIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public java.util.List + getObjectIdsOrBuilderList() { + if (objectIdsBuilder_ != null) { + return objectIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectIds_); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder addObjectIdsBuilder() { + return getObjectIdsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.DeleteStorageObjectId.getDefaultInstance()); + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder addObjectIdsBuilder( + int index) { + return getObjectIdsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.DeleteStorageObjectId.getDefaultInstance()); + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public java.util.List + getObjectIdsBuilderList() { + return getObjectIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.DeleteStorageObjectId, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder, com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder> + getObjectIdsFieldBuilder() { + if (objectIdsBuilder_ == null) { + objectIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.DeleteStorageObjectId, com.heroiclabs.nakama.api.DeleteStorageObjectId.Builder, com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder>( + objectIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + objectIds_ = null; + } + return objectIdsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DeleteStorageObjectsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DeleteStorageObjectsRequest) + private static final com.heroiclabs.nakama.api.DeleteStorageObjectsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DeleteStorageObjectsRequest(); + } + + public static com.heroiclabs.nakama.api.DeleteStorageObjectsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteStorageObjectsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteStorageObjectsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequestOrBuilder.java new file mode 100644 index 00000000..a8860e54 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteStorageObjectsRequestOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DeleteStorageObjectsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DeleteStorageObjectsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + java.util.List + getObjectIdsList(); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + com.heroiclabs.nakama.api.DeleteStorageObjectId getObjectIds(int index); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + int getObjectIdsCount(); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + java.util.List + getObjectIdsOrBuilderList(); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.DeleteStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + com.heroiclabs.nakama.api.DeleteStorageObjectIdOrBuilder getObjectIdsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequest.java b/src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequest.java new file mode 100644 index 00000000..ecf8b60d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Delete a leaderboard record.
+ * 
+ * + * Protobuf type {@code nakama.api.DeleteTournamentRecordRequest} + */ +public final class DeleteTournamentRecordRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DeleteTournamentRecordRequest) + DeleteTournamentRecordRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteTournamentRecordRequest.class.getName()); + } + // Use DeleteTournamentRecordRequest.newBuilder() to construct. + private DeleteTournamentRecordRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteTournamentRecordRequest() { + tournamentId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteTournamentRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteTournamentRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.class, com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.Builder.class); + } + + public static final int TOURNAMENT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object tournamentId_ = ""; + /** + *
+   * The tournament ID to delete from.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + @java.lang.Override + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } + } + /** + *
+   * The tournament ID to delete from.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tournamentId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tournamentId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DeleteTournamentRecordRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest other = (com.heroiclabs.nakama.api.DeleteTournamentRecordRequest) obj; + + if (!getTournamentId() + .equals(other.getTournamentId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOURNAMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTournamentId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DeleteTournamentRecordRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Delete a leaderboard record.
+   * 
+ * + * Protobuf type {@code nakama.api.DeleteTournamentRecordRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DeleteTournamentRecordRequest) + com.heroiclabs.nakama.api.DeleteTournamentRecordRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteTournamentRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteTournamentRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.class, com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tournamentId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DeleteTournamentRecordRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteTournamentRecordRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteTournamentRecordRequest build() { + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteTournamentRecordRequest buildPartial() { + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest result = new com.heroiclabs.nakama.api.DeleteTournamentRecordRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.DeleteTournamentRecordRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tournamentId_ = tournamentId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DeleteTournamentRecordRequest) { + return mergeFrom((com.heroiclabs.nakama.api.DeleteTournamentRecordRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DeleteTournamentRecordRequest other) { + if (other == com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.getDefaultInstance()) return this; + if (!other.getTournamentId().isEmpty()) { + tournamentId_ = other.tournamentId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tournamentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object tournamentId_ = ""; + /** + *
+     * The tournament ID to delete from.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The tournament ID to delete from.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The tournament ID to delete from.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The tournament ID to delete from.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return This builder for chaining. + */ + public Builder clearTournamentId() { + tournamentId_ = getDefaultInstance().getTournamentId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The tournament ID to delete from.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The bytes for tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DeleteTournamentRecordRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DeleteTournamentRecordRequest) + private static final com.heroiclabs.nakama.api.DeleteTournamentRecordRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DeleteTournamentRecordRequest(); + } + + public static com.heroiclabs.nakama.api.DeleteTournamentRecordRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTournamentRecordRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DeleteTournamentRecordRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequestOrBuilder.java new file mode 100644 index 00000000..061ec54e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DeleteTournamentRecordRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DeleteTournamentRecordRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DeleteTournamentRecordRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The tournament ID to delete from.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + java.lang.String getTournamentId(); + /** + *
+   * The tournament ID to delete from.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + com.google.protobuf.ByteString + getTournamentIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequest.java b/src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequest.java new file mode 100644 index 00000000..0e2103e9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Demote a set of users in a group to the next role down.
+ * 
+ * + * Protobuf type {@code nakama.api.DemoteGroupUsersRequest} + */ +public final class DemoteGroupUsersRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.DemoteGroupUsersRequest) + DemoteGroupUsersRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DemoteGroupUsersRequest.class.getName()); + } + // Use DemoteGroupUsersRequest.newBuilder() to construct. + private DemoteGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DemoteGroupUsersRequest() { + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DemoteGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DemoteGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DemoteGroupUsersRequest.class, com.heroiclabs.nakama.api.DemoteGroupUsersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group ID to demote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group ID to demote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + return userIds_; + } + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + for (int i = 0; i < userIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, userIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < userIds_.size(); i++) { + dataSize += computeStringSizeNoTag(userIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.DemoteGroupUsersRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.DemoteGroupUsersRequest other = (com.heroiclabs.nakama.api.DemoteGroupUsersRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdsList() + .equals(other.getUserIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getUserIdsCount() > 0) { + hash = (37 * hash) + USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUserIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.DemoteGroupUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Demote a set of users in a group to the next role down.
+   * 
+ * + * Protobuf type {@code nakama.api.DemoteGroupUsersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.DemoteGroupUsersRequest) + com.heroiclabs.nakama.api.DemoteGroupUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DemoteGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DemoteGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.DemoteGroupUsersRequest.class, com.heroiclabs.nakama.api.DemoteGroupUsersRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.DemoteGroupUsersRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_DemoteGroupUsersRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DemoteGroupUsersRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.DemoteGroupUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DemoteGroupUsersRequest build() { + com.heroiclabs.nakama.api.DemoteGroupUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DemoteGroupUsersRequest buildPartial() { + com.heroiclabs.nakama.api.DemoteGroupUsersRequest result = new com.heroiclabs.nakama.api.DemoteGroupUsersRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.DemoteGroupUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + userIds_.makeImmutable(); + result.userIds_ = userIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.DemoteGroupUsersRequest) { + return mergeFrom((com.heroiclabs.nakama.api.DemoteGroupUsersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.DemoteGroupUsersRequest other) { + if (other == com.heroiclabs.nakama.api.DemoteGroupUsersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.userIds_.isEmpty()) { + if (userIds_.isEmpty()) { + userIds_ = other.userIds_; + bitField0_ |= 0x00000002; + } else { + ensureUserIdsIsMutable(); + userIds_.addAll(other.userIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserIdsIsMutable(); + userIds_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group ID to demote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group ID to demote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group ID to demote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group ID to demote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group ID to demote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUserIdsIsMutable() { + if (!userIds_.isModifiable()) { + userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + userIds_.makeImmutable(); + return userIds_; + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index to set the value at. + * @param value The userIds to set. + * @return This builder for chaining. + */ + public Builder setUserIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param values The userIds to add. + * @return This builder for chaining. + */ + public Builder addAllUserIds( + java.lang.Iterable values) { + ensureUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return This builder for chaining. + */ + public Builder clearUserIds() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The users to demote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The bytes of the userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.DemoteGroupUsersRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.DemoteGroupUsersRequest) + private static final com.heroiclabs.nakama.api.DemoteGroupUsersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.DemoteGroupUsersRequest(); + } + + public static com.heroiclabs.nakama.api.DemoteGroupUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DemoteGroupUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.DemoteGroupUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequestOrBuilder.java new file mode 100644 index 00000000..fb7f0cdd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/DemoteGroupUsersRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface DemoteGroupUsersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.DemoteGroupUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group ID to demote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group ID to demote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + java.util.List + getUserIdsList(); + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + int getUserIdsCount(); + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + java.lang.String getUserIds(int index); + /** + *
+   * The users to demote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + com.google.protobuf.ByteString + getUserIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Event.java b/src/main/java/com/heroiclabs/nakama/api/Event.java new file mode 100644 index 00000000..b8190727 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Event.java @@ -0,0 +1,1184 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Represents an event to be passed through the server to registered event handlers.
+ * 
+ * + * Protobuf type {@code nakama.api.Event} + */ +public final class Event extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Event) + EventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Event.class.getName()); + } + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Event() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Event_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Event.class, com.heroiclabs.nakama.api.Event.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * An event name, type, category, or identifier.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * An event name, type, category, or identifier.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTIES_FIELD_NUMBER = 2; + private static final class PropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Event_PropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> properties_; + private com.google.protobuf.MapField + internalGetProperties() { + if (properties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PropertiesDefaultEntryHolder.defaultEntry); + } + return properties_; + } + public int getPropertiesCount() { + return internalGetProperties().getMap().size(); + } + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public boolean containsProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetProperties().getMap().containsKey(key); + } + /** + * Use {@link #getPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getProperties() { + return getPropertiesMap(); + } + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public java.util.Map getPropertiesMap() { + return internalGetProperties().getMap(); + } + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public java.lang.String getPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp timestamp_; + /** + *
+   * The time when the event was triggered.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The time when the event was triggered.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + *
+   * The time when the event was triggered.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + public static final int EXTERNAL_FIELD_NUMBER = 4; + private boolean external_ = false; + /** + *
+   * True if the event came directly from a client call, false otherwise.
+   * 
+ * + * bool external = 4 [json_name = "external"]; + * @return The external. + */ + @java.lang.Override + public boolean getExternal() { + return external_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetProperties(), + PropertiesDefaultEntryHolder.defaultEntry, + 2); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTimestamp()); + } + if (external_ != false) { + output.writeBool(4, external_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, properties__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTimestamp()); + } + if (external_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, external_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Event)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Event other = (com.heroiclabs.nakama.api.Event) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetProperties().equals( + other.internalGetProperties())) return false; + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp() + .equals(other.getTimestamp())) return false; + } + if (getExternal() + != other.getExternal()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetProperties().getMap().isEmpty()) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetProperties().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (37 * hash) + EXTERNAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExternal()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Event parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Event parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Event parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Event parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Event parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Event parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents an event to be passed through the server to registered event handlers.
+   * 
+ * + * Protobuf type {@code nakama.api.Event} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Event) + com.heroiclabs.nakama.api.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Event_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Event.class, com.heroiclabs.nakama.api.Event.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getTimestampFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + internalGetMutableProperties().clear(); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + external_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Event_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Event getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Event.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Event build() { + com.heroiclabs.nakama.api.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Event buildPartial() { + com.heroiclabs.nakama.api.Event result = new com.heroiclabs.nakama.api.Event(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Event result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.properties_ = internalGetProperties(); + result.properties_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timestamp_ = timestampBuilder_ == null + ? timestamp_ + : timestampBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.external_ = external_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Event) { + return mergeFrom((com.heroiclabs.nakama.api.Event)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Event other) { + if (other == com.heroiclabs.nakama.api.Event.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableProperties().mergeFrom( + other.internalGetProperties()); + bitField0_ |= 0x00000002; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.getExternal() != false) { + setExternal(other.getExternal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + properties__ = input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableProperties().getMutableMap().put( + properties__.getKey(), properties__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getTimestampFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + external_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * An event name, type, category, or identifier.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An event name, type, category, or identifier.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An event name, type, category, or identifier.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * An event name, type, category, or identifier.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * An event name, type, category, or identifier.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> properties_; + private com.google.protobuf.MapField + internalGetProperties() { + if (properties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PropertiesDefaultEntryHolder.defaultEntry); + } + return properties_; + } + private com.google.protobuf.MapField + internalGetMutableProperties() { + if (properties_ == null) { + properties_ = com.google.protobuf.MapField.newMapField( + PropertiesDefaultEntryHolder.defaultEntry); + } + if (!properties_.isMutable()) { + properties_ = properties_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return properties_; + } + public int getPropertiesCount() { + return internalGetProperties().getMap().size(); + } + /** + *
+     * Arbitrary event property values.
+     * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public boolean containsProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetProperties().getMap().containsKey(key); + } + /** + * Use {@link #getPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getProperties() { + return getPropertiesMap(); + } + /** + *
+     * Arbitrary event property values.
+     * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public java.util.Map getPropertiesMap() { + return internalGetProperties().getMap(); + } + /** + *
+     * Arbitrary event property values.
+     * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Arbitrary event property values.
+     * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + @java.lang.Override + public java.lang.String getPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Arbitrary event property values.
+     * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + public Builder removeProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableProperties() { + bitField0_ |= 0x00000002; + return internalGetMutableProperties().getMutableMap(); + } + /** + *
+     * Arbitrary event property values.
+     * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + public Builder putProperties( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableProperties().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Arbitrary event property values.
+     * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + public Builder putAllProperties( + java.util.Map values) { + internalGetMutableProperties().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + timestamp_ != null && + timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + if (timestamp_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000004); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + *
+     * The time when the event was triggered.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), + getParentForChildren(), + isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private boolean external_ ; + /** + *
+     * True if the event came directly from a client call, false otherwise.
+     * 
+ * + * bool external = 4 [json_name = "external"]; + * @return The external. + */ + @java.lang.Override + public boolean getExternal() { + return external_; + } + /** + *
+     * True if the event came directly from a client call, false otherwise.
+     * 
+ * + * bool external = 4 [json_name = "external"]; + * @param value The external to set. + * @return This builder for chaining. + */ + public Builder setExternal(boolean value) { + + external_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * True if the event came directly from a client call, false otherwise.
+     * 
+ * + * bool external = 4 [json_name = "external"]; + * @return This builder for chaining. + */ + public Builder clearExternal() { + bitField0_ = (bitField0_ & ~0x00000008); + external_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Event) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Event) + private static final com.heroiclabs.nakama.api.Event DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Event(); + } + + public static com.heroiclabs.nakama.api.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/EventOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/EventOrBuilder.java new file mode 100644 index 00000000..2829d3be --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/EventOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface EventOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Event) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * An event name, type, category, or identifier.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * An event name, type, category, or identifier.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + int getPropertiesCount(); + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + boolean containsProperties( + java.lang.String key); + /** + * Use {@link #getPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getProperties(); + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + java.util.Map + getPropertiesMap(); + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + /* nullable */ +java.lang.String getPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Arbitrary event property values.
+   * 
+ * + * map<string, string> properties = 2 [json_name = "properties"]; + */ + java.lang.String getPropertiesOrThrow( + java.lang.String key); + + /** + *
+   * The time when the event was triggered.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + *
+   * The time when the event was triggered.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + *
+   * The time when the event was triggered.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp"]; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + *
+   * True if the event came directly from a client call, false otherwise.
+   * 
+ * + * bool external = 4 [json_name = "external"]; + * @return The external. + */ + boolean getExternal(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Friend.java b/src/main/java/com/heroiclabs/nakama/api/Friend.java new file mode 100644 index 00000000..c7c451f7 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Friend.java @@ -0,0 +1,1251 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A friend of a user.
+ * 
+ * + * Protobuf type {@code nakama.api.Friend} + */ +public final class Friend extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Friend) + FriendOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Friend.class.getName()); + } + // Use Friend.newBuilder() to construct. + private Friend(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Friend() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Friend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Friend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Friend.class, com.heroiclabs.nakama.api.Friend.Builder.class); + } + + /** + *
+   * The friendship status.
+   * 
+ * + * Protobuf enum {@code nakama.api.Friend.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The user is a friend of the current user.
+     * 
+ * + * FRIEND = 0; + */ + FRIEND(0), + /** + *
+     * The current user has sent an invite to the user.
+     * 
+ * + * INVITE_SENT = 1; + */ + INVITE_SENT(1), + /** + *
+     * The current user has received an invite from this user.
+     * 
+ * + * INVITE_RECEIVED = 2; + */ + INVITE_RECEIVED(2), + /** + *
+     * The current user has blocked this user.
+     * 
+ * + * BLOCKED = 3; + */ + BLOCKED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + State.class.getName()); + } + /** + *
+     * The user is a friend of the current user.
+     * 
+ * + * FRIEND = 0; + */ + public static final int FRIEND_VALUE = 0; + /** + *
+     * The current user has sent an invite to the user.
+     * 
+ * + * INVITE_SENT = 1; + */ + public static final int INVITE_SENT_VALUE = 1; + /** + *
+     * The current user has received an invite from this user.
+     * 
+ * + * INVITE_RECEIVED = 2; + */ + public static final int INVITE_RECEIVED_VALUE = 2; + /** + *
+     * The current user has blocked this user.
+     * 
+ * + * BLOCKED = 3; + */ + public static final int BLOCKED_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return FRIEND; + case 1: return INVITE_SENT; + case 2: return INVITE_RECEIVED; + case 3: return BLOCKED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.api.Friend.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.api.Friend.State) + } + + private int bitField0_; + public static final int USER_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.User user_; + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.User getUser() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + + public static final int STATE_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value state_; + /** + *
+   * The friend status.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + @java.lang.Override + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The friend status.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getState() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + /** + *
+   * The friend status.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Time of the latest relationship update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Time of the latest relationship update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Time of the latest relationship update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUser()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getState()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUser()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getState()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Friend)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Friend other = (com.heroiclabs.nakama.api.Friend) obj; + + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (hasState() != other.hasState()) return false; + if (hasState()) { + if (!getState() + .equals(other.getState())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Friend parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Friend parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Friend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Friend parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Friend parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Friend parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Friend parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Friend parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Friend parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Friend parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Friend parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Friend parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Friend prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A friend of a user.
+   * 
+ * + * Protobuf type {@code nakama.api.Friend} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Friend) + com.heroiclabs.nakama.api.FriendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Friend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Friend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Friend.class, com.heroiclabs.nakama.api.Friend.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Friend.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + getStateFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Friend_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Friend getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Friend.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Friend build() { + com.heroiclabs.nakama.api.Friend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Friend buildPartial() { + com.heroiclabs.nakama.api.Friend result = new com.heroiclabs.nakama.api.Friend(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Friend result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = stateBuilder_ == null + ? state_ + : stateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Friend) { + return mergeFrom((com.heroiclabs.nakama.api.Friend)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Friend other) { + if (other == com.heroiclabs.nakama.api.Friend.getDefaultInstance()) return this; + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.hasState()) { + mergeState(other.getState()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.User user_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> userBuilder_; + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + public com.heroiclabs.nakama.api.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder setUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder setUser( + com.heroiclabs.nakama.api.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder mergeUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + user_ != null && + user_ != com.heroiclabs.nakama.api.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000001); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.User.Builder getUserBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + } + /** + *
+     * The user object.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private com.google.protobuf.Int32Value state_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> stateBuilder_; + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + public com.google.protobuf.Int32Value getState() { + if (stateBuilder_ == null) { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } else { + return stateBuilder_.getMessage(); + } + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + } else { + stateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (stateBuilder_ == null) { + state_ = builderForValue.build(); + } else { + stateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder mergeState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + state_ != null && + state_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getStateBuilder().mergeFrom(value); + } else { + state_ = value; + } + } else { + stateBuilder_.mergeFrom(value); + } + if (state_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32Value.Builder getStateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStateFieldBuilder().getBuilder(); + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + if (stateBuilder_ != null) { + return stateBuilder_.getMessageOrBuilder(); + } else { + return state_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + } + /** + *
+     * The friend status.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getStateFieldBuilder() { + if (stateBuilder_ == null) { + stateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Time of the latest relationship update.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Friend) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Friend) + private static final com.heroiclabs.nakama.api.Friend DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Friend(); + } + + public static com.heroiclabs.nakama.api.Friend getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Friend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Friend getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/FriendList.java b/src/main/java/com/heroiclabs/nakama/api/FriendList.java new file mode 100644 index 00000000..13da9f2d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/FriendList.java @@ -0,0 +1,983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A collection of zero or more friends of the user.
+ * 
+ * + * Protobuf type {@code nakama.api.FriendList} + */ +public final class FriendList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.FriendList) + FriendListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + FriendList.class.getName()); + } + // Use FriendList.newBuilder() to construct. + private FriendList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FriendList() { + friends_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.FriendList.class, com.heroiclabs.nakama.api.FriendList.Builder.class); + } + + public static final int FRIENDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List friends_; + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + @java.lang.Override + public java.util.List getFriendsList() { + return friends_; + } + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + @java.lang.Override + public java.util.List + getFriendsOrBuilderList() { + return friends_; + } + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + @java.lang.Override + public int getFriendsCount() { + return friends_.size(); + } + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Friend getFriends(int index) { + return friends_.get(index); + } + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.FriendOrBuilder getFriendsOrBuilder( + int index) { + return friends_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < friends_.size(); i++) { + output.writeMessage(1, friends_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < friends_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, friends_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.FriendList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.FriendList other = (com.heroiclabs.nakama.api.FriendList) obj; + + if (!getFriendsList() + .equals(other.getFriendsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFriendsCount() > 0) { + hash = (37 * hash) + FRIENDS_FIELD_NUMBER; + hash = (53 * hash) + getFriendsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.FriendList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.FriendList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.FriendList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.FriendList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.FriendList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of zero or more friends of the user.
+   * 
+ * + * Protobuf type {@code nakama.api.FriendList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.FriendList) + com.heroiclabs.nakama.api.FriendListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.FriendList.class, com.heroiclabs.nakama.api.FriendList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.FriendList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (friendsBuilder_ == null) { + friends_ = java.util.Collections.emptyList(); + } else { + friends_ = null; + friendsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.FriendList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendList build() { + com.heroiclabs.nakama.api.FriendList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendList buildPartial() { + com.heroiclabs.nakama.api.FriendList result = new com.heroiclabs.nakama.api.FriendList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.FriendList result) { + if (friendsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + friends_ = java.util.Collections.unmodifiableList(friends_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.friends_ = friends_; + } else { + result.friends_ = friendsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.FriendList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.FriendList) { + return mergeFrom((com.heroiclabs.nakama.api.FriendList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.FriendList other) { + if (other == com.heroiclabs.nakama.api.FriendList.getDefaultInstance()) return this; + if (friendsBuilder_ == null) { + if (!other.friends_.isEmpty()) { + if (friends_.isEmpty()) { + friends_ = other.friends_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFriendsIsMutable(); + friends_.addAll(other.friends_); + } + onChanged(); + } + } else { + if (!other.friends_.isEmpty()) { + if (friendsBuilder_.isEmpty()) { + friendsBuilder_.dispose(); + friendsBuilder_ = null; + friends_ = other.friends_; + bitField0_ = (bitField0_ & ~0x00000001); + friendsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFriendsFieldBuilder() : null; + } else { + friendsBuilder_.addAllMessages(other.friends_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.Friend m = + input.readMessage( + com.heroiclabs.nakama.api.Friend.parser(), + extensionRegistry); + if (friendsBuilder_ == null) { + ensureFriendsIsMutable(); + friends_.add(m); + } else { + friendsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List friends_ = + java.util.Collections.emptyList(); + private void ensureFriendsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + friends_ = new java.util.ArrayList(friends_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Friend, com.heroiclabs.nakama.api.Friend.Builder, com.heroiclabs.nakama.api.FriendOrBuilder> friendsBuilder_; + + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public java.util.List getFriendsList() { + if (friendsBuilder_ == null) { + return java.util.Collections.unmodifiableList(friends_); + } else { + return friendsBuilder_.getMessageList(); + } + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public int getFriendsCount() { + if (friendsBuilder_ == null) { + return friends_.size(); + } else { + return friendsBuilder_.getCount(); + } + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public com.heroiclabs.nakama.api.Friend getFriends(int index) { + if (friendsBuilder_ == null) { + return friends_.get(index); + } else { + return friendsBuilder_.getMessage(index); + } + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder setFriends( + int index, com.heroiclabs.nakama.api.Friend value) { + if (friendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFriendsIsMutable(); + friends_.set(index, value); + onChanged(); + } else { + friendsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder setFriends( + int index, com.heroiclabs.nakama.api.Friend.Builder builderForValue) { + if (friendsBuilder_ == null) { + ensureFriendsIsMutable(); + friends_.set(index, builderForValue.build()); + onChanged(); + } else { + friendsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder addFriends(com.heroiclabs.nakama.api.Friend value) { + if (friendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFriendsIsMutable(); + friends_.add(value); + onChanged(); + } else { + friendsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder addFriends( + int index, com.heroiclabs.nakama.api.Friend value) { + if (friendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFriendsIsMutable(); + friends_.add(index, value); + onChanged(); + } else { + friendsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder addFriends( + com.heroiclabs.nakama.api.Friend.Builder builderForValue) { + if (friendsBuilder_ == null) { + ensureFriendsIsMutable(); + friends_.add(builderForValue.build()); + onChanged(); + } else { + friendsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder addFriends( + int index, com.heroiclabs.nakama.api.Friend.Builder builderForValue) { + if (friendsBuilder_ == null) { + ensureFriendsIsMutable(); + friends_.add(index, builderForValue.build()); + onChanged(); + } else { + friendsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder addAllFriends( + java.lang.Iterable values) { + if (friendsBuilder_ == null) { + ensureFriendsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, friends_); + onChanged(); + } else { + friendsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder clearFriends() { + if (friendsBuilder_ == null) { + friends_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + friendsBuilder_.clear(); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public Builder removeFriends(int index) { + if (friendsBuilder_ == null) { + ensureFriendsIsMutable(); + friends_.remove(index); + onChanged(); + } else { + friendsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public com.heroiclabs.nakama.api.Friend.Builder getFriendsBuilder( + int index) { + return getFriendsFieldBuilder().getBuilder(index); + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public com.heroiclabs.nakama.api.FriendOrBuilder getFriendsOrBuilder( + int index) { + if (friendsBuilder_ == null) { + return friends_.get(index); } else { + return friendsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public java.util.List + getFriendsOrBuilderList() { + if (friendsBuilder_ != null) { + return friendsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(friends_); + } + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public com.heroiclabs.nakama.api.Friend.Builder addFriendsBuilder() { + return getFriendsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.Friend.getDefaultInstance()); + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public com.heroiclabs.nakama.api.Friend.Builder addFriendsBuilder( + int index) { + return getFriendsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.Friend.getDefaultInstance()); + } + /** + *
+     * The Friend objects.
+     * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + public java.util.List + getFriendsBuilderList() { + return getFriendsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Friend, com.heroiclabs.nakama.api.Friend.Builder, com.heroiclabs.nakama.api.FriendOrBuilder> + getFriendsFieldBuilder() { + if (friendsBuilder_ == null) { + friendsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Friend, com.heroiclabs.nakama.api.Friend.Builder, com.heroiclabs.nakama.api.FriendOrBuilder>( + friends_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + friends_ = null; + } + return friendsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.FriendList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.FriendList) + private static final com.heroiclabs.nakama.api.FriendList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.FriendList(); + } + + public static com.heroiclabs.nakama.api.FriendList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FriendList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/FriendListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/FriendListOrBuilder.java new file mode 100644 index 00000000..53ea781e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/FriendListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface FriendListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.FriendList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + java.util.List + getFriendsList(); + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + com.heroiclabs.nakama.api.Friend getFriends(int index); + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + int getFriendsCount(); + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + java.util.List + getFriendsOrBuilderList(); + /** + *
+   * The Friend objects.
+   * 
+ * + * repeated .nakama.api.Friend friends = 1 [json_name = "friends"]; + */ + com.heroiclabs.nakama.api.FriendOrBuilder getFriendsOrBuilder( + int index); + + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/FriendOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/FriendOrBuilder.java new file mode 100644 index 00000000..528676c3 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/FriendOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface FriendOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Friend) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + com.heroiclabs.nakama.api.User getUser(); + /** + *
+   * The user object.
+   * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder(); + + /** + *
+   * The friend status.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + boolean hasState(); + /** + *
+   * The friend status.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + com.google.protobuf.Int32Value getState(); + /** + *
+   * The friend status.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder(); + + /** + *
+   * Time of the latest relationship update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Time of the latest relationship update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Time of the latest relationship update.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsList.java b/src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsList.java new file mode 100644 index 00000000..ebd0eec7 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsList.java @@ -0,0 +1,1805 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A List of friends of friends
+ * 
+ * + * Protobuf type {@code nakama.api.FriendsOfFriendsList} + */ +public final class FriendsOfFriendsList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.FriendsOfFriendsList) + FriendsOfFriendsListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + FriendsOfFriendsList.class.getName()); + } + // Use FriendsOfFriendsList.newBuilder() to construct. + private FriendsOfFriendsList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FriendsOfFriendsList() { + friendsOfFriends_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.FriendsOfFriendsList.class, com.heroiclabs.nakama.api.FriendsOfFriendsList.Builder.class); + } + + public interface FriendOfFriendOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.FriendsOfFriendsList.FriendOfFriend) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The user who referred its friend.
+     * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @return The referrer. + */ + java.lang.String getReferrer(); + /** + *
+     * The user who referred its friend.
+     * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @return The bytes for referrer. + */ + com.google.protobuf.ByteString + getReferrerBytes(); + + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + * @return The user. + */ + com.heroiclabs.nakama.api.User getUser(); + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder(); + } + /** + *
+   * A friend of a friend.
+   * 
+ * + * Protobuf type {@code nakama.api.FriendsOfFriendsList.FriendOfFriend} + */ + public static final class FriendOfFriend extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.FriendsOfFriendsList.FriendOfFriend) + FriendOfFriendOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + FriendOfFriend.class.getName()); + } + // Use FriendOfFriend.newBuilder() to construct. + private FriendOfFriend(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FriendOfFriend() { + referrer_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.class, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder.class); + } + + private int bitField0_; + public static final int REFERRER_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object referrer_ = ""; + /** + *
+     * The user who referred its friend.
+     * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @return The referrer. + */ + @java.lang.Override + public java.lang.String getReferrer() { + java.lang.Object ref = referrer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referrer_ = s; + return s; + } + } + /** + *
+     * The user who referred its friend.
+     * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @return The bytes for referrer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReferrerBytes() { + java.lang.Object ref = referrer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referrer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.api.User user_; + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + * @return The user. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.User getUser() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(referrer_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, referrer_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUser()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(referrer_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, referrer_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend other = (com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend) obj; + + if (!getReferrer() + .equals(other.getReferrer())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REFERRER_FIELD_NUMBER; + hash = (53 * hash) + getReferrer().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A friend of a friend.
+     * 
+ * + * Protobuf type {@code nakama.api.FriendsOfFriendsList.FriendOfFriend} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.FriendsOfFriendsList.FriendOfFriend) + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.class, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + referrer_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_FriendOfFriend_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend build() { + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend buildPartial() { + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend result = new com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.referrer_ = referrer_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend) { + return mergeFrom((com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend other) { + if (other == com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.getDefaultInstance()) return this; + if (!other.getReferrer().isEmpty()) { + referrer_ = other.referrer_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + referrer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object referrer_ = ""; + /** + *
+       * The user who referred its friend.
+       * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @return The referrer. + */ + public java.lang.String getReferrer() { + java.lang.Object ref = referrer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referrer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The user who referred its friend.
+       * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @return The bytes for referrer. + */ + public com.google.protobuf.ByteString + getReferrerBytes() { + java.lang.Object ref = referrer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referrer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The user who referred its friend.
+       * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @param value The referrer to set. + * @return This builder for chaining. + */ + public Builder setReferrer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + referrer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The user who referred its friend.
+       * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @return This builder for chaining. + */ + public Builder clearReferrer() { + referrer_ = getDefaultInstance().getReferrer(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The user who referred its friend.
+       * 
+ * + * string referrer = 1 [json_name = "referrer"]; + * @param value The bytes for referrer to set. + * @return This builder for chaining. + */ + public Builder setReferrerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + referrer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.api.User user_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> userBuilder_; + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + * @return The user. + */ + public com.heroiclabs.nakama.api.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + public Builder setUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + public Builder setUser( + com.heroiclabs.nakama.api.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + public Builder mergeUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != com.heroiclabs.nakama.api.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 2 [json_name = "user"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.FriendsOfFriendsList.FriendOfFriend) + } + + // @@protoc_insertion_point(class_scope:nakama.api.FriendsOfFriendsList.FriendOfFriend) + private static final com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend(); + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FriendOfFriend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FRIENDS_OF_FRIENDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List friendsOfFriends_; + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + @java.lang.Override + public java.util.List getFriendsOfFriendsList() { + return friendsOfFriends_; + } + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + @java.lang.Override + public java.util.List + getFriendsOfFriendsOrBuilderList() { + return friendsOfFriends_; + } + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + @java.lang.Override + public int getFriendsOfFriendsCount() { + return friendsOfFriends_.size(); + } + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend getFriendsOfFriends(int index) { + return friendsOfFriends_.get(index); + } + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriendOrBuilder getFriendsOfFriendsOrBuilder( + int index) { + return friendsOfFriends_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < friendsOfFriends_.size(); i++) { + output.writeMessage(1, friendsOfFriends_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < friendsOfFriends_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, friendsOfFriends_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.FriendsOfFriendsList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.FriendsOfFriendsList other = (com.heroiclabs.nakama.api.FriendsOfFriendsList) obj; + + if (!getFriendsOfFriendsList() + .equals(other.getFriendsOfFriendsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFriendsOfFriendsCount() > 0) { + hash = (37 * hash) + FRIENDS_OF_FRIENDS_FIELD_NUMBER; + hash = (53 * hash) + getFriendsOfFriendsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.FriendsOfFriendsList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.FriendsOfFriendsList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A List of friends of friends
+   * 
+ * + * Protobuf type {@code nakama.api.FriendsOfFriendsList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.FriendsOfFriendsList) + com.heroiclabs.nakama.api.FriendsOfFriendsListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.FriendsOfFriendsList.class, com.heroiclabs.nakama.api.FriendsOfFriendsList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.FriendsOfFriendsList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (friendsOfFriendsBuilder_ == null) { + friendsOfFriends_ = java.util.Collections.emptyList(); + } else { + friendsOfFriends_ = null; + friendsOfFriendsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_FriendsOfFriendsList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.FriendsOfFriendsList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList build() { + com.heroiclabs.nakama.api.FriendsOfFriendsList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList buildPartial() { + com.heroiclabs.nakama.api.FriendsOfFriendsList result = new com.heroiclabs.nakama.api.FriendsOfFriendsList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.FriendsOfFriendsList result) { + if (friendsOfFriendsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + friendsOfFriends_ = java.util.Collections.unmodifiableList(friendsOfFriends_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.friendsOfFriends_ = friendsOfFriends_; + } else { + result.friendsOfFriends_ = friendsOfFriendsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.FriendsOfFriendsList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.FriendsOfFriendsList) { + return mergeFrom((com.heroiclabs.nakama.api.FriendsOfFriendsList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.FriendsOfFriendsList other) { + if (other == com.heroiclabs.nakama.api.FriendsOfFriendsList.getDefaultInstance()) return this; + if (friendsOfFriendsBuilder_ == null) { + if (!other.friendsOfFriends_.isEmpty()) { + if (friendsOfFriends_.isEmpty()) { + friendsOfFriends_ = other.friendsOfFriends_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.addAll(other.friendsOfFriends_); + } + onChanged(); + } + } else { + if (!other.friendsOfFriends_.isEmpty()) { + if (friendsOfFriendsBuilder_.isEmpty()) { + friendsOfFriendsBuilder_.dispose(); + friendsOfFriendsBuilder_ = null; + friendsOfFriends_ = other.friendsOfFriends_; + bitField0_ = (bitField0_ & ~0x00000001); + friendsOfFriendsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFriendsOfFriendsFieldBuilder() : null; + } else { + friendsOfFriendsBuilder_.addAllMessages(other.friendsOfFriends_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend m = + input.readMessage( + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.parser(), + extensionRegistry); + if (friendsOfFriendsBuilder_ == null) { + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.add(m); + } else { + friendsOfFriendsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List friendsOfFriends_ = + java.util.Collections.emptyList(); + private void ensureFriendsOfFriendsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + friendsOfFriends_ = new java.util.ArrayList(friendsOfFriends_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriendOrBuilder> friendsOfFriendsBuilder_; + + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public java.util.List getFriendsOfFriendsList() { + if (friendsOfFriendsBuilder_ == null) { + return java.util.Collections.unmodifiableList(friendsOfFriends_); + } else { + return friendsOfFriendsBuilder_.getMessageList(); + } + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public int getFriendsOfFriendsCount() { + if (friendsOfFriendsBuilder_ == null) { + return friendsOfFriends_.size(); + } else { + return friendsOfFriendsBuilder_.getCount(); + } + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend getFriendsOfFriends(int index) { + if (friendsOfFriendsBuilder_ == null) { + return friendsOfFriends_.get(index); + } else { + return friendsOfFriendsBuilder_.getMessage(index); + } + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder setFriendsOfFriends( + int index, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend value) { + if (friendsOfFriendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.set(index, value); + onChanged(); + } else { + friendsOfFriendsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder setFriendsOfFriends( + int index, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder builderForValue) { + if (friendsOfFriendsBuilder_ == null) { + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.set(index, builderForValue.build()); + onChanged(); + } else { + friendsOfFriendsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder addFriendsOfFriends(com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend value) { + if (friendsOfFriendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.add(value); + onChanged(); + } else { + friendsOfFriendsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder addFriendsOfFriends( + int index, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend value) { + if (friendsOfFriendsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.add(index, value); + onChanged(); + } else { + friendsOfFriendsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder addFriendsOfFriends( + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder builderForValue) { + if (friendsOfFriendsBuilder_ == null) { + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.add(builderForValue.build()); + onChanged(); + } else { + friendsOfFriendsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder addFriendsOfFriends( + int index, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder builderForValue) { + if (friendsOfFriendsBuilder_ == null) { + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.add(index, builderForValue.build()); + onChanged(); + } else { + friendsOfFriendsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder addAllFriendsOfFriends( + java.lang.Iterable values) { + if (friendsOfFriendsBuilder_ == null) { + ensureFriendsOfFriendsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, friendsOfFriends_); + onChanged(); + } else { + friendsOfFriendsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder clearFriendsOfFriends() { + if (friendsOfFriendsBuilder_ == null) { + friendsOfFriends_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + friendsOfFriendsBuilder_.clear(); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public Builder removeFriendsOfFriends(int index) { + if (friendsOfFriendsBuilder_ == null) { + ensureFriendsOfFriendsIsMutable(); + friendsOfFriends_.remove(index); + onChanged(); + } else { + friendsOfFriendsBuilder_.remove(index); + } + return this; + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder getFriendsOfFriendsBuilder( + int index) { + return getFriendsOfFriendsFieldBuilder().getBuilder(index); + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriendOrBuilder getFriendsOfFriendsOrBuilder( + int index) { + if (friendsOfFriendsBuilder_ == null) { + return friendsOfFriends_.get(index); } else { + return friendsOfFriendsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public java.util.List + getFriendsOfFriendsOrBuilderList() { + if (friendsOfFriendsBuilder_ != null) { + return friendsOfFriendsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(friendsOfFriends_); + } + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder addFriendsOfFriendsBuilder() { + return getFriendsOfFriendsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.getDefaultInstance()); + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder addFriendsOfFriendsBuilder( + int index) { + return getFriendsOfFriendsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.getDefaultInstance()); + } + /** + *
+     * User friends of friends.
+     * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + public java.util.List + getFriendsOfFriendsBuilderList() { + return getFriendsOfFriendsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriendOrBuilder> + getFriendsOfFriendsFieldBuilder() { + if (friendsOfFriendsBuilder_ == null) { + friendsOfFriendsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend.Builder, com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriendOrBuilder>( + friendsOfFriends_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + friendsOfFriends_ = null; + } + return friendsOfFriendsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.FriendsOfFriendsList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.FriendsOfFriendsList) + private static final com.heroiclabs.nakama.api.FriendsOfFriendsList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.FriendsOfFriendsList(); + } + + public static com.heroiclabs.nakama.api.FriendsOfFriendsList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FriendsOfFriendsList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.FriendsOfFriendsList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsListOrBuilder.java new file mode 100644 index 00000000..6303aeaf --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/FriendsOfFriendsListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface FriendsOfFriendsListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.FriendsOfFriendsList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + java.util.List + getFriendsOfFriendsList(); + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriend getFriendsOfFriends(int index); + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + int getFriendsOfFriendsCount(); + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + java.util.List + getFriendsOfFriendsOrBuilderList(); + /** + *
+   * User friends of friends.
+   * 
+ * + * repeated .nakama.api.FriendsOfFriendsList.FriendOfFriend friends_of_friends = 1 [json_name = "friendsOfFriends"]; + */ + com.heroiclabs.nakama.api.FriendsOfFriendsList.FriendOfFriendOrBuilder getFriendsOfFriendsOrBuilder( + int index); + + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequest.java b/src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequest.java new file mode 100644 index 00000000..71bd6026 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Fetch a subscription by product id.
+ * 
+ * + * Protobuf type {@code nakama.api.GetSubscriptionRequest} + */ +public final class GetSubscriptionRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.GetSubscriptionRequest) + GetSubscriptionRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GetSubscriptionRequest.class.getName()); + } + // Use GetSubscriptionRequest.newBuilder() to construct. + private GetSubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetSubscriptionRequest() { + productId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetSubscriptionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetSubscriptionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GetSubscriptionRequest.class, com.heroiclabs.nakama.api.GetSubscriptionRequest.Builder.class); + } + + public static final int PRODUCT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object productId_ = ""; + /** + *
+   * Product id of the subscription
+   * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @return The productId. + */ + @java.lang.Override + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } + } + /** + *
+   * Product id of the subscription
+   * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @return The bytes for productId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, productId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, productId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.GetSubscriptionRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.GetSubscriptionRequest other = (com.heroiclabs.nakama.api.GetSubscriptionRequest) obj; + + if (!getProductId() + .equals(other.getProductId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GetSubscriptionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.GetSubscriptionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Fetch a subscription by product id.
+   * 
+ * + * Protobuf type {@code nakama.api.GetSubscriptionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.GetSubscriptionRequest) + com.heroiclabs.nakama.api.GetSubscriptionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetSubscriptionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetSubscriptionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GetSubscriptionRequest.class, com.heroiclabs.nakama.api.GetSubscriptionRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.GetSubscriptionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + productId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetSubscriptionRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetSubscriptionRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.GetSubscriptionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetSubscriptionRequest build() { + com.heroiclabs.nakama.api.GetSubscriptionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetSubscriptionRequest buildPartial() { + com.heroiclabs.nakama.api.GetSubscriptionRequest result = new com.heroiclabs.nakama.api.GetSubscriptionRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.GetSubscriptionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.productId_ = productId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.GetSubscriptionRequest) { + return mergeFrom((com.heroiclabs.nakama.api.GetSubscriptionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.GetSubscriptionRequest other) { + if (other == com.heroiclabs.nakama.api.GetSubscriptionRequest.getDefaultInstance()) return this; + if (!other.getProductId().isEmpty()) { + productId_ = other.productId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + productId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object productId_ = ""; + /** + *
+     * Product id of the subscription
+     * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @return The productId. + */ + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Product id of the subscription
+     * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @return The bytes for productId. + */ + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Product id of the subscription
+     * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @param value The productId to set. + * @return This builder for chaining. + */ + public Builder setProductId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + productId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Product id of the subscription
+     * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @return This builder for chaining. + */ + public Builder clearProductId() { + productId_ = getDefaultInstance().getProductId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Product id of the subscription
+     * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @param value The bytes for productId to set. + * @return This builder for chaining. + */ + public Builder setProductIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + productId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.GetSubscriptionRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.GetSubscriptionRequest) + private static final com.heroiclabs.nakama.api.GetSubscriptionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.GetSubscriptionRequest(); + } + + public static com.heroiclabs.nakama.api.GetSubscriptionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubscriptionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetSubscriptionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequestOrBuilder.java new file mode 100644 index 00000000..3b90f07e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GetSubscriptionRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface GetSubscriptionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.GetSubscriptionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Product id of the subscription
+   * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @return The productId. + */ + java.lang.String getProductId(); + /** + *
+   * Product id of the subscription
+   * 
+ * + * string product_id = 1 [json_name = "productId"]; + * @return The bytes for productId. + */ + com.google.protobuf.ByteString + getProductIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/GetUsersRequest.java b/src/main/java/com/heroiclabs/nakama/api/GetUsersRequest.java new file mode 100644 index 00000000..a0a00441 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GetUsersRequest.java @@ -0,0 +1,1096 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Fetch a batch of zero or more users from the server.
+ * 
+ * + * Protobuf type {@code nakama.api.GetUsersRequest} + */ +public final class GetUsersRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.GetUsersRequest) + GetUsersRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GetUsersRequest.class.getName()); + } + // Use GetUsersRequest.newBuilder() to construct. + private GetUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetUsersRequest() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + facebookIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GetUsersRequest.class, com.heroiclabs.nakama.api.GetUsersRequest.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + return ids_; + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + + public static final int USERNAMES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + return usernames_; + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + + public static final int FACEBOOK_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList facebookIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @return A list containing the facebookIds. + */ + public com.google.protobuf.ProtocolStringList + getFacebookIdsList() { + return facebookIds_; + } + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @return The count of facebookIds. + */ + public int getFacebookIdsCount() { + return facebookIds_.size(); + } + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param index The index of the element to return. + * @return The facebookIds at the given index. + */ + public java.lang.String getFacebookIds(int index) { + return facebookIds_.get(index); + } + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param index The index of the value to return. + * @return The bytes of the facebookIds at the given index. + */ + public com.google.protobuf.ByteString + getFacebookIdsBytes(int index) { + return facebookIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < ids_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ids_.getRaw(i)); + } + for (int i = 0; i < usernames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, usernames_.getRaw(i)); + } + for (int i = 0; i < facebookIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, facebookIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ids_.size(); i++) { + dataSize += computeStringSizeNoTag(ids_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < usernames_.size(); i++) { + dataSize += computeStringSizeNoTag(usernames_.getRaw(i)); + } + size += dataSize; + size += 1 * getUsernamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < facebookIds_.size(); i++) { + dataSize += computeStringSizeNoTag(facebookIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getFacebookIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.GetUsersRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.GetUsersRequest other = (com.heroiclabs.nakama.api.GetUsersRequest) obj; + + if (!getIdsList() + .equals(other.getIdsList())) return false; + if (!getUsernamesList() + .equals(other.getUsernamesList())) return false; + if (!getFacebookIdsList() + .equals(other.getFacebookIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getUsernamesCount() > 0) { + hash = (37 * hash) + USERNAMES_FIELD_NUMBER; + hash = (53 * hash) + getUsernamesList().hashCode(); + } + if (getFacebookIdsCount() > 0) { + hash = (37 * hash) + FACEBOOK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getFacebookIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.GetUsersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.GetUsersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GetUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.GetUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Fetch a batch of zero or more users from the server.
+   * 
+ * + * Protobuf type {@code nakama.api.GetUsersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.GetUsersRequest) + com.heroiclabs.nakama.api.GetUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GetUsersRequest.class, com.heroiclabs.nakama.api.GetUsersRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.GetUsersRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + facebookIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GetUsersRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetUsersRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.GetUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetUsersRequest build() { + com.heroiclabs.nakama.api.GetUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetUsersRequest buildPartial() { + com.heroiclabs.nakama.api.GetUsersRequest result = new com.heroiclabs.nakama.api.GetUsersRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.GetUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + usernames_.makeImmutable(); + result.usernames_ = usernames_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + facebookIds_.makeImmutable(); + result.facebookIds_ = facebookIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.GetUsersRequest) { + return mergeFrom((com.heroiclabs.nakama.api.GetUsersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.GetUsersRequest other) { + if (other == com.heroiclabs.nakama.api.GetUsersRequest.getDefaultInstance()) return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + bitField0_ |= 0x00000001; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.usernames_.isEmpty()) { + if (usernames_.isEmpty()) { + usernames_ = other.usernames_; + bitField0_ |= 0x00000002; + } else { + ensureUsernamesIsMutable(); + usernames_.addAll(other.usernames_); + } + onChanged(); + } + if (!other.facebookIds_.isEmpty()) { + if (facebookIds_.isEmpty()) { + facebookIds_ = other.facebookIds_; + bitField0_ |= 0x00000004; + } else { + ensureFacebookIdsIsMutable(); + facebookIds_.addAll(other.facebookIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureIdsIsMutable(); + ids_.add(s); + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUsernamesIsMutable(); + usernames_.add(s); + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureFacebookIdsIsMutable(); + facebookIds_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = new com.google.protobuf.LazyStringArrayList(ids_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + public com.google.protobuf.ProtocolStringList + getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public java.lang.String getIds(int index) { + return ids_.get(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + public com.google.protobuf.ByteString + getIdsBytes(int index) { + return ids_.getByteString(index); + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds( + java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ids_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * The account id of a user.
+     * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param value The bytes of the ids to add. + * @return This builder for chaining. + */ + public Builder addIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureIdsIsMutable(); + ids_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUsernamesIsMutable() { + if (!usernames_.isModifiable()) { + usernames_ = new com.google.protobuf.LazyStringArrayList(usernames_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + usernames_.makeImmutable(); + return usernames_; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index to set the value at. + * @param value The usernames to set. + * @return This builder for chaining. + */ + public Builder setUsernames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param values The usernames to add. + * @return This builder for chaining. + */ + public Builder addAllUsernames( + java.lang.Iterable values) { + ensureUsernamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, usernames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return This builder for chaining. + */ + public Builder clearUsernames() { + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The account username of a user.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The bytes of the usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList facebookIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureFacebookIdsIsMutable() { + if (!facebookIds_.isModifiable()) { + facebookIds_ = new com.google.protobuf.LazyStringArrayList(facebookIds_); + } + bitField0_ |= 0x00000004; + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @return A list containing the facebookIds. + */ + public com.google.protobuf.ProtocolStringList + getFacebookIdsList() { + facebookIds_.makeImmutable(); + return facebookIds_; + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @return The count of facebookIds. + */ + public int getFacebookIdsCount() { + return facebookIds_.size(); + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param index The index of the element to return. + * @return The facebookIds at the given index. + */ + public java.lang.String getFacebookIds(int index) { + return facebookIds_.get(index); + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param index The index of the value to return. + * @return The bytes of the facebookIds at the given index. + */ + public com.google.protobuf.ByteString + getFacebookIdsBytes(int index) { + return facebookIds_.getByteString(index); + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param index The index to set the value at. + * @param value The facebookIds to set. + * @return This builder for chaining. + */ + public Builder setFacebookIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureFacebookIdsIsMutable(); + facebookIds_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param value The facebookIds to add. + * @return This builder for chaining. + */ + public Builder addFacebookIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureFacebookIdsIsMutable(); + facebookIds_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param values The facebookIds to add. + * @return This builder for chaining. + */ + public Builder addAllFacebookIds( + java.lang.Iterable values) { + ensureFacebookIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, facebookIds_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @return This builder for chaining. + */ + public Builder clearFacebookIds() { + facebookIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004);; + onChanged(); + return this; + } + /** + *
+     * The Facebook ID of a user.
+     * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param value The bytes of the facebookIds to add. + * @return This builder for chaining. + */ + public Builder addFacebookIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureFacebookIdsIsMutable(); + facebookIds_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.GetUsersRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.GetUsersRequest) + private static final com.heroiclabs.nakama.api.GetUsersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.GetUsersRequest(); + } + + public static com.heroiclabs.nakama.api.GetUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GetUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/GetUsersRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/GetUsersRequestOrBuilder.java new file mode 100644 index 00000000..3c99fd22 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GetUsersRequestOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface GetUsersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.GetUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return A list containing the ids. + */ + java.util.List + getIdsList(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @return The count of ids. + */ + int getIdsCount(); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the element to return. + * @return The ids at the given index. + */ + java.lang.String getIds(int index); + /** + *
+   * The account id of a user.
+   * 
+ * + * repeated string ids = 1 [json_name = "ids"]; + * @param index The index of the value to return. + * @return The bytes of the ids at the given index. + */ + com.google.protobuf.ByteString + getIdsBytes(int index); + + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + java.util.List + getUsernamesList(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + int getUsernamesCount(); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + java.lang.String getUsernames(int index); + /** + *
+   * The account username of a user.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + com.google.protobuf.ByteString + getUsernamesBytes(int index); + + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @return A list containing the facebookIds. + */ + java.util.List + getFacebookIdsList(); + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @return The count of facebookIds. + */ + int getFacebookIdsCount(); + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param index The index of the element to return. + * @return The facebookIds at the given index. + */ + java.lang.String getFacebookIds(int index); + /** + *
+   * The Facebook ID of a user.
+   * 
+ * + * repeated string facebook_ids = 3 [json_name = "facebookIds"]; + * @param index The index of the value to return. + * @return The bytes of the facebookIds at the given index. + */ + com.google.protobuf.ByteString + getFacebookIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Group.java b/src/main/java/com/heroiclabs/nakama/api/Group.java new file mode 100644 index 00000000..b37f60fd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Group.java @@ -0,0 +1,2392 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A group in the server.
+ * 
+ * + * Protobuf type {@code nakama.api.Group} + */ +public final class Group extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Group) + GroupOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Group.class.getName()); + } + // Use Group.newBuilder() to construct. + private Group(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Group() { + id_ = ""; + creatorId_ = ""; + name_ = ""; + description_ = ""; + langTag_ = ""; + metadata_ = ""; + avatarUrl_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Group_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Group.class, com.heroiclabs.nakama.api.Group.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The id of a group.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The id of a group.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATOR_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object creatorId_ = ""; + /** + *
+   * The id of the user who created the group.
+   * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @return The creatorId. + */ + @java.lang.Override + public java.lang.String getCreatorId() { + java.lang.Object ref = creatorId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creatorId_ = s; + return s; + } + } + /** + *
+   * The id of the user who created the group.
+   * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @return The bytes for creatorId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCreatorIdBytes() { + java.lang.Object ref = creatorId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creatorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * The unique name of the group.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The unique name of the group.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 4 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 4 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANG_TAG_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object langTag_ = ""; + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The langTag. + */ + @java.lang.Override + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } + } + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object metadata_ = ""; + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } + } + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATAR_URL_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarUrl_ = ""; + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + @java.lang.Override + public java.lang.String getAvatarUrl() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarUrl_ = s; + return s; + } + } + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarUrlBytes() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPEN_FIELD_NUMBER = 8; + private com.google.protobuf.BoolValue open_; + /** + *
+   * Anyone can join open groups, otherwise only admins can accept members.
+   * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + * @return Whether the open field is set. + */ + @java.lang.Override + public boolean hasOpen() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Anyone can join open groups, otherwise only admins can accept members.
+   * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getOpen() { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + /** + *
+   * Anyone can join open groups, otherwise only admins can accept members.
+   * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder() { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + + public static final int EDGE_COUNT_FIELD_NUMBER = 9; + private int edgeCount_ = 0; + /** + *
+   * The current count of all members in the group.
+   * 
+ * + * int32 edge_count = 9 [json_name = "edgeCount"]; + * @return The edgeCount. + */ + @java.lang.Override + public int getEdgeCount() { + return edgeCount_; + } + + public static final int MAX_COUNT_FIELD_NUMBER = 10; + private int maxCount_ = 0; + /** + *
+   * The maximum number of members allowed.
+   * 
+ * + * int32 max_count = 10 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(creatorId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, creatorId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, langTag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, metadata_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(avatarUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, avatarUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getOpen()); + } + if (edgeCount_ != 0) { + output.writeInt32(9, edgeCount_); + } + if (maxCount_ != 0) { + output.writeInt32(10, maxCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(11, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(12, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(creatorId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, creatorId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, langTag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, metadata_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(avatarUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, avatarUrl_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getOpen()); + } + if (edgeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, edgeCount_); + } + if (maxCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(10, maxCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Group)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Group other = (com.heroiclabs.nakama.api.Group) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getCreatorId() + .equals(other.getCreatorId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getLangTag() + .equals(other.getLangTag())) return false; + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (!getAvatarUrl() + .equals(other.getAvatarUrl())) return false; + if (hasOpen() != other.hasOpen()) return false; + if (hasOpen()) { + if (!getOpen() + .equals(other.getOpen())) return false; + } + if (getEdgeCount() + != other.getEdgeCount()) return false; + if (getMaxCount() + != other.getMaxCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + CREATOR_ID_FIELD_NUMBER; + hash = (53 * hash) + getCreatorId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + LANG_TAG_FIELD_NUMBER; + hash = (53 * hash) + getLangTag().hashCode(); + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + hash = (37 * hash) + AVATAR_URL_FIELD_NUMBER; + hash = (53 * hash) + getAvatarUrl().hashCode(); + if (hasOpen()) { + hash = (37 * hash) + OPEN_FIELD_NUMBER; + hash = (53 * hash) + getOpen().hashCode(); + } + hash = (37 * hash) + EDGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getEdgeCount(); + hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxCount(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Group parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Group parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Group parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Group parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Group parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Group parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Group parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Group parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Group parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Group parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Group parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Group parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Group prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A group in the server.
+   * 
+ * + * Protobuf type {@code nakama.api.Group} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Group) + com.heroiclabs.nakama.api.GroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Group_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Group.class, com.heroiclabs.nakama.api.Group.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Group.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getOpenFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + creatorId_ = ""; + name_ = ""; + description_ = ""; + langTag_ = ""; + metadata_ = ""; + avatarUrl_ = ""; + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + edgeCount_ = 0; + maxCount_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Group_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Group getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Group.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Group build() { + com.heroiclabs.nakama.api.Group result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Group buildPartial() { + com.heroiclabs.nakama.api.Group result = new com.heroiclabs.nakama.api.Group(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Group result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.creatorId_ = creatorId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.langTag_ = langTag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.metadata_ = metadata_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.avatarUrl_ = avatarUrl_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.open_ = openBuilder_ == null + ? open_ + : openBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.edgeCount_ = edgeCount_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.maxCount_ = maxCount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Group) { + return mergeFrom((com.heroiclabs.nakama.api.Group)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Group other) { + if (other == com.heroiclabs.nakama.api.Group.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCreatorId().isEmpty()) { + creatorId_ = other.creatorId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getLangTag().isEmpty()) { + langTag_ = other.langTag_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getAvatarUrl().isEmpty()) { + avatarUrl_ = other.avatarUrl_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasOpen()) { + mergeOpen(other.getOpen()); + } + if (other.getEdgeCount() != 0) { + setEdgeCount(other.getEdgeCount()); + } + if (other.getMaxCount() != 0) { + setMaxCount(other.getMaxCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + creatorId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + langTag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + avatarUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getOpenFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + edgeCount_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + maxCount_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 90: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The id of a group.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The id of a group.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The id of a group.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The id of a group.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The id of a group.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object creatorId_ = ""; + /** + *
+     * The id of the user who created the group.
+     * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @return The creatorId. + */ + public java.lang.String getCreatorId() { + java.lang.Object ref = creatorId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creatorId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The id of the user who created the group.
+     * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @return The bytes for creatorId. + */ + public com.google.protobuf.ByteString + getCreatorIdBytes() { + java.lang.Object ref = creatorId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creatorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The id of the user who created the group.
+     * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @param value The creatorId to set. + * @return This builder for chaining. + */ + public Builder setCreatorId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + creatorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The id of the user who created the group.
+     * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @return This builder for chaining. + */ + public Builder clearCreatorId() { + creatorId_ = getDefaultInstance().getCreatorId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The id of the user who created the group.
+     * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @param value The bytes for creatorId to set. + * @return This builder for chaining. + */ + public Builder setCreatorIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + creatorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The unique name of the group.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unique name of the group.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unique name of the group.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The unique name of the group.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The unique name of the group.
+     * 
+ * + * string name = 3 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A description for the group.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object langTag_ = ""; + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The langTag. + */ + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @param value The langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTag( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + langTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return This builder for chaining. + */ + public Builder clearLangTag() { + langTag_ = getDefaultInstance().getLangTag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @param value The bytes for langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + langTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object metadata_ = ""; + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The metadata. + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @param value The metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadata_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return This builder for chaining. + */ + public Builder clearMetadata() { + metadata_ = getDefaultInstance().getMetadata(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @param value The bytes for metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadata_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object avatarUrl_ = ""; + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + public java.lang.String getAvatarUrl() { + java.lang.Object ref = avatarUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + public com.google.protobuf.ByteString + getAvatarUrlBytes() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @param value The avatarUrl to set. + * @return This builder for chaining. + */ + public Builder setAvatarUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @return This builder for chaining. + */ + public Builder clearAvatarUrl() { + avatarUrl_ = getDefaultInstance().getAvatarUrl(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @param value The bytes for avatarUrl to set. + * @return This builder for chaining. + */ + public Builder setAvatarUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue open_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> openBuilder_; + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + * @return Whether the open field is set. + */ + public boolean hasOpen() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + * @return The open. + */ + public com.google.protobuf.BoolValue getOpen() { + if (openBuilder_ == null) { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } else { + return openBuilder_.getMessage(); + } + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + public Builder setOpen(com.google.protobuf.BoolValue value) { + if (openBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + open_ = value; + } else { + openBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + public Builder setOpen( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (openBuilder_ == null) { + open_ = builderForValue.build(); + } else { + openBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + public Builder mergeOpen(com.google.protobuf.BoolValue value) { + if (openBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + open_ != null && + open_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getOpenBuilder().mergeFrom(value); + } else { + open_ = value; + } + } else { + openBuilder_.mergeFrom(value); + } + if (open_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + public Builder clearOpen() { + bitField0_ = (bitField0_ & ~0x00000080); + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + public com.google.protobuf.BoolValue.Builder getOpenBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getOpenFieldBuilder().getBuilder(); + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + public com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder() { + if (openBuilder_ != null) { + return openBuilder_.getMessageOrBuilder(); + } else { + return open_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + } + /** + *
+     * Anyone can join open groups, otherwise only admins can accept members.
+     * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getOpenFieldBuilder() { + if (openBuilder_ == null) { + openBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getOpen(), + getParentForChildren(), + isClean()); + open_ = null; + } + return openBuilder_; + } + + private int edgeCount_ ; + /** + *
+     * The current count of all members in the group.
+     * 
+ * + * int32 edge_count = 9 [json_name = "edgeCount"]; + * @return The edgeCount. + */ + @java.lang.Override + public int getEdgeCount() { + return edgeCount_; + } + /** + *
+     * The current count of all members in the group.
+     * 
+ * + * int32 edge_count = 9 [json_name = "edgeCount"]; + * @param value The edgeCount to set. + * @return This builder for chaining. + */ + public Builder setEdgeCount(int value) { + + edgeCount_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The current count of all members in the group.
+     * 
+ * + * int32 edge_count = 9 [json_name = "edgeCount"]; + * @return This builder for chaining. + */ + public Builder clearEdgeCount() { + bitField0_ = (bitField0_ & ~0x00000100); + edgeCount_ = 0; + onChanged(); + return this; + } + + private int maxCount_ ; + /** + *
+     * The maximum number of members allowed.
+     * 
+ * + * int32 max_count = 10 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + /** + *
+     * The maximum number of members allowed.
+     * 
+ * + * int32 max_count = 10 [json_name = "maxCount"]; + * @param value The maxCount to set. + * @return This builder for chaining. + */ + public Builder setMaxCount(int value) { + + maxCount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The maximum number of members allowed.
+     * 
+ * + * int32 max_count = 10 [json_name = "maxCount"]; + * @return This builder for chaining. + */ + public Builder clearMaxCount() { + bitField0_ = (bitField0_ & ~0x00000200); + maxCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Group) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Group) + private static final com.heroiclabs.nakama.api.Group DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Group(); + } + + public static com.heroiclabs.nakama.api.Group getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Group parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Group getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/GroupList.java b/src/main/java/com/heroiclabs/nakama/api/GroupList.java new file mode 100644 index 00000000..f867e2c8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GroupList.java @@ -0,0 +1,983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * One or more groups returned from a listing operation.
+ * 
+ * + * Protobuf type {@code nakama.api.GroupList} + */ +public final class GroupList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.GroupList) + GroupListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GroupList.class.getName()); + } + // Use GroupList.newBuilder() to construct. + private GroupList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GroupList() { + groups_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GroupList.class, com.heroiclabs.nakama.api.GroupList.Builder.class); + } + + public static final int GROUPS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List groups_; + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + @java.lang.Override + public java.util.List getGroupsList() { + return groups_; + } + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + @java.lang.Override + public java.util.List + getGroupsOrBuilderList() { + return groups_; + } + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + @java.lang.Override + public int getGroupsCount() { + return groups_.size(); + } + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Group getGroups(int index) { + return groups_.get(index); + } + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.GroupOrBuilder getGroupsOrBuilder( + int index) { + return groups_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A cursor used to get the next page.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A cursor used to get the next page.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < groups_.size(); i++) { + output.writeMessage(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.GroupList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.GroupList other = (com.heroiclabs.nakama.api.GroupList) obj; + + if (!getGroupsList() + .equals(other.getGroupsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupsCount() > 0) { + hash = (37 * hash) + GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getGroupsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.GroupList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.GroupList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.GroupList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GroupList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.GroupList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * One or more groups returned from a listing operation.
+   * 
+ * + * Protobuf type {@code nakama.api.GroupList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.GroupList) + com.heroiclabs.nakama.api.GroupListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GroupList.class, com.heroiclabs.nakama.api.GroupList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.GroupList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + } else { + groups_ = null; + groupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.GroupList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupList build() { + com.heroiclabs.nakama.api.GroupList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupList buildPartial() { + com.heroiclabs.nakama.api.GroupList result = new com.heroiclabs.nakama.api.GroupList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.GroupList result) { + if (groupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + groups_ = java.util.Collections.unmodifiableList(groups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groups_ = groups_; + } else { + result.groups_ = groupsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.GroupList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.GroupList) { + return mergeFrom((com.heroiclabs.nakama.api.GroupList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.GroupList other) { + if (other == com.heroiclabs.nakama.api.GroupList.getDefaultInstance()) return this; + if (groupsBuilder_ == null) { + if (!other.groups_.isEmpty()) { + if (groups_.isEmpty()) { + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupsIsMutable(); + groups_.addAll(other.groups_); + } + onChanged(); + } + } else { + if (!other.groups_.isEmpty()) { + if (groupsBuilder_.isEmpty()) { + groupsBuilder_.dispose(); + groupsBuilder_ = null; + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + groupsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupsFieldBuilder() : null; + } else { + groupsBuilder_.addAllMessages(other.groups_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.Group m = + input.readMessage( + com.heroiclabs.nakama.api.Group.parser(), + extensionRegistry); + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(m); + } else { + groupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List groups_ = + java.util.Collections.emptyList(); + private void ensureGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groups_ = new java.util.ArrayList(groups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Group, com.heroiclabs.nakama.api.Group.Builder, com.heroiclabs.nakama.api.GroupOrBuilder> groupsBuilder_; + + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public java.util.List getGroupsList() { + if (groupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groups_); + } else { + return groupsBuilder_.getMessageList(); + } + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public int getGroupsCount() { + if (groupsBuilder_ == null) { + return groups_.size(); + } else { + return groupsBuilder_.getCount(); + } + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public com.heroiclabs.nakama.api.Group getGroups(int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); + } else { + return groupsBuilder_.getMessage(index); + } + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder setGroups( + int index, com.heroiclabs.nakama.api.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.set(index, value); + onChanged(); + } else { + groupsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder setGroups( + int index, com.heroiclabs.nakama.api.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.set(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder addGroups(com.heroiclabs.nakama.api.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(value); + onChanged(); + } else { + groupsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder addGroups( + int index, com.heroiclabs.nakama.api.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(index, value); + onChanged(); + } else { + groupsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder addGroups( + com.heroiclabs.nakama.api.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder addGroups( + int index, com.heroiclabs.nakama.api.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder addAllGroups( + java.lang.Iterable values) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groups_); + onChanged(); + } else { + groupsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder clearGroups() { + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupsBuilder_.clear(); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public Builder removeGroups(int index) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.remove(index); + onChanged(); + } else { + groupsBuilder_.remove(index); + } + return this; + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public com.heroiclabs.nakama.api.Group.Builder getGroupsBuilder( + int index) { + return getGroupsFieldBuilder().getBuilder(index); + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public com.heroiclabs.nakama.api.GroupOrBuilder getGroupsOrBuilder( + int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); } else { + return groupsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public java.util.List + getGroupsOrBuilderList() { + if (groupsBuilder_ != null) { + return groupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groups_); + } + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public com.heroiclabs.nakama.api.Group.Builder addGroupsBuilder() { + return getGroupsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.Group.getDefaultInstance()); + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public com.heroiclabs.nakama.api.Group.Builder addGroupsBuilder( + int index) { + return getGroupsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.Group.getDefaultInstance()); + } + /** + *
+     * One or more groups.
+     * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + public java.util.List + getGroupsBuilderList() { + return getGroupsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Group, com.heroiclabs.nakama.api.Group.Builder, com.heroiclabs.nakama.api.GroupOrBuilder> + getGroupsFieldBuilder() { + if (groupsBuilder_ == null) { + groupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Group, com.heroiclabs.nakama.api.Group.Builder, com.heroiclabs.nakama.api.GroupOrBuilder>( + groups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + groups_ = null; + } + return groupsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A cursor used to get the next page.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A cursor used to get the next page.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A cursor used to get the next page.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A cursor used to get the next page.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A cursor used to get the next page.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.GroupList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.GroupList) + private static final com.heroiclabs.nakama.api.GroupList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.GroupList(); + } + + public static com.heroiclabs.nakama.api.GroupList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/GroupListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/GroupListOrBuilder.java new file mode 100644 index 00000000..5042724b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GroupListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface GroupListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.GroupList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + java.util.List + getGroupsList(); + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + com.heroiclabs.nakama.api.Group getGroups(int index); + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + int getGroupsCount(); + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + java.util.List + getGroupsOrBuilderList(); + /** + *
+   * One or more groups.
+   * 
+ * + * repeated .nakama.api.Group groups = 1 [json_name = "groups"]; + */ + com.heroiclabs.nakama.api.GroupOrBuilder getGroupsOrBuilder( + int index); + + /** + *
+   * A cursor used to get the next page.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A cursor used to get the next page.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/GroupOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/GroupOrBuilder.java new file mode 100644 index 00000000..5e9f3f65 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GroupOrBuilder.java @@ -0,0 +1,252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface GroupOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Group) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The id of a group.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The id of a group.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The id of the user who created the group.
+   * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @return The creatorId. + */ + java.lang.String getCreatorId(); + /** + *
+   * The id of the user who created the group.
+   * 
+ * + * string creator_id = 2 [json_name = "creatorId"]; + * @return The bytes for creatorId. + */ + com.google.protobuf.ByteString + getCreatorIdBytes(); + + /** + *
+   * The unique name of the group.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The unique name of the group.
+   * 
+ * + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 4 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A description for the group.
+   * 
+ * + * string description = 4 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The langTag. + */ + java.lang.String getLangTag(); + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + com.google.protobuf.ByteString + getLangTagBytes(); + + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The metadata. + */ + java.lang.String getMetadata(); + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + com.google.protobuf.ByteString + getMetadataBytes(); + + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + java.lang.String getAvatarUrl(); + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 7 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + com.google.protobuf.ByteString + getAvatarUrlBytes(); + + /** + *
+   * Anyone can join open groups, otherwise only admins can accept members.
+   * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + * @return Whether the open field is set. + */ + boolean hasOpen(); + /** + *
+   * Anyone can join open groups, otherwise only admins can accept members.
+   * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + * @return The open. + */ + com.google.protobuf.BoolValue getOpen(); + /** + *
+   * Anyone can join open groups, otherwise only admins can accept members.
+   * 
+ * + * .google.protobuf.BoolValue open = 8 [json_name = "open"]; + */ + com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder(); + + /** + *
+   * The current count of all members in the group.
+   * 
+ * + * int32 edge_count = 9 [json_name = "edgeCount"]; + * @return The edgeCount. + */ + int getEdgeCount(); + + /** + *
+   * The maximum number of members allowed.
+   * 
+ * + * int32 max_count = 10 [json_name = "maxCount"]; + * @return The maxCount. + */ + int getMaxCount(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/GroupUserList.java b/src/main/java/com/heroiclabs/nakama/api/GroupUserList.java new file mode 100644 index 00000000..146c9685 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GroupUserList.java @@ -0,0 +1,2052 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of users belonging to a group, along with their role.
+ * 
+ * + * Protobuf type {@code nakama.api.GroupUserList} + */ +public final class GroupUserList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.GroupUserList) + GroupUserListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GroupUserList.class.getName()); + } + // Use GroupUserList.newBuilder() to construct. + private GroupUserList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GroupUserList() { + groupUsers_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GroupUserList.class, com.heroiclabs.nakama.api.GroupUserList.Builder.class); + } + + public interface GroupUserOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.GroupUserList.GroupUser) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + com.heroiclabs.nakama.api.User getUser(); + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder(); + + /** + *
+     * Their relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + boolean hasState(); + /** + *
+     * Their relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + com.google.protobuf.Int32Value getState(); + /** + *
+     * Their relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder(); + } + /** + *
+   * A single user-role pair.
+   * 
+ * + * Protobuf type {@code nakama.api.GroupUserList.GroupUser} + */ + public static final class GroupUser extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.GroupUserList.GroupUser) + GroupUserOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GroupUser.class.getName()); + } + // Use GroupUser.newBuilder() to construct. + private GroupUser(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GroupUser() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_GroupUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_GroupUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GroupUserList.GroupUser.class, com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder.class); + } + + /** + *
+     * The group role status.
+     * 
+ * + * Protobuf enum {@code nakama.api.GroupUserList.GroupUser.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * The user is a superadmin with full control of the group.
+       * 
+ * + * SUPERADMIN = 0; + */ + SUPERADMIN(0), + /** + *
+       * The user is an admin with additional privileges.
+       * 
+ * + * ADMIN = 1; + */ + ADMIN(1), + /** + *
+       * The user is a regular member.
+       * 
+ * + * MEMBER = 2; + */ + MEMBER(2), + /** + *
+       * The user has requested to join the group
+       * 
+ * + * JOIN_REQUEST = 3; + */ + JOIN_REQUEST(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + State.class.getName()); + } + /** + *
+       * The user is a superadmin with full control of the group.
+       * 
+ * + * SUPERADMIN = 0; + */ + public static final int SUPERADMIN_VALUE = 0; + /** + *
+       * The user is an admin with additional privileges.
+       * 
+ * + * ADMIN = 1; + */ + public static final int ADMIN_VALUE = 1; + /** + *
+       * The user is a regular member.
+       * 
+ * + * MEMBER = 2; + */ + public static final int MEMBER_VALUE = 2; + /** + *
+       * The user has requested to join the group
+       * 
+ * + * JOIN_REQUEST = 3; + */ + public static final int JOIN_REQUEST_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return SUPERADMIN; + case 1: return ADMIN; + case 2: return MEMBER; + case 3: return JOIN_REQUEST; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.api.GroupUserList.GroupUser.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.api.GroupUserList.GroupUser.State) + } + + private int bitField0_; + public static final int USER_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.User user_; + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.User getUser() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + /** + *
+     * User.
+     * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + + public static final int STATE_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value state_; + /** + *
+     * Their relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + @java.lang.Override + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Their relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getState() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + /** + *
+     * Their relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUser()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getState()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUser()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getState()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.GroupUserList.GroupUser)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.GroupUserList.GroupUser other = (com.heroiclabs.nakama.api.GroupUserList.GroupUser) obj; + + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (hasState() != other.hasState()) return false; + if (hasState()) { + if (!getState() + .equals(other.getState())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.GroupUserList.GroupUser prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A single user-role pair.
+     * 
+ * + * Protobuf type {@code nakama.api.GroupUserList.GroupUser} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.GroupUserList.GroupUser) + com.heroiclabs.nakama.api.GroupUserList.GroupUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_GroupUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_GroupUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GroupUserList.GroupUser.class, com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.GroupUserList.GroupUser.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getUserFieldBuilder(); + getStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_GroupUser_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList.GroupUser getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.GroupUserList.GroupUser.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList.GroupUser build() { + com.heroiclabs.nakama.api.GroupUserList.GroupUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList.GroupUser buildPartial() { + com.heroiclabs.nakama.api.GroupUserList.GroupUser result = new com.heroiclabs.nakama.api.GroupUserList.GroupUser(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.GroupUserList.GroupUser result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = stateBuilder_ == null + ? state_ + : stateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.GroupUserList.GroupUser) { + return mergeFrom((com.heroiclabs.nakama.api.GroupUserList.GroupUser)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.GroupUserList.GroupUser other) { + if (other == com.heroiclabs.nakama.api.GroupUserList.GroupUser.getDefaultInstance()) return this; + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.hasState()) { + mergeState(other.getState()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.User user_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> userBuilder_; + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + * @return The user. + */ + public com.heroiclabs.nakama.api.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder setUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder setUser( + com.heroiclabs.nakama.api.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder mergeUser(com.heroiclabs.nakama.api.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + user_ != null && + user_ != com.heroiclabs.nakama.api.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + if (user_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000001); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.User.Builder getUserBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + public com.heroiclabs.nakama.api.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + com.heroiclabs.nakama.api.User.getDefaultInstance() : user_; + } + } + /** + *
+       * User.
+       * 
+ * + * .nakama.api.User user = 1 [json_name = "user"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private com.google.protobuf.Int32Value state_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> stateBuilder_; + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + public com.google.protobuf.Int32Value getState() { + if (stateBuilder_ == null) { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } else { + return stateBuilder_.getMessage(); + } + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + } else { + stateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (stateBuilder_ == null) { + state_ = builderForValue.build(); + } else { + stateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder mergeState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + state_ != null && + state_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getStateBuilder().mergeFrom(value); + } else { + state_ = value; + } + } else { + stateBuilder_.mergeFrom(value); + } + if (state_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32Value.Builder getStateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStateFieldBuilder().getBuilder(); + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + if (stateBuilder_ != null) { + return stateBuilder_.getMessageOrBuilder(); + } else { + return state_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + } + /** + *
+       * Their relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getStateFieldBuilder() { + if (stateBuilder_ == null) { + stateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.GroupUserList.GroupUser) + } + + // @@protoc_insertion_point(class_scope:nakama.api.GroupUserList.GroupUser) + private static final com.heroiclabs.nakama.api.GroupUserList.GroupUser DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.GroupUserList.GroupUser(); + } + + public static com.heroiclabs.nakama.api.GroupUserList.GroupUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList.GroupUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int GROUP_USERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List groupUsers_; + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + @java.lang.Override + public java.util.List getGroupUsersList() { + return groupUsers_; + } + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + @java.lang.Override + public java.util.List + getGroupUsersOrBuilderList() { + return groupUsers_; + } + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + @java.lang.Override + public int getGroupUsersCount() { + return groupUsers_.size(); + } + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList.GroupUser getGroupUsers(int index) { + return groupUsers_.get(index); + } + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList.GroupUserOrBuilder getGroupUsersOrBuilder( + int index) { + return groupUsers_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < groupUsers_.size(); i++) { + output.writeMessage(1, groupUsers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupUsers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupUsers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.GroupUserList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.GroupUserList other = (com.heroiclabs.nakama.api.GroupUserList) obj; + + if (!getGroupUsersList() + .equals(other.getGroupUsersList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupUsersCount() > 0) { + hash = (37 * hash) + GROUP_USERS_FIELD_NUMBER; + hash = (53 * hash) + getGroupUsersList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.GroupUserList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.GroupUserList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.GroupUserList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.GroupUserList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of users belonging to a group, along with their role.
+   * 
+ * + * Protobuf type {@code nakama.api.GroupUserList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.GroupUserList) + com.heroiclabs.nakama.api.GroupUserListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.GroupUserList.class, com.heroiclabs.nakama.api.GroupUserList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.GroupUserList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (groupUsersBuilder_ == null) { + groupUsers_ = java.util.Collections.emptyList(); + } else { + groupUsers_ = null; + groupUsersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_GroupUserList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.GroupUserList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList build() { + com.heroiclabs.nakama.api.GroupUserList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList buildPartial() { + com.heroiclabs.nakama.api.GroupUserList result = new com.heroiclabs.nakama.api.GroupUserList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.GroupUserList result) { + if (groupUsersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + groupUsers_ = java.util.Collections.unmodifiableList(groupUsers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupUsers_ = groupUsers_; + } else { + result.groupUsers_ = groupUsersBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.GroupUserList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.GroupUserList) { + return mergeFrom((com.heroiclabs.nakama.api.GroupUserList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.GroupUserList other) { + if (other == com.heroiclabs.nakama.api.GroupUserList.getDefaultInstance()) return this; + if (groupUsersBuilder_ == null) { + if (!other.groupUsers_.isEmpty()) { + if (groupUsers_.isEmpty()) { + groupUsers_ = other.groupUsers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupUsersIsMutable(); + groupUsers_.addAll(other.groupUsers_); + } + onChanged(); + } + } else { + if (!other.groupUsers_.isEmpty()) { + if (groupUsersBuilder_.isEmpty()) { + groupUsersBuilder_.dispose(); + groupUsersBuilder_ = null; + groupUsers_ = other.groupUsers_; + bitField0_ = (bitField0_ & ~0x00000001); + groupUsersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupUsersFieldBuilder() : null; + } else { + groupUsersBuilder_.addAllMessages(other.groupUsers_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.GroupUserList.GroupUser m = + input.readMessage( + com.heroiclabs.nakama.api.GroupUserList.GroupUser.parser(), + extensionRegistry); + if (groupUsersBuilder_ == null) { + ensureGroupUsersIsMutable(); + groupUsers_.add(m); + } else { + groupUsersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List groupUsers_ = + java.util.Collections.emptyList(); + private void ensureGroupUsersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groupUsers_ = new java.util.ArrayList(groupUsers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.GroupUserList.GroupUser, com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder, com.heroiclabs.nakama.api.GroupUserList.GroupUserOrBuilder> groupUsersBuilder_; + + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public java.util.List getGroupUsersList() { + if (groupUsersBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupUsers_); + } else { + return groupUsersBuilder_.getMessageList(); + } + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public int getGroupUsersCount() { + if (groupUsersBuilder_ == null) { + return groupUsers_.size(); + } else { + return groupUsersBuilder_.getCount(); + } + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public com.heroiclabs.nakama.api.GroupUserList.GroupUser getGroupUsers(int index) { + if (groupUsersBuilder_ == null) { + return groupUsers_.get(index); + } else { + return groupUsersBuilder_.getMessage(index); + } + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder setGroupUsers( + int index, com.heroiclabs.nakama.api.GroupUserList.GroupUser value) { + if (groupUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupUsersIsMutable(); + groupUsers_.set(index, value); + onChanged(); + } else { + groupUsersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder setGroupUsers( + int index, com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder builderForValue) { + if (groupUsersBuilder_ == null) { + ensureGroupUsersIsMutable(); + groupUsers_.set(index, builderForValue.build()); + onChanged(); + } else { + groupUsersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder addGroupUsers(com.heroiclabs.nakama.api.GroupUserList.GroupUser value) { + if (groupUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupUsersIsMutable(); + groupUsers_.add(value); + onChanged(); + } else { + groupUsersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder addGroupUsers( + int index, com.heroiclabs.nakama.api.GroupUserList.GroupUser value) { + if (groupUsersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupUsersIsMutable(); + groupUsers_.add(index, value); + onChanged(); + } else { + groupUsersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder addGroupUsers( + com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder builderForValue) { + if (groupUsersBuilder_ == null) { + ensureGroupUsersIsMutable(); + groupUsers_.add(builderForValue.build()); + onChanged(); + } else { + groupUsersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder addGroupUsers( + int index, com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder builderForValue) { + if (groupUsersBuilder_ == null) { + ensureGroupUsersIsMutable(); + groupUsers_.add(index, builderForValue.build()); + onChanged(); + } else { + groupUsersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder addAllGroupUsers( + java.lang.Iterable values) { + if (groupUsersBuilder_ == null) { + ensureGroupUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupUsers_); + onChanged(); + } else { + groupUsersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder clearGroupUsers() { + if (groupUsersBuilder_ == null) { + groupUsers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupUsersBuilder_.clear(); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public Builder removeGroupUsers(int index) { + if (groupUsersBuilder_ == null) { + ensureGroupUsersIsMutable(); + groupUsers_.remove(index); + onChanged(); + } else { + groupUsersBuilder_.remove(index); + } + return this; + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder getGroupUsersBuilder( + int index) { + return getGroupUsersFieldBuilder().getBuilder(index); + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public com.heroiclabs.nakama.api.GroupUserList.GroupUserOrBuilder getGroupUsersOrBuilder( + int index) { + if (groupUsersBuilder_ == null) { + return groupUsers_.get(index); } else { + return groupUsersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public java.util.List + getGroupUsersOrBuilderList() { + if (groupUsersBuilder_ != null) { + return groupUsersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupUsers_); + } + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder addGroupUsersBuilder() { + return getGroupUsersFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.GroupUserList.GroupUser.getDefaultInstance()); + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder addGroupUsersBuilder( + int index) { + return getGroupUsersFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.GroupUserList.GroupUser.getDefaultInstance()); + } + /** + *
+     * User-role pairs for a group.
+     * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + public java.util.List + getGroupUsersBuilderList() { + return getGroupUsersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.GroupUserList.GroupUser, com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder, com.heroiclabs.nakama.api.GroupUserList.GroupUserOrBuilder> + getGroupUsersFieldBuilder() { + if (groupUsersBuilder_ == null) { + groupUsersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.GroupUserList.GroupUser, com.heroiclabs.nakama.api.GroupUserList.GroupUser.Builder, com.heroiclabs.nakama.api.GroupUserList.GroupUserOrBuilder>( + groupUsers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + groupUsers_ = null; + } + return groupUsersBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.GroupUserList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.GroupUserList) + private static final com.heroiclabs.nakama.api.GroupUserList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.GroupUserList(); + } + + public static com.heroiclabs.nakama.api.GroupUserList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupUserList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.GroupUserList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/GroupUserListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/GroupUserListOrBuilder.java new file mode 100644 index 00000000..04bde8ef --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/GroupUserListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface GroupUserListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.GroupUserList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + java.util.List + getGroupUsersList(); + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + com.heroiclabs.nakama.api.GroupUserList.GroupUser getGroupUsers(int index); + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + int getGroupUsersCount(); + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + java.util.List + getGroupUsersOrBuilderList(); + /** + *
+   * User-role pairs for a group.
+   * 
+ * + * repeated .nakama.api.GroupUserList.GroupUser group_users = 1 [json_name = "groupUsers"]; + */ + com.heroiclabs.nakama.api.GroupUserList.GroupUserOrBuilder getGroupUsersOrBuilder( + int index); + + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequest.java new file mode 100644 index 00000000..cb85e8c7 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequest.java @@ -0,0 +1,847 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Import Facebook friends into the current user's account.
+ * 
+ * + * Protobuf type {@code nakama.api.ImportFacebookFriendsRequest} + */ +public final class ImportFacebookFriendsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ImportFacebookFriendsRequest) + ImportFacebookFriendsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ImportFacebookFriendsRequest.class.getName()); + } + // Use ImportFacebookFriendsRequest.newBuilder() to construct. + private ImportFacebookFriendsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImportFacebookFriendsRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportFacebookFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportFacebookFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.class, com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountFacebook account_; + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebook getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + + public static final int RESET_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue reset_; + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return Whether the reset field is set. + */ + @java.lang.Override + public boolean hasReset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return The reset. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getReset() { + return reset_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getResetOrBuilder() { + return reset_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getReset()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReset()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ImportFacebookFriendsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest other = (com.heroiclabs.nakama.api.ImportFacebookFriendsRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasReset() != other.hasReset()) return false; + if (hasReset()) { + if (!getReset() + .equals(other.getReset())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasReset()) { + hash = (37 * hash) + RESET_FIELD_NUMBER; + hash = (53 * hash) + getReset().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ImportFacebookFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Import Facebook friends into the current user's account.
+   * 
+ * + * Protobuf type {@code nakama.api.ImportFacebookFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ImportFacebookFriendsRequest) + com.heroiclabs.nakama.api.ImportFacebookFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportFacebookFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportFacebookFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.class, com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getResetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + reset_ = null; + if (resetBuilder_ != null) { + resetBuilder_.dispose(); + resetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportFacebookFriendsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportFacebookFriendsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportFacebookFriendsRequest build() { + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportFacebookFriendsRequest buildPartial() { + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest result = new com.heroiclabs.nakama.api.ImportFacebookFriendsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ImportFacebookFriendsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reset_ = resetBuilder_ == null + ? reset_ + : resetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ImportFacebookFriendsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ImportFacebookFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ImportFacebookFriendsRequest other) { + if (other == com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasReset()) { + mergeReset(other.getReset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getResetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountFacebook account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder> accountBuilder_; + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountFacebook getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountFacebook value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebook.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue reset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> resetBuilder_; + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return Whether the reset field is set. + */ + public boolean hasReset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return The reset. + */ + public com.google.protobuf.BoolValue getReset() { + if (resetBuilder_ == null) { + return reset_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } else { + return resetBuilder_.getMessage(); + } + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder setReset(com.google.protobuf.BoolValue value) { + if (resetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reset_ = value; + } else { + resetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder setReset( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (resetBuilder_ == null) { + reset_ = builderForValue.build(); + } else { + resetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder mergeReset(com.google.protobuf.BoolValue value) { + if (resetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + reset_ != null && + reset_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getResetBuilder().mergeFrom(value); + } else { + reset_ = value; + } + } else { + resetBuilder_.mergeFrom(value); + } + if (reset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder clearReset() { + bitField0_ = (bitField0_ & ~0x00000002); + reset_ = null; + if (resetBuilder_ != null) { + resetBuilder_.dispose(); + resetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public com.google.protobuf.BoolValue.Builder getResetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResetFieldBuilder().getBuilder(); + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public com.google.protobuf.BoolValueOrBuilder getResetOrBuilder() { + if (resetBuilder_ != null) { + return resetBuilder_.getMessageOrBuilder(); + } else { + return reset_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getResetFieldBuilder() { + if (resetBuilder_ == null) { + resetBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getReset(), + getParentForChildren(), + isClean()); + reset_ = null; + } + return resetBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ImportFacebookFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ImportFacebookFriendsRequest) + private static final com.heroiclabs.nakama.api.ImportFacebookFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ImportFacebookFriendsRequest(); + } + + public static com.heroiclabs.nakama.api.ImportFacebookFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportFacebookFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportFacebookFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequestOrBuilder.java new file mode 100644 index 00000000..5ef32ebc --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ImportFacebookFriendsRequestOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ImportFacebookFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ImportFacebookFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountFacebook getAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder(); + + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return Whether the reset field is set. + */ + boolean hasReset(); + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return The reset. + */ + com.google.protobuf.BoolValue getReset(); + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + com.google.protobuf.BoolValueOrBuilder getResetOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequest.java new file mode 100644 index 00000000..1b8cb1da --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequest.java @@ -0,0 +1,847 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Import Facebook friends into the current user's account.
+ * 
+ * + * Protobuf type {@code nakama.api.ImportSteamFriendsRequest} + */ +public final class ImportSteamFriendsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ImportSteamFriendsRequest) + ImportSteamFriendsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ImportSteamFriendsRequest.class.getName()); + } + // Use ImportSteamFriendsRequest.newBuilder() to construct. + private ImportSteamFriendsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImportSteamFriendsRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportSteamFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportSteamFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ImportSteamFriendsRequest.class, com.heroiclabs.nakama.api.ImportSteamFriendsRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountSteam account_; + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteam getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + + public static final int RESET_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue reset_; + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return Whether the reset field is set. + */ + @java.lang.Override + public boolean hasReset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return The reset. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getReset() { + return reset_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getResetOrBuilder() { + return reset_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getReset()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReset()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ImportSteamFriendsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ImportSteamFriendsRequest other = (com.heroiclabs.nakama.api.ImportSteamFriendsRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasReset() != other.hasReset()) return false; + if (hasReset()) { + if (!getReset() + .equals(other.getReset())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasReset()) { + hash = (37 * hash) + RESET_FIELD_NUMBER; + hash = (53 * hash) + getReset().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ImportSteamFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Import Facebook friends into the current user's account.
+   * 
+ * + * Protobuf type {@code nakama.api.ImportSteamFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ImportSteamFriendsRequest) + com.heroiclabs.nakama.api.ImportSteamFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportSteamFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportSteamFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ImportSteamFriendsRequest.class, com.heroiclabs.nakama.api.ImportSteamFriendsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ImportSteamFriendsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getResetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + reset_ = null; + if (resetBuilder_ != null) { + resetBuilder_.dispose(); + resetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ImportSteamFriendsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportSteamFriendsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ImportSteamFriendsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportSteamFriendsRequest build() { + com.heroiclabs.nakama.api.ImportSteamFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportSteamFriendsRequest buildPartial() { + com.heroiclabs.nakama.api.ImportSteamFriendsRequest result = new com.heroiclabs.nakama.api.ImportSteamFriendsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ImportSteamFriendsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reset_ = resetBuilder_ == null + ? reset_ + : resetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ImportSteamFriendsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ImportSteamFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ImportSteamFriendsRequest other) { + if (other == com.heroiclabs.nakama.api.ImportSteamFriendsRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasReset()) { + mergeReset(other.getReset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getResetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountSteam account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder> accountBuilder_; + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountSteam getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountSteam value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountSteam.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountSteam value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountSteam.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue reset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> resetBuilder_; + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return Whether the reset field is set. + */ + public boolean hasReset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return The reset. + */ + public com.google.protobuf.BoolValue getReset() { + if (resetBuilder_ == null) { + return reset_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } else { + return resetBuilder_.getMessage(); + } + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder setReset(com.google.protobuf.BoolValue value) { + if (resetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reset_ = value; + } else { + resetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder setReset( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (resetBuilder_ == null) { + reset_ = builderForValue.build(); + } else { + resetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder mergeReset(com.google.protobuf.BoolValue value) { + if (resetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + reset_ != null && + reset_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getResetBuilder().mergeFrom(value); + } else { + reset_ = value; + } + } else { + resetBuilder_.mergeFrom(value); + } + if (reset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public Builder clearReset() { + bitField0_ = (bitField0_ & ~0x00000002); + reset_ = null; + if (resetBuilder_ != null) { + resetBuilder_.dispose(); + resetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public com.google.protobuf.BoolValue.Builder getResetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResetFieldBuilder().getBuilder(); + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + public com.google.protobuf.BoolValueOrBuilder getResetOrBuilder() { + if (resetBuilder_ != null) { + return resetBuilder_.getMessageOrBuilder(); + } else { + return reset_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : reset_; + } + } + /** + *
+     * Reset the current user's friends list.
+     * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getResetFieldBuilder() { + if (resetBuilder_ == null) { + resetBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getReset(), + getParentForChildren(), + isClean()); + reset_ = null; + } + return resetBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ImportSteamFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ImportSteamFriendsRequest) + private static final com.heroiclabs.nakama.api.ImportSteamFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ImportSteamFriendsRequest(); + } + + public static com.heroiclabs.nakama.api.ImportSteamFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportSteamFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ImportSteamFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequestOrBuilder.java new file mode 100644 index 00000000..87ef8508 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ImportSteamFriendsRequestOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ImportSteamFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ImportSteamFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountSteam getAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder(); + + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return Whether the reset field is set. + */ + boolean hasReset(); + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + * @return The reset. + */ + com.google.protobuf.BoolValue getReset(); + /** + *
+   * Reset the current user's friends list.
+   * 
+ * + * .google.protobuf.BoolValue reset = 2 [json_name = "reset"]; + */ + com.google.protobuf.BoolValueOrBuilder getResetOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/JoinGroupRequest.java b/src/main/java/com/heroiclabs/nakama/api/JoinGroupRequest.java new file mode 100644 index 00000000..44407b72 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/JoinGroupRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Immediately join an open group, or request to join a closed one.
+ * 
+ * + * Protobuf type {@code nakama.api.JoinGroupRequest} + */ +public final class JoinGroupRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.JoinGroupRequest) + JoinGroupRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + JoinGroupRequest.class.getName()); + } + // Use JoinGroupRequest.newBuilder() to construct. + private JoinGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private JoinGroupRequest() { + groupId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.JoinGroupRequest.class, com.heroiclabs.nakama.api.JoinGroupRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group ID to join. The group must already exist.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group ID to join. The group must already exist.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.JoinGroupRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.JoinGroupRequest other = (com.heroiclabs.nakama.api.JoinGroupRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.JoinGroupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.JoinGroupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.JoinGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.JoinGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Immediately join an open group, or request to join a closed one.
+   * 
+ * + * Protobuf type {@code nakama.api.JoinGroupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.JoinGroupRequest) + com.heroiclabs.nakama.api.JoinGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.JoinGroupRequest.class, com.heroiclabs.nakama.api.JoinGroupRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.JoinGroupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinGroupRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinGroupRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.JoinGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinGroupRequest build() { + com.heroiclabs.nakama.api.JoinGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinGroupRequest buildPartial() { + com.heroiclabs.nakama.api.JoinGroupRequest result = new com.heroiclabs.nakama.api.JoinGroupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.JoinGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.JoinGroupRequest) { + return mergeFrom((com.heroiclabs.nakama.api.JoinGroupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.JoinGroupRequest other) { + if (other == com.heroiclabs.nakama.api.JoinGroupRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group ID to join. The group must already exist.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group ID to join. The group must already exist.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group ID to join. The group must already exist.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group ID to join. The group must already exist.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group ID to join. The group must already exist.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.JoinGroupRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.JoinGroupRequest) + private static final com.heroiclabs.nakama.api.JoinGroupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.JoinGroupRequest(); + } + + public static com.heroiclabs.nakama.api.JoinGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JoinGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/JoinGroupRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/JoinGroupRequestOrBuilder.java new file mode 100644 index 00000000..a97f6afb --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/JoinGroupRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface JoinGroupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.JoinGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group ID to join. The group must already exist.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group ID to join. The group must already exist.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequest.java b/src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequest.java new file mode 100644 index 00000000..a771d9b6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * The request to join a tournament.
+ * 
+ * + * Protobuf type {@code nakama.api.JoinTournamentRequest} + */ +public final class JoinTournamentRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.JoinTournamentRequest) + JoinTournamentRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + JoinTournamentRequest.class.getName()); + } + // Use JoinTournamentRequest.newBuilder() to construct. + private JoinTournamentRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private JoinTournamentRequest() { + tournamentId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinTournamentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinTournamentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.JoinTournamentRequest.class, com.heroiclabs.nakama.api.JoinTournamentRequest.Builder.class); + } + + public static final int TOURNAMENT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object tournamentId_ = ""; + /** + *
+   * The ID of the tournament to join. The tournament must already exist.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + @java.lang.Override + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } + } + /** + *
+   * The ID of the tournament to join. The tournament must already exist.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tournamentId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tournamentId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.JoinTournamentRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.JoinTournamentRequest other = (com.heroiclabs.nakama.api.JoinTournamentRequest) obj; + + if (!getTournamentId() + .equals(other.getTournamentId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOURNAMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTournamentId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.JoinTournamentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.JoinTournamentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request to join a tournament.
+   * 
+ * + * Protobuf type {@code nakama.api.JoinTournamentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.JoinTournamentRequest) + com.heroiclabs.nakama.api.JoinTournamentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinTournamentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinTournamentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.JoinTournamentRequest.class, com.heroiclabs.nakama.api.JoinTournamentRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.JoinTournamentRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tournamentId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_JoinTournamentRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinTournamentRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.JoinTournamentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinTournamentRequest build() { + com.heroiclabs.nakama.api.JoinTournamentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinTournamentRequest buildPartial() { + com.heroiclabs.nakama.api.JoinTournamentRequest result = new com.heroiclabs.nakama.api.JoinTournamentRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.JoinTournamentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tournamentId_ = tournamentId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.JoinTournamentRequest) { + return mergeFrom((com.heroiclabs.nakama.api.JoinTournamentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.JoinTournamentRequest other) { + if (other == com.heroiclabs.nakama.api.JoinTournamentRequest.getDefaultInstance()) return this; + if (!other.getTournamentId().isEmpty()) { + tournamentId_ = other.tournamentId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tournamentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object tournamentId_ = ""; + /** + *
+     * The ID of the tournament to join. The tournament must already exist.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the tournament to join. The tournament must already exist.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the tournament to join. The tournament must already exist.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to join. The tournament must already exist.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return This builder for chaining. + */ + public Builder clearTournamentId() { + tournamentId_ = getDefaultInstance().getTournamentId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to join. The tournament must already exist.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The bytes for tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.JoinTournamentRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.JoinTournamentRequest) + private static final com.heroiclabs.nakama.api.JoinTournamentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.JoinTournamentRequest(); + } + + public static com.heroiclabs.nakama.api.JoinTournamentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JoinTournamentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.JoinTournamentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequestOrBuilder.java new file mode 100644 index 00000000..08022b55 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/JoinTournamentRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface JoinTournamentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.JoinTournamentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the tournament to join. The tournament must already exist.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + java.lang.String getTournamentId(); + /** + *
+   * The ID of the tournament to join. The tournament must already exist.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + com.google.protobuf.ByteString + getTournamentIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequest.java b/src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequest.java new file mode 100644 index 00000000..4a9b0f2b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Kick a set of users from a group.
+ * 
+ * + * Protobuf type {@code nakama.api.KickGroupUsersRequest} + */ +public final class KickGroupUsersRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.KickGroupUsersRequest) + KickGroupUsersRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + KickGroupUsersRequest.class.getName()); + } + // Use KickGroupUsersRequest.newBuilder() to construct. + private KickGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private KickGroupUsersRequest() { + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_KickGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_KickGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.KickGroupUsersRequest.class, com.heroiclabs.nakama.api.KickGroupUsersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group ID to kick from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group ID to kick from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + return userIds_; + } + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + for (int i = 0; i < userIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, userIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < userIds_.size(); i++) { + dataSize += computeStringSizeNoTag(userIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.KickGroupUsersRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.KickGroupUsersRequest other = (com.heroiclabs.nakama.api.KickGroupUsersRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdsList() + .equals(other.getUserIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getUserIdsCount() > 0) { + hash = (37 * hash) + USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUserIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.KickGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.KickGroupUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Kick a set of users from a group.
+   * 
+ * + * Protobuf type {@code nakama.api.KickGroupUsersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.KickGroupUsersRequest) + com.heroiclabs.nakama.api.KickGroupUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_KickGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_KickGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.KickGroupUsersRequest.class, com.heroiclabs.nakama.api.KickGroupUsersRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.KickGroupUsersRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_KickGroupUsersRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.KickGroupUsersRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.KickGroupUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.KickGroupUsersRequest build() { + com.heroiclabs.nakama.api.KickGroupUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.KickGroupUsersRequest buildPartial() { + com.heroiclabs.nakama.api.KickGroupUsersRequest result = new com.heroiclabs.nakama.api.KickGroupUsersRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.KickGroupUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + userIds_.makeImmutable(); + result.userIds_ = userIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.KickGroupUsersRequest) { + return mergeFrom((com.heroiclabs.nakama.api.KickGroupUsersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.KickGroupUsersRequest other) { + if (other == com.heroiclabs.nakama.api.KickGroupUsersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.userIds_.isEmpty()) { + if (userIds_.isEmpty()) { + userIds_ = other.userIds_; + bitField0_ |= 0x00000002; + } else { + ensureUserIdsIsMutable(); + userIds_.addAll(other.userIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserIdsIsMutable(); + userIds_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group ID to kick from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group ID to kick from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group ID to kick from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group ID to kick from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group ID to kick from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUserIdsIsMutable() { + if (!userIds_.isModifiable()) { + userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + userIds_.makeImmutable(); + return userIds_; + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index to set the value at. + * @param value The userIds to set. + * @return This builder for chaining. + */ + public Builder setUserIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param values The userIds to add. + * @return This builder for chaining. + */ + public Builder addAllUserIds( + java.lang.Iterable values) { + ensureUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return This builder for chaining. + */ + public Builder clearUserIds() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The users to kick.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The bytes of the userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.KickGroupUsersRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.KickGroupUsersRequest) + private static final com.heroiclabs.nakama.api.KickGroupUsersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.KickGroupUsersRequest(); + } + + public static com.heroiclabs.nakama.api.KickGroupUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KickGroupUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.KickGroupUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequestOrBuilder.java new file mode 100644 index 00000000..b82d0b9f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/KickGroupUsersRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface KickGroupUsersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.KickGroupUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group ID to kick from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group ID to kick from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + java.util.List + getUserIdsList(); + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + int getUserIdsCount(); + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + java.lang.String getUserIds(int index); + /** + *
+   * The users to kick.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + com.google.protobuf.ByteString + getUserIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Leaderboard.java b/src/main/java/com/heroiclabs/nakama/api/Leaderboard.java new file mode 100644 index 00000000..55b3cecc --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Leaderboard.java @@ -0,0 +1,1393 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A leaderboard on the server.
+ * 
+ * + * Protobuf type {@code nakama.api.Leaderboard} + */ +public final class Leaderboard extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Leaderboard) + LeaderboardOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Leaderboard.class.getName()); + } + // Use Leaderboard.newBuilder() to construct. + private Leaderboard(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Leaderboard() { + id_ = ""; + operator_ = 0; + metadata_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Leaderboard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Leaderboard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Leaderboard.class, com.heroiclabs.nakama.api.Leaderboard.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The ID of the leaderboard.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The ID of the leaderboard.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SORT_ORDER_FIELD_NUMBER = 2; + private int sortOrder_ = 0; + /** + *
+   * ASC(0) or DESC(1) sort mode of scores in the leaderboard.
+   * 
+ * + * uint32 sort_order = 2 [json_name = "sortOrder"]; + * @return The sortOrder. + */ + @java.lang.Override + public int getSortOrder() { + return sortOrder_; + } + + public static final int OPERATOR_FIELD_NUMBER = 3; + private int operator_ = 0; + /** + *
+   * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+   * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+   * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+   * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + + public static final int PREV_RESET_FIELD_NUMBER = 4; + private int prevReset_ = 0; + /** + *
+   * The UNIX time when the leaderboard was previously reset. A computed value.
+   * 
+ * + * uint32 prev_reset = 4 [json_name = "prevReset"]; + * @return The prevReset. + */ + @java.lang.Override + public int getPrevReset() { + return prevReset_; + } + + public static final int NEXT_RESET_FIELD_NUMBER = 5; + private int nextReset_ = 0; + /** + *
+   * The UNIX time when the leaderboard is next playable. A computed value.
+   * 
+ * + * uint32 next_reset = 5 [json_name = "nextReset"]; + * @return The nextReset. + */ + @java.lang.Override + public int getNextReset() { + return nextReset_; + } + + public static final int METADATA_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object metadata_ = ""; + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } + } + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int AUTHORITATIVE_FIELD_NUMBER = 8; + private boolean authoritative_ = false; + /** + *
+   * Whether the leaderboard was created authoritatively or not.
+   * 
+ * + * bool authoritative = 8 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (sortOrder_ != 0) { + output.writeUInt32(2, sortOrder_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + output.writeEnum(3, operator_); + } + if (prevReset_ != 0) { + output.writeUInt32(4, prevReset_); + } + if (nextReset_ != 0) { + output.writeUInt32(5, nextReset_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, metadata_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (authoritative_ != false) { + output.writeBool(8, authoritative_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (sortOrder_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, sortOrder_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, operator_); + } + if (prevReset_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, prevReset_); + } + if (nextReset_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, nextReset_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, metadata_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getCreateTime()); + } + if (authoritative_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, authoritative_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Leaderboard)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Leaderboard other = (com.heroiclabs.nakama.api.Leaderboard) obj; + + if (!getId() + .equals(other.getId())) return false; + if (getSortOrder() + != other.getSortOrder()) return false; + if (operator_ != other.operator_) return false; + if (getPrevReset() + != other.getPrevReset()) return false; + if (getNextReset() + != other.getNextReset()) return false; + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (getAuthoritative() + != other.getAuthoritative()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + SORT_ORDER_FIELD_NUMBER; + hash = (53 * hash) + getSortOrder(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + operator_; + hash = (37 * hash) + PREV_RESET_FIELD_NUMBER; + hash = (53 * hash) + getPrevReset(); + hash = (37 * hash) + NEXT_RESET_FIELD_NUMBER; + hash = (53 * hash) + getNextReset(); + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + AUTHORITATIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAuthoritative()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Leaderboard parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Leaderboard parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Leaderboard parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Leaderboard prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A leaderboard on the server.
+   * 
+ * + * Protobuf type {@code nakama.api.Leaderboard} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Leaderboard) + com.heroiclabs.nakama.api.LeaderboardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Leaderboard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Leaderboard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Leaderboard.class, com.heroiclabs.nakama.api.Leaderboard.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Leaderboard.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + sortOrder_ = 0; + operator_ = 0; + prevReset_ = 0; + nextReset_ = 0; + metadata_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + authoritative_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Leaderboard_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Leaderboard getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Leaderboard.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Leaderboard build() { + com.heroiclabs.nakama.api.Leaderboard result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Leaderboard buildPartial() { + com.heroiclabs.nakama.api.Leaderboard result = new com.heroiclabs.nakama.api.Leaderboard(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Leaderboard result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sortOrder_ = sortOrder_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.operator_ = operator_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.prevReset_ = prevReset_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nextReset_ = nextReset_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.metadata_ = metadata_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.authoritative_ = authoritative_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Leaderboard) { + return mergeFrom((com.heroiclabs.nakama.api.Leaderboard)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Leaderboard other) { + if (other == com.heroiclabs.nakama.api.Leaderboard.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSortOrder() != 0) { + setSortOrder(other.getSortOrder()); + } + if (other.operator_ != 0) { + setOperatorValue(other.getOperatorValue()); + } + if (other.getPrevReset() != 0) { + setPrevReset(other.getPrevReset()); + } + if (other.getNextReset() != 0) { + setNextReset(other.getNextReset()); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.getAuthoritative() != false) { + setAuthoritative(other.getAuthoritative()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + sortOrder_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + operator_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + prevReset_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + nextReset_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + authoritative_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The ID of the leaderboard.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the leaderboard.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the leaderboard.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int sortOrder_ ; + /** + *
+     * ASC(0) or DESC(1) sort mode of scores in the leaderboard.
+     * 
+ * + * uint32 sort_order = 2 [json_name = "sortOrder"]; + * @return The sortOrder. + */ + @java.lang.Override + public int getSortOrder() { + return sortOrder_; + } + /** + *
+     * ASC(0) or DESC(1) sort mode of scores in the leaderboard.
+     * 
+ * + * uint32 sort_order = 2 [json_name = "sortOrder"]; + * @param value The sortOrder to set. + * @return This builder for chaining. + */ + public Builder setSortOrder(int value) { + + sortOrder_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * ASC(0) or DESC(1) sort mode of scores in the leaderboard.
+     * 
+ * + * uint32 sort_order = 2 [json_name = "sortOrder"]; + * @return This builder for chaining. + */ + public Builder clearSortOrder() { + bitField0_ = (bitField0_ & ~0x00000002); + sortOrder_ = 0; + onChanged(); + return this; + } + + private int operator_ = 0; + /** + *
+     * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+     * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+     * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+     * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @param value The enum numeric value on the wire for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorValue(int value) { + operator_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+     * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + /** + *
+     * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+     * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(com.heroiclabs.nakama.api.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + operator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+     * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @return This builder for chaining. + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000004); + operator_ = 0; + onChanged(); + return this; + } + + private int prevReset_ ; + /** + *
+     * The UNIX time when the leaderboard was previously reset. A computed value.
+     * 
+ * + * uint32 prev_reset = 4 [json_name = "prevReset"]; + * @return The prevReset. + */ + @java.lang.Override + public int getPrevReset() { + return prevReset_; + } + /** + *
+     * The UNIX time when the leaderboard was previously reset. A computed value.
+     * 
+ * + * uint32 prev_reset = 4 [json_name = "prevReset"]; + * @param value The prevReset to set. + * @return This builder for chaining. + */ + public Builder setPrevReset(int value) { + + prevReset_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The UNIX time when the leaderboard was previously reset. A computed value.
+     * 
+ * + * uint32 prev_reset = 4 [json_name = "prevReset"]; + * @return This builder for chaining. + */ + public Builder clearPrevReset() { + bitField0_ = (bitField0_ & ~0x00000008); + prevReset_ = 0; + onChanged(); + return this; + } + + private int nextReset_ ; + /** + *
+     * The UNIX time when the leaderboard is next playable. A computed value.
+     * 
+ * + * uint32 next_reset = 5 [json_name = "nextReset"]; + * @return The nextReset. + */ + @java.lang.Override + public int getNextReset() { + return nextReset_; + } + /** + *
+     * The UNIX time when the leaderboard is next playable. A computed value.
+     * 
+ * + * uint32 next_reset = 5 [json_name = "nextReset"]; + * @param value The nextReset to set. + * @return This builder for chaining. + */ + public Builder setNextReset(int value) { + + nextReset_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The UNIX time when the leaderboard is next playable. A computed value.
+     * 
+ * + * uint32 next_reset = 5 [json_name = "nextReset"]; + * @return This builder for chaining. + */ + public Builder clearNextReset() { + bitField0_ = (bitField0_ & ~0x00000010); + nextReset_ = 0; + onChanged(); + return this; + } + + private java.lang.Object metadata_ = ""; + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The metadata. + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @param value The metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadata_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return This builder for chaining. + */ + public Builder clearMetadata() { + metadata_ = getDefaultInstance().getMetadata(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @param value The bytes for metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadata_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private boolean authoritative_ ; + /** + *
+     * Whether the leaderboard was created authoritatively or not.
+     * 
+ * + * bool authoritative = 8 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + /** + *
+     * Whether the leaderboard was created authoritatively or not.
+     * 
+ * + * bool authoritative = 8 [json_name = "authoritative"]; + * @param value The authoritative to set. + * @return This builder for chaining. + */ + public Builder setAuthoritative(boolean value) { + + authoritative_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Whether the leaderboard was created authoritatively or not.
+     * 
+ * + * bool authoritative = 8 [json_name = "authoritative"]; + * @return This builder for chaining. + */ + public Builder clearAuthoritative() { + bitField0_ = (bitField0_ & ~0x00000080); + authoritative_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Leaderboard) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Leaderboard) + private static final com.heroiclabs.nakama.api.Leaderboard DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Leaderboard(); + } + + public static com.heroiclabs.nakama.api.Leaderboard getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Leaderboard parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Leaderboard getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaderboardList.java b/src/main/java/com/heroiclabs/nakama/api/LeaderboardList.java new file mode 100644 index 00000000..c44df375 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaderboardList.java @@ -0,0 +1,983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of leaderboards
+ * 
+ * + * Protobuf type {@code nakama.api.LeaderboardList} + */ +public final class LeaderboardList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.LeaderboardList) + LeaderboardListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LeaderboardList.class.getName()); + } + // Use LeaderboardList.newBuilder() to construct. + private LeaderboardList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LeaderboardList() { + leaderboards_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaderboardList.class, com.heroiclabs.nakama.api.LeaderboardList.Builder.class); + } + + public static final int LEADERBOARDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List leaderboards_; + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + @java.lang.Override + public java.util.List getLeaderboardsList() { + return leaderboards_; + } + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + @java.lang.Override + public java.util.List + getLeaderboardsOrBuilderList() { + return leaderboards_; + } + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + @java.lang.Override + public int getLeaderboardsCount() { + return leaderboards_.size(); + } + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Leaderboard getLeaderboards(int index) { + return leaderboards_.get(index); + } + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardOrBuilder getLeaderboardsOrBuilder( + int index) { + return leaderboards_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < leaderboards_.size(); i++) { + output.writeMessage(1, leaderboards_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < leaderboards_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, leaderboards_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.LeaderboardList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.LeaderboardList other = (com.heroiclabs.nakama.api.LeaderboardList) obj; + + if (!getLeaderboardsList() + .equals(other.getLeaderboardsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLeaderboardsCount() > 0) { + hash = (37 * hash) + LEADERBOARDS_FIELD_NUMBER; + hash = (53 * hash) + getLeaderboardsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.LeaderboardList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.LeaderboardList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaderboardList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.LeaderboardList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of leaderboards
+   * 
+ * + * Protobuf type {@code nakama.api.LeaderboardList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.LeaderboardList) + com.heroiclabs.nakama.api.LeaderboardListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaderboardList.class, com.heroiclabs.nakama.api.LeaderboardList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.LeaderboardList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (leaderboardsBuilder_ == null) { + leaderboards_ = java.util.Collections.emptyList(); + } else { + leaderboards_ = null; + leaderboardsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.LeaderboardList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardList build() { + com.heroiclabs.nakama.api.LeaderboardList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardList buildPartial() { + com.heroiclabs.nakama.api.LeaderboardList result = new com.heroiclabs.nakama.api.LeaderboardList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.LeaderboardList result) { + if (leaderboardsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + leaderboards_ = java.util.Collections.unmodifiableList(leaderboards_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.leaderboards_ = leaderboards_; + } else { + result.leaderboards_ = leaderboardsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.LeaderboardList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.LeaderboardList) { + return mergeFrom((com.heroiclabs.nakama.api.LeaderboardList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.LeaderboardList other) { + if (other == com.heroiclabs.nakama.api.LeaderboardList.getDefaultInstance()) return this; + if (leaderboardsBuilder_ == null) { + if (!other.leaderboards_.isEmpty()) { + if (leaderboards_.isEmpty()) { + leaderboards_ = other.leaderboards_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLeaderboardsIsMutable(); + leaderboards_.addAll(other.leaderboards_); + } + onChanged(); + } + } else { + if (!other.leaderboards_.isEmpty()) { + if (leaderboardsBuilder_.isEmpty()) { + leaderboardsBuilder_.dispose(); + leaderboardsBuilder_ = null; + leaderboards_ = other.leaderboards_; + bitField0_ = (bitField0_ & ~0x00000001); + leaderboardsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLeaderboardsFieldBuilder() : null; + } else { + leaderboardsBuilder_.addAllMessages(other.leaderboards_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.Leaderboard m = + input.readMessage( + com.heroiclabs.nakama.api.Leaderboard.parser(), + extensionRegistry); + if (leaderboardsBuilder_ == null) { + ensureLeaderboardsIsMutable(); + leaderboards_.add(m); + } else { + leaderboardsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List leaderboards_ = + java.util.Collections.emptyList(); + private void ensureLeaderboardsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + leaderboards_ = new java.util.ArrayList(leaderboards_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Leaderboard, com.heroiclabs.nakama.api.Leaderboard.Builder, com.heroiclabs.nakama.api.LeaderboardOrBuilder> leaderboardsBuilder_; + + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public java.util.List getLeaderboardsList() { + if (leaderboardsBuilder_ == null) { + return java.util.Collections.unmodifiableList(leaderboards_); + } else { + return leaderboardsBuilder_.getMessageList(); + } + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public int getLeaderboardsCount() { + if (leaderboardsBuilder_ == null) { + return leaderboards_.size(); + } else { + return leaderboardsBuilder_.getCount(); + } + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public com.heroiclabs.nakama.api.Leaderboard getLeaderboards(int index) { + if (leaderboardsBuilder_ == null) { + return leaderboards_.get(index); + } else { + return leaderboardsBuilder_.getMessage(index); + } + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder setLeaderboards( + int index, com.heroiclabs.nakama.api.Leaderboard value) { + if (leaderboardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeaderboardsIsMutable(); + leaderboards_.set(index, value); + onChanged(); + } else { + leaderboardsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder setLeaderboards( + int index, com.heroiclabs.nakama.api.Leaderboard.Builder builderForValue) { + if (leaderboardsBuilder_ == null) { + ensureLeaderboardsIsMutable(); + leaderboards_.set(index, builderForValue.build()); + onChanged(); + } else { + leaderboardsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder addLeaderboards(com.heroiclabs.nakama.api.Leaderboard value) { + if (leaderboardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeaderboardsIsMutable(); + leaderboards_.add(value); + onChanged(); + } else { + leaderboardsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder addLeaderboards( + int index, com.heroiclabs.nakama.api.Leaderboard value) { + if (leaderboardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeaderboardsIsMutable(); + leaderboards_.add(index, value); + onChanged(); + } else { + leaderboardsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder addLeaderboards( + com.heroiclabs.nakama.api.Leaderboard.Builder builderForValue) { + if (leaderboardsBuilder_ == null) { + ensureLeaderboardsIsMutable(); + leaderboards_.add(builderForValue.build()); + onChanged(); + } else { + leaderboardsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder addLeaderboards( + int index, com.heroiclabs.nakama.api.Leaderboard.Builder builderForValue) { + if (leaderboardsBuilder_ == null) { + ensureLeaderboardsIsMutable(); + leaderboards_.add(index, builderForValue.build()); + onChanged(); + } else { + leaderboardsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder addAllLeaderboards( + java.lang.Iterable values) { + if (leaderboardsBuilder_ == null) { + ensureLeaderboardsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, leaderboards_); + onChanged(); + } else { + leaderboardsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder clearLeaderboards() { + if (leaderboardsBuilder_ == null) { + leaderboards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + leaderboardsBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public Builder removeLeaderboards(int index) { + if (leaderboardsBuilder_ == null) { + ensureLeaderboardsIsMutable(); + leaderboards_.remove(index); + onChanged(); + } else { + leaderboardsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public com.heroiclabs.nakama.api.Leaderboard.Builder getLeaderboardsBuilder( + int index) { + return getLeaderboardsFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public com.heroiclabs.nakama.api.LeaderboardOrBuilder getLeaderboardsOrBuilder( + int index) { + if (leaderboardsBuilder_ == null) { + return leaderboards_.get(index); } else { + return leaderboardsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public java.util.List + getLeaderboardsOrBuilderList() { + if (leaderboardsBuilder_ != null) { + return leaderboardsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(leaderboards_); + } + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public com.heroiclabs.nakama.api.Leaderboard.Builder addLeaderboardsBuilder() { + return getLeaderboardsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.Leaderboard.getDefaultInstance()); + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public com.heroiclabs.nakama.api.Leaderboard.Builder addLeaderboardsBuilder( + int index) { + return getLeaderboardsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.Leaderboard.getDefaultInstance()); + } + /** + *
+     * The list of leaderboards returned.
+     * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + public java.util.List + getLeaderboardsBuilderList() { + return getLeaderboardsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Leaderboard, com.heroiclabs.nakama.api.Leaderboard.Builder, com.heroiclabs.nakama.api.LeaderboardOrBuilder> + getLeaderboardsFieldBuilder() { + if (leaderboardsBuilder_ == null) { + leaderboardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Leaderboard, com.heroiclabs.nakama.api.Leaderboard.Builder, com.heroiclabs.nakama.api.LeaderboardOrBuilder>( + leaderboards_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + leaderboards_ = null; + } + return leaderboardsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.LeaderboardList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.LeaderboardList) + private static final com.heroiclabs.nakama.api.LeaderboardList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.LeaderboardList(); + } + + public static com.heroiclabs.nakama.api.LeaderboardList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LeaderboardList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaderboardListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/LeaderboardListOrBuilder.java new file mode 100644 index 00000000..b1730f1f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaderboardListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface LeaderboardListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.LeaderboardList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + java.util.List + getLeaderboardsList(); + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + com.heroiclabs.nakama.api.Leaderboard getLeaderboards(int index); + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + int getLeaderboardsCount(); + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + java.util.List + getLeaderboardsOrBuilderList(); + /** + *
+   * The list of leaderboards returned.
+   * 
+ * + * repeated .nakama.api.Leaderboard leaderboards = 1 [json_name = "leaderboards"]; + */ + com.heroiclabs.nakama.api.LeaderboardOrBuilder getLeaderboardsOrBuilder( + int index); + + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaderboardOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/LeaderboardOrBuilder.java new file mode 100644 index 00000000..5667b90f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaderboardOrBuilder.java @@ -0,0 +1,137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface LeaderboardOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Leaderboard) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the leaderboard.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The ID of the leaderboard.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * ASC(0) or DESC(1) sort mode of scores in the leaderboard.
+   * 
+ * + * uint32 sort_order = 2 [json_name = "sortOrder"]; + * @return The sortOrder. + */ + int getSortOrder(); + + /** + *
+   * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+   * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + int getOperatorValue(); + /** + *
+   * BEST, SET, INCREMENT or DECREMENT operator mode of the leaderboard.
+   * 
+ * + * .nakama.api.Operator operator = 3 [json_name = "operator"]; + * @return The operator. + */ + com.heroiclabs.nakama.api.Operator getOperator(); + + /** + *
+   * The UNIX time when the leaderboard was previously reset. A computed value.
+   * 
+ * + * uint32 prev_reset = 4 [json_name = "prevReset"]; + * @return The prevReset. + */ + int getPrevReset(); + + /** + *
+   * The UNIX time when the leaderboard is next playable. A computed value.
+   * 
+ * + * uint32 next_reset = 5 [json_name = "nextReset"]; + * @return The nextReset. + */ + int getNextReset(); + + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The metadata. + */ + java.lang.String getMetadata(); + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 6 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + com.google.protobuf.ByteString + getMetadataBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Whether the leaderboard was created authoritatively or not.
+   * 
+ * + * bool authoritative = 8 [json_name = "authoritative"]; + * @return The authoritative. + */ + boolean getAuthoritative(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecord.java b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecord.java new file mode 100644 index 00000000..13ddc154 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecord.java @@ -0,0 +1,2218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Represents a complete leaderboard record with all scores and associated metadata.
+ * 
+ * + * Protobuf type {@code nakama.api.LeaderboardRecord} + */ +public final class LeaderboardRecord extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.LeaderboardRecord) + LeaderboardRecordOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LeaderboardRecord.class.getName()); + } + // Use LeaderboardRecord.newBuilder() to construct. + private LeaderboardRecord(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LeaderboardRecord() { + leaderboardId_ = ""; + ownerId_ = ""; + metadata_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaderboardRecord.class, com.heroiclabs.nakama.api.LeaderboardRecord.Builder.class); + } + + private int bitField0_; + public static final int LEADERBOARD_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object leaderboardId_ = ""; + /** + *
+   * The ID of the leaderboard this score belongs to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + @java.lang.Override + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } + } + /** + *
+   * The ID of the leaderboard this score belongs to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object ownerId_ = ""; + /** + *
+   * The ID of the score owner, usually a user or group.
+   * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @return The ownerId. + */ + @java.lang.Override + public java.lang.String getOwnerId() { + java.lang.Object ref = ownerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerId_ = s; + return s; + } + } + /** + *
+   * The ID of the score owner, usually a user or group.
+   * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOwnerIdBytes() { + java.lang.Object ref = ownerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ownerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FIELD_NUMBER = 3; + private com.google.protobuf.StringValue username_; + /** + *
+   * The username of the score owner, if the owner is a user.
+   * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + * @return Whether the username field is set. + */ + @java.lang.Override + public boolean hasUsername() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The username of the score owner, if the owner is a user.
+   * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public com.google.protobuf.StringValue getUsername() { + return username_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : username_; + } + /** + *
+   * The username of the score owner, if the owner is a user.
+   * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getUsernameOrBuilder() { + return username_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : username_; + } + + public static final int SCORE_FIELD_NUMBER = 4; + private long score_ = 0L; + /** + *
+   * The score value.
+   * 
+ * + * int64 score = 4 [json_name = "score"]; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + + public static final int SUBSCORE_FIELD_NUMBER = 5; + private long subscore_ = 0L; + /** + *
+   * An optional subscore value.
+   * 
+ * + * int64 subscore = 5 [json_name = "subscore"]; + * @return The subscore. + */ + @java.lang.Override + public long getSubscore() { + return subscore_; + } + + public static final int NUM_SCORE_FIELD_NUMBER = 6; + private int numScore_ = 0; + /** + *
+   * The number of submissions to this score record.
+   * 
+ * + * int32 num_score = 6 [json_name = "numScore"]; + * @return The numScore. + */ + @java.lang.Override + public int getNumScore() { + return numScore_; + } + + public static final int METADATA_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object metadata_ = ""; + /** + *
+   * Metadata.
+   * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } + } + /** + *
+   * Metadata.
+   * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int EXPIRY_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp expiryTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + * @return Whether the expiryTime field is set. + */ + @java.lang.Override + public boolean hasExpiryTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + * @return The expiryTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpiryTime() { + return expiryTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpiryTimeOrBuilder() { + return expiryTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } + + public static final int RANK_FIELD_NUMBER = 11; + private long rank_ = 0L; + /** + *
+   * The rank of this record.
+   * 
+ * + * int64 rank = 11 [json_name = "rank"]; + * @return The rank. + */ + @java.lang.Override + public long getRank() { + return rank_; + } + + public static final int MAX_NUM_SCORE_FIELD_NUMBER = 12; + private int maxNumScore_ = 0; + /** + *
+   * The maximum number of score updates allowed by the owner.
+   * 
+ * + * uint32 max_num_score = 12 [json_name = "maxNumScore"]; + * @return The maxNumScore. + */ + @java.lang.Override + public int getMaxNumScore() { + return maxNumScore_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, leaderboardId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ownerId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ownerId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getUsername()); + } + if (score_ != 0L) { + output.writeInt64(4, score_); + } + if (subscore_ != 0L) { + output.writeInt64(5, subscore_); + } + if (numScore_ != 0) { + output.writeInt32(6, numScore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, metadata_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getExpiryTime()); + } + if (rank_ != 0L) { + output.writeInt64(11, rank_); + } + if (maxNumScore_ != 0) { + output.writeUInt32(12, maxNumScore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, leaderboardId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ownerId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ownerId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUsername()); + } + if (score_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, score_); + } + if (subscore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, subscore_); + } + if (numScore_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, numScore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, metadata_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getExpiryTime()); + } + if (rank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, rank_); + } + if (maxNumScore_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, maxNumScore_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.LeaderboardRecord)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.LeaderboardRecord other = (com.heroiclabs.nakama.api.LeaderboardRecord) obj; + + if (!getLeaderboardId() + .equals(other.getLeaderboardId())) return false; + if (!getOwnerId() + .equals(other.getOwnerId())) return false; + if (hasUsername() != other.hasUsername()) return false; + if (hasUsername()) { + if (!getUsername() + .equals(other.getUsername())) return false; + } + if (getScore() + != other.getScore()) return false; + if (getSubscore() + != other.getSubscore()) return false; + if (getNumScore() + != other.getNumScore()) return false; + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasExpiryTime() != other.hasExpiryTime()) return false; + if (hasExpiryTime()) { + if (!getExpiryTime() + .equals(other.getExpiryTime())) return false; + } + if (getRank() + != other.getRank()) return false; + if (getMaxNumScore() + != other.getMaxNumScore()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEADERBOARD_ID_FIELD_NUMBER; + hash = (53 * hash) + getLeaderboardId().hashCode(); + hash = (37 * hash) + OWNER_ID_FIELD_NUMBER; + hash = (53 * hash) + getOwnerId().hashCode(); + if (hasUsername()) { + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScore()); + hash = (37 * hash) + SUBSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSubscore()); + hash = (37 * hash) + NUM_SCORE_FIELD_NUMBER; + hash = (53 * hash) + getNumScore(); + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasExpiryTime()) { + hash = (37 * hash) + EXPIRY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpiryTime().hashCode(); + } + hash = (37 * hash) + RANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRank()); + hash = (37 * hash) + MAX_NUM_SCORE_FIELD_NUMBER; + hash = (53 * hash) + getMaxNumScore(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.LeaderboardRecord parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.LeaderboardRecord parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaderboardRecord parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.LeaderboardRecord prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a complete leaderboard record with all scores and associated metadata.
+   * 
+ * + * Protobuf type {@code nakama.api.LeaderboardRecord} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.LeaderboardRecord) + com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaderboardRecord.class, com.heroiclabs.nakama.api.LeaderboardRecord.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.LeaderboardRecord.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getUsernameFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getExpiryTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + leaderboardId_ = ""; + ownerId_ = ""; + username_ = null; + if (usernameBuilder_ != null) { + usernameBuilder_.dispose(); + usernameBuilder_ = null; + } + score_ = 0L; + subscore_ = 0L; + numScore_ = 0; + metadata_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + expiryTime_ = null; + if (expiryTimeBuilder_ != null) { + expiryTimeBuilder_.dispose(); + expiryTimeBuilder_ = null; + } + rank_ = 0L; + maxNumScore_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecord_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord build() { + com.heroiclabs.nakama.api.LeaderboardRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord buildPartial() { + com.heroiclabs.nakama.api.LeaderboardRecord result = new com.heroiclabs.nakama.api.LeaderboardRecord(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.LeaderboardRecord result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.leaderboardId_ = leaderboardId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ownerId_ = ownerId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = usernameBuilder_ == null + ? username_ + : usernameBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.subscore_ = subscore_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.numScore_ = numScore_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.metadata_ = metadata_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.expiryTime_ = expiryTimeBuilder_ == null + ? expiryTime_ + : expiryTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.rank_ = rank_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.maxNumScore_ = maxNumScore_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.LeaderboardRecord) { + return mergeFrom((com.heroiclabs.nakama.api.LeaderboardRecord)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.LeaderboardRecord other) { + if (other == com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()) return this; + if (!other.getLeaderboardId().isEmpty()) { + leaderboardId_ = other.leaderboardId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOwnerId().isEmpty()) { + ownerId_ = other.ownerId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUsername()) { + mergeUsername(other.getUsername()); + } + if (other.getScore() != 0L) { + setScore(other.getScore()); + } + if (other.getSubscore() != 0L) { + setSubscore(other.getSubscore()); + } + if (other.getNumScore() != 0) { + setNumScore(other.getNumScore()); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasExpiryTime()) { + mergeExpiryTime(other.getExpiryTime()); + } + if (other.getRank() != 0L) { + setRank(other.getRank()); + } + if (other.getMaxNumScore() != 0) { + setMaxNumScore(other.getMaxNumScore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + leaderboardId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + ownerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getUsernameFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + score_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + subscore_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + numScore_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getExpiryTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: { + rank_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + maxNumScore_ = input.readUInt32(); + bitField0_ |= 0x00000800; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object leaderboardId_ = ""; + /** + *
+     * The ID of the leaderboard this score belongs to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the leaderboard this score belongs to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the leaderboard this score belongs to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard this score belongs to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return This builder for chaining. + */ + public Builder clearLeaderboardId() { + leaderboardId_ = getDefaultInstance().getLeaderboardId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard this score belongs to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The bytes for leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object ownerId_ = ""; + /** + *
+     * The ID of the score owner, usually a user or group.
+     * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @return The ownerId. + */ + public java.lang.String getOwnerId() { + java.lang.Object ref = ownerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the score owner, usually a user or group.
+     * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + public com.google.protobuf.ByteString + getOwnerIdBytes() { + java.lang.Object ref = ownerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ownerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the score owner, usually a user or group.
+     * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @param value The ownerId to set. + * @return This builder for chaining. + */ + public Builder setOwnerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ownerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The ID of the score owner, usually a user or group.
+     * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @return This builder for chaining. + */ + public Builder clearOwnerId() { + ownerId_ = getDefaultInstance().getOwnerId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ID of the score owner, usually a user or group.
+     * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @param value The bytes for ownerId to set. + * @return This builder for chaining. + */ + public Builder setOwnerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ownerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.StringValue username_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> usernameBuilder_; + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + * @return Whether the username field is set. + */ + public boolean hasUsername() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + * @return The username. + */ + public com.google.protobuf.StringValue getUsername() { + if (usernameBuilder_ == null) { + return username_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : username_; + } else { + return usernameBuilder_.getMessage(); + } + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + public Builder setUsername(com.google.protobuf.StringValue value) { + if (usernameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + username_ = value; + } else { + usernameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + public Builder setUsername( + com.google.protobuf.StringValue.Builder builderForValue) { + if (usernameBuilder_ == null) { + username_ = builderForValue.build(); + } else { + usernameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + public Builder mergeUsername(com.google.protobuf.StringValue value) { + if (usernameBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + username_ != null && + username_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getUsernameBuilder().mergeFrom(value); + } else { + username_ = value; + } + } else { + usernameBuilder_.mergeFrom(value); + } + if (username_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + public Builder clearUsername() { + bitField0_ = (bitField0_ & ~0x00000004); + username_ = null; + if (usernameBuilder_ != null) { + usernameBuilder_.dispose(); + usernameBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + public com.google.protobuf.StringValue.Builder getUsernameBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUsernameFieldBuilder().getBuilder(); + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + public com.google.protobuf.StringValueOrBuilder getUsernameOrBuilder() { + if (usernameBuilder_ != null) { + return usernameBuilder_.getMessageOrBuilder(); + } else { + return username_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : username_; + } + } + /** + *
+     * The username of the score owner, if the owner is a user.
+     * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getUsernameFieldBuilder() { + if (usernameBuilder_ == null) { + usernameBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getUsername(), + getParentForChildren(), + isClean()); + username_ = null; + } + return usernameBuilder_; + } + + private long score_ ; + /** + *
+     * The score value.
+     * 
+ * + * int64 score = 4 [json_name = "score"]; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + /** + *
+     * The score value.
+     * 
+ * + * int64 score = 4 [json_name = "score"]; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(long value) { + + score_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The score value.
+     * 
+ * + * int64 score = 4 [json_name = "score"]; + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000008); + score_ = 0L; + onChanged(); + return this; + } + + private long subscore_ ; + /** + *
+     * An optional subscore value.
+     * 
+ * + * int64 subscore = 5 [json_name = "subscore"]; + * @return The subscore. + */ + @java.lang.Override + public long getSubscore() { + return subscore_; + } + /** + *
+     * An optional subscore value.
+     * 
+ * + * int64 subscore = 5 [json_name = "subscore"]; + * @param value The subscore to set. + * @return This builder for chaining. + */ + public Builder setSubscore(long value) { + + subscore_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * An optional subscore value.
+     * 
+ * + * int64 subscore = 5 [json_name = "subscore"]; + * @return This builder for chaining. + */ + public Builder clearSubscore() { + bitField0_ = (bitField0_ & ~0x00000010); + subscore_ = 0L; + onChanged(); + return this; + } + + private int numScore_ ; + /** + *
+     * The number of submissions to this score record.
+     * 
+ * + * int32 num_score = 6 [json_name = "numScore"]; + * @return The numScore. + */ + @java.lang.Override + public int getNumScore() { + return numScore_; + } + /** + *
+     * The number of submissions to this score record.
+     * 
+ * + * int32 num_score = 6 [json_name = "numScore"]; + * @param value The numScore to set. + * @return This builder for chaining. + */ + public Builder setNumScore(int value) { + + numScore_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The number of submissions to this score record.
+     * 
+ * + * int32 num_score = 6 [json_name = "numScore"]; + * @return This builder for chaining. + */ + public Builder clearNumScore() { + bitField0_ = (bitField0_ & ~0x00000020); + numScore_ = 0; + onChanged(); + return this; + } + + private java.lang.Object metadata_ = ""; + /** + *
+     * Metadata.
+     * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @return The metadata. + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Metadata.
+     * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Metadata.
+     * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @param value The metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadata_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Metadata.
+     * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @return This builder for chaining. + */ + public Builder clearMetadata() { + metadata_ = getDefaultInstance().getMetadata(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * Metadata.
+     * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @param value The bytes for metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadata_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp expiryTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expiryTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + * @return Whether the expiryTime field is set. + */ + public boolean hasExpiryTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + * @return The expiryTime. + */ + public com.google.protobuf.Timestamp getExpiryTime() { + if (expiryTimeBuilder_ == null) { + return expiryTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } else { + return expiryTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + public Builder setExpiryTime(com.google.protobuf.Timestamp value) { + if (expiryTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiryTime_ = value; + } else { + expiryTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + public Builder setExpiryTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (expiryTimeBuilder_ == null) { + expiryTime_ = builderForValue.build(); + } else { + expiryTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + public Builder mergeExpiryTime(com.google.protobuf.Timestamp value) { + if (expiryTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + expiryTime_ != null && + expiryTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpiryTimeBuilder().mergeFrom(value); + } else { + expiryTime_ = value; + } + } else { + expiryTimeBuilder_.mergeFrom(value); + } + if (expiryTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + public Builder clearExpiryTime() { + bitField0_ = (bitField0_ & ~0x00000200); + expiryTime_ = null; + if (expiryTimeBuilder_ != null) { + expiryTimeBuilder_.dispose(); + expiryTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + public com.google.protobuf.Timestamp.Builder getExpiryTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getExpiryTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getExpiryTimeOrBuilder() { + if (expiryTimeBuilder_ != null) { + return expiryTimeBuilder_.getMessageOrBuilder(); + } else { + return expiryTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getExpiryTimeFieldBuilder() { + if (expiryTimeBuilder_ == null) { + expiryTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getExpiryTime(), + getParentForChildren(), + isClean()); + expiryTime_ = null; + } + return expiryTimeBuilder_; + } + + private long rank_ ; + /** + *
+     * The rank of this record.
+     * 
+ * + * int64 rank = 11 [json_name = "rank"]; + * @return The rank. + */ + @java.lang.Override + public long getRank() { + return rank_; + } + /** + *
+     * The rank of this record.
+     * 
+ * + * int64 rank = 11 [json_name = "rank"]; + * @param value The rank to set. + * @return This builder for chaining. + */ + public Builder setRank(long value) { + + rank_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The rank of this record.
+     * 
+ * + * int64 rank = 11 [json_name = "rank"]; + * @return This builder for chaining. + */ + public Builder clearRank() { + bitField0_ = (bitField0_ & ~0x00000400); + rank_ = 0L; + onChanged(); + return this; + } + + private int maxNumScore_ ; + /** + *
+     * The maximum number of score updates allowed by the owner.
+     * 
+ * + * uint32 max_num_score = 12 [json_name = "maxNumScore"]; + * @return The maxNumScore. + */ + @java.lang.Override + public int getMaxNumScore() { + return maxNumScore_; + } + /** + *
+     * The maximum number of score updates allowed by the owner.
+     * 
+ * + * uint32 max_num_score = 12 [json_name = "maxNumScore"]; + * @param value The maxNumScore to set. + * @return This builder for chaining. + */ + public Builder setMaxNumScore(int value) { + + maxNumScore_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The maximum number of score updates allowed by the owner.
+     * 
+ * + * uint32 max_num_score = 12 [json_name = "maxNumScore"]; + * @return This builder for chaining. + */ + public Builder clearMaxNumScore() { + bitField0_ = (bitField0_ & ~0x00000800); + maxNumScore_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.LeaderboardRecord) + } + + // @@protoc_insertion_point(class_scope:nakama.api.LeaderboardRecord) + private static final com.heroiclabs.nakama.api.LeaderboardRecord DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.LeaderboardRecord(); + } + + public static com.heroiclabs.nakama.api.LeaderboardRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LeaderboardRecord parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordList.java b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordList.java new file mode 100644 index 00000000..c9a969da --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordList.java @@ -0,0 +1,1672 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A set of leaderboard records, may be part of a leaderboard records page or a batch of individual records.
+ * 
+ * + * Protobuf type {@code nakama.api.LeaderboardRecordList} + */ +public final class LeaderboardRecordList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.LeaderboardRecordList) + LeaderboardRecordListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LeaderboardRecordList.class.getName()); + } + // Use LeaderboardRecordList.newBuilder() to construct. + private LeaderboardRecordList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LeaderboardRecordList() { + records_ = java.util.Collections.emptyList(); + ownerRecords_ = java.util.Collections.emptyList(); + nextCursor_ = ""; + prevCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecordList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecordList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaderboardRecordList.class, com.heroiclabs.nakama.api.LeaderboardRecordList.Builder.class); + } + + public static final int RECORDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List records_; + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public java.util.List getRecordsList() { + return records_; + } + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public java.util.List + getRecordsOrBuilderList() { + return records_; + } + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public int getRecordsCount() { + return records_.size(); + } + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index) { + return records_.get(index); + } + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getRecordsOrBuilder( + int index) { + return records_.get(index); + } + + public static final int OWNER_RECORDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List ownerRecords_; + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public java.util.List getOwnerRecordsList() { + return ownerRecords_; + } + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public java.util.List + getOwnerRecordsOrBuilderList() { + return ownerRecords_; + } + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public int getOwnerRecordsCount() { + return ownerRecords_.size(); + } + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord getOwnerRecords(int index) { + return ownerRecords_.get(index); + } + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getOwnerRecordsOrBuilder( + int index) { + return ownerRecords_.get(index); + } + + public static final int NEXT_CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object nextCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + @java.lang.Override + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREV_CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object prevCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + @java.lang.Override + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RANK_COUNT_FIELD_NUMBER = 5; + private long rankCount_ = 0L; + /** + *
+   * The total number of ranks available.
+   * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return The rankCount. + */ + @java.lang.Override + public long getRankCount() { + return rankCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < records_.size(); i++) { + output.writeMessage(1, records_.get(i)); + } + for (int i = 0; i < ownerRecords_.size(); i++) { + output.writeMessage(2, ownerRecords_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, prevCursor_); + } + if (rankCount_ != 0L) { + output.writeInt64(5, rankCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < records_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, records_.get(i)); + } + for (int i = 0; i < ownerRecords_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, ownerRecords_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, prevCursor_); + } + if (rankCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, rankCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.LeaderboardRecordList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.LeaderboardRecordList other = (com.heroiclabs.nakama.api.LeaderboardRecordList) obj; + + if (!getRecordsList() + .equals(other.getRecordsList())) return false; + if (!getOwnerRecordsList() + .equals(other.getOwnerRecordsList())) return false; + if (!getNextCursor() + .equals(other.getNextCursor())) return false; + if (!getPrevCursor() + .equals(other.getPrevCursor())) return false; + if (getRankCount() + != other.getRankCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRecordsCount() > 0) { + hash = (37 * hash) + RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getRecordsList().hashCode(); + } + if (getOwnerRecordsCount() > 0) { + hash = (37 * hash) + OWNER_RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getOwnerRecordsList().hashCode(); + } + hash = (37 * hash) + NEXT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getNextCursor().hashCode(); + hash = (37 * hash) + PREV_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getPrevCursor().hashCode(); + hash = (37 * hash) + RANK_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRankCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaderboardRecordList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.LeaderboardRecordList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of leaderboard records, may be part of a leaderboard records page or a batch of individual records.
+   * 
+ * + * Protobuf type {@code nakama.api.LeaderboardRecordList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.LeaderboardRecordList) + com.heroiclabs.nakama.api.LeaderboardRecordListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecordList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecordList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaderboardRecordList.class, com.heroiclabs.nakama.api.LeaderboardRecordList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.LeaderboardRecordList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + } else { + records_ = null; + recordsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (ownerRecordsBuilder_ == null) { + ownerRecords_ = java.util.Collections.emptyList(); + } else { + ownerRecords_ = null; + ownerRecordsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + nextCursor_ = ""; + prevCursor_ = ""; + rankCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaderboardRecordList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.LeaderboardRecordList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordList build() { + com.heroiclabs.nakama.api.LeaderboardRecordList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordList buildPartial() { + com.heroiclabs.nakama.api.LeaderboardRecordList result = new com.heroiclabs.nakama.api.LeaderboardRecordList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.LeaderboardRecordList result) { + if (recordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + records_ = java.util.Collections.unmodifiableList(records_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.records_ = records_; + } else { + result.records_ = recordsBuilder_.build(); + } + if (ownerRecordsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + ownerRecords_ = java.util.Collections.unmodifiableList(ownerRecords_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ownerRecords_ = ownerRecords_; + } else { + result.ownerRecords_ = ownerRecordsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.LeaderboardRecordList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nextCursor_ = nextCursor_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.prevCursor_ = prevCursor_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rankCount_ = rankCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.LeaderboardRecordList) { + return mergeFrom((com.heroiclabs.nakama.api.LeaderboardRecordList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.LeaderboardRecordList other) { + if (other == com.heroiclabs.nakama.api.LeaderboardRecordList.getDefaultInstance()) return this; + if (recordsBuilder_ == null) { + if (!other.records_.isEmpty()) { + if (records_.isEmpty()) { + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRecordsIsMutable(); + records_.addAll(other.records_); + } + onChanged(); + } + } else { + if (!other.records_.isEmpty()) { + if (recordsBuilder_.isEmpty()) { + recordsBuilder_.dispose(); + recordsBuilder_ = null; + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + recordsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRecordsFieldBuilder() : null; + } else { + recordsBuilder_.addAllMessages(other.records_); + } + } + } + if (ownerRecordsBuilder_ == null) { + if (!other.ownerRecords_.isEmpty()) { + if (ownerRecords_.isEmpty()) { + ownerRecords_ = other.ownerRecords_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOwnerRecordsIsMutable(); + ownerRecords_.addAll(other.ownerRecords_); + } + onChanged(); + } + } else { + if (!other.ownerRecords_.isEmpty()) { + if (ownerRecordsBuilder_.isEmpty()) { + ownerRecordsBuilder_.dispose(); + ownerRecordsBuilder_ = null; + ownerRecords_ = other.ownerRecords_; + bitField0_ = (bitField0_ & ~0x00000002); + ownerRecordsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOwnerRecordsFieldBuilder() : null; + } else { + ownerRecordsBuilder_.addAllMessages(other.ownerRecords_); + } + } + } + if (!other.getNextCursor().isEmpty()) { + nextCursor_ = other.nextCursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPrevCursor().isEmpty()) { + prevCursor_ = other.prevCursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getRankCount() != 0L) { + setRankCount(other.getRankCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.LeaderboardRecord m = + input.readMessage( + com.heroiclabs.nakama.api.LeaderboardRecord.parser(), + extensionRegistry); + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(m); + } else { + recordsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.api.LeaderboardRecord m = + input.readMessage( + com.heroiclabs.nakama.api.LeaderboardRecord.parser(), + extensionRegistry); + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(m); + } else { + ownerRecordsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + nextCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + prevCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + rankCount_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List records_ = + java.util.Collections.emptyList(); + private void ensureRecordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + records_ = new java.util.ArrayList(records_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> recordsBuilder_; + + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public java.util.List getRecordsList() { + if (recordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(records_); + } else { + return recordsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public int getRecordsCount() { + if (recordsBuilder_ == null) { + return records_.size(); + } else { + return recordsBuilder_.getCount(); + } + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index) { + if (recordsBuilder_ == null) { + return records_.get(index); + } else { + return recordsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder setRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.set(index, value); + onChanged(); + } else { + recordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder setRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.set(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords(com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(value); + onChanged(); + } else { + recordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(index, value); + onChanged(); + } else { + recordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords( + com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addAllRecords( + java.lang.Iterable values) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, records_); + onChanged(); + } else { + recordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder clearRecords() { + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + recordsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder removeRecords(int index) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.remove(index); + onChanged(); + } else { + recordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder getRecordsBuilder( + int index) { + return getRecordsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getRecordsOrBuilder( + int index) { + if (recordsBuilder_ == null) { + return records_.get(index); } else { + return recordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public java.util.List + getRecordsOrBuilderList() { + if (recordsBuilder_ != null) { + return recordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(records_); + } + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addRecordsBuilder() { + return getRecordsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addRecordsBuilder( + int index) { + return getRecordsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A list of leaderboard records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public java.util.List + getRecordsBuilderList() { + return getRecordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> + getRecordsFieldBuilder() { + if (recordsBuilder_ == null) { + recordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder>( + records_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + records_ = null; + } + return recordsBuilder_; + } + + private java.util.List ownerRecords_ = + java.util.Collections.emptyList(); + private void ensureOwnerRecordsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ownerRecords_ = new java.util.ArrayList(ownerRecords_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> ownerRecordsBuilder_; + + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public java.util.List getOwnerRecordsList() { + if (ownerRecordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ownerRecords_); + } else { + return ownerRecordsBuilder_.getMessageList(); + } + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public int getOwnerRecordsCount() { + if (ownerRecordsBuilder_ == null) { + return ownerRecords_.size(); + } else { + return ownerRecordsBuilder_.getCount(); + } + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord getOwnerRecords(int index) { + if (ownerRecordsBuilder_ == null) { + return ownerRecords_.get(index); + } else { + return ownerRecordsBuilder_.getMessage(index); + } + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder setOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (ownerRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnerRecordsIsMutable(); + ownerRecords_.set(index, value); + onChanged(); + } else { + ownerRecordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder setOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.set(index, builderForValue.build()); + onChanged(); + } else { + ownerRecordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords(com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (ownerRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(value); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (ownerRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(index, value); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords( + com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(builderForValue.build()); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(index, builderForValue.build()); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addAllOwnerRecords( + java.lang.Iterable values) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ownerRecords_); + onChanged(); + } else { + ownerRecordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder clearOwnerRecords() { + if (ownerRecordsBuilder_ == null) { + ownerRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + ownerRecordsBuilder_.clear(); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder removeOwnerRecords(int index) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.remove(index); + onChanged(); + } else { + ownerRecordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder getOwnerRecordsBuilder( + int index) { + return getOwnerRecordsFieldBuilder().getBuilder(index); + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getOwnerRecordsOrBuilder( + int index) { + if (ownerRecordsBuilder_ == null) { + return ownerRecords_.get(index); } else { + return ownerRecordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public java.util.List + getOwnerRecordsOrBuilderList() { + if (ownerRecordsBuilder_ != null) { + return ownerRecordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ownerRecords_); + } + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addOwnerRecordsBuilder() { + return getOwnerRecordsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addOwnerRecordsBuilder( + int index) { + return getOwnerRecordsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A batched set of leaderboard records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public java.util.List + getOwnerRecordsBuilderList() { + return getOwnerRecordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> + getOwnerRecordsFieldBuilder() { + if (ownerRecordsBuilder_ == null) { + ownerRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder>( + ownerRecords_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + ownerRecords_ = null; + } + return ownerRecordsBuilder_; + } + + private java.lang.Object nextCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @param value The nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return This builder for chaining. + */ + public Builder clearNextCursor() { + nextCursor_ = getDefaultInstance().getNextCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @param value The bytes for nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object prevCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @param value The prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + prevCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return This builder for chaining. + */ + public Builder clearPrevCursor() { + prevCursor_ = getDefaultInstance().getPrevCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @param value The bytes for prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + prevCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long rankCount_ ; + /** + *
+     * The total number of ranks available.
+     * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return The rankCount. + */ + @java.lang.Override + public long getRankCount() { + return rankCount_; + } + /** + *
+     * The total number of ranks available.
+     * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @param value The rankCount to set. + * @return This builder for chaining. + */ + public Builder setRankCount(long value) { + + rankCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The total number of ranks available.
+     * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return This builder for chaining. + */ + public Builder clearRankCount() { + bitField0_ = (bitField0_ & ~0x00000010); + rankCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.LeaderboardRecordList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.LeaderboardRecordList) + private static final com.heroiclabs.nakama.api.LeaderboardRecordList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.LeaderboardRecordList(); + } + + public static com.heroiclabs.nakama.api.LeaderboardRecordList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LeaderboardRecordList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordListOrBuilder.java new file mode 100644 index 00000000..ffba42d7 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordListOrBuilder.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface LeaderboardRecordListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.LeaderboardRecordList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + java.util.List + getRecordsList(); + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index); + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + int getRecordsCount(); + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + java.util.List + getRecordsOrBuilderList(); + /** + *
+   * A list of leaderboard records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getRecordsOrBuilder( + int index); + + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + java.util.List + getOwnerRecordsList(); + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecord getOwnerRecords(int index); + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + int getOwnerRecordsCount(); + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + java.util.List + getOwnerRecordsOrBuilderList(); + /** + *
+   * A batched set of leaderboard records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getOwnerRecordsOrBuilder( + int index); + + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + java.lang.String getNextCursor(); + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + com.google.protobuf.ByteString + getNextCursorBytes(); + + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + java.lang.String getPrevCursor(); + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + com.google.protobuf.ByteString + getPrevCursorBytes(); + + /** + *
+   * The total number of ranks available.
+   * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return The rankCount. + */ + long getRankCount(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordOrBuilder.java new file mode 100644 index 00000000..8be00330 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaderboardRecordOrBuilder.java @@ -0,0 +1,229 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface LeaderboardRecordOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.LeaderboardRecord) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the leaderboard this score belongs to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + java.lang.String getLeaderboardId(); + /** + *
+   * The ID of the leaderboard this score belongs to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + com.google.protobuf.ByteString + getLeaderboardIdBytes(); + + /** + *
+   * The ID of the score owner, usually a user or group.
+   * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @return The ownerId. + */ + java.lang.String getOwnerId(); + /** + *
+   * The ID of the score owner, usually a user or group.
+   * 
+ * + * string owner_id = 2 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + com.google.protobuf.ByteString + getOwnerIdBytes(); + + /** + *
+   * The username of the score owner, if the owner is a user.
+   * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + * @return Whether the username field is set. + */ + boolean hasUsername(); + /** + *
+   * The username of the score owner, if the owner is a user.
+   * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + * @return The username. + */ + com.google.protobuf.StringValue getUsername(); + /** + *
+   * The username of the score owner, if the owner is a user.
+   * 
+ * + * .google.protobuf.StringValue username = 3 [json_name = "username"]; + */ + com.google.protobuf.StringValueOrBuilder getUsernameOrBuilder(); + + /** + *
+   * The score value.
+   * 
+ * + * int64 score = 4 [json_name = "score"]; + * @return The score. + */ + long getScore(); + + /** + *
+   * An optional subscore value.
+   * 
+ * + * int64 subscore = 5 [json_name = "subscore"]; + * @return The subscore. + */ + long getSubscore(); + + /** + *
+   * The number of submissions to this score record.
+   * 
+ * + * int32 num_score = 6 [json_name = "numScore"]; + * @return The numScore. + */ + int getNumScore(); + + /** + *
+   * Metadata.
+   * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @return The metadata. + */ + java.lang.String getMetadata(); + /** + *
+   * Metadata.
+   * 
+ * + * string metadata = 7 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + com.google.protobuf.ByteString + getMetadataBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + * @return Whether the expiryTime field is set. + */ + boolean hasExpiryTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + * @return The expiryTime. + */ + com.google.protobuf.Timestamp getExpiryTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the leaderboard record expires.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 10 [json_name = "expiryTime"]; + */ + com.google.protobuf.TimestampOrBuilder getExpiryTimeOrBuilder(); + + /** + *
+   * The rank of this record.
+   * 
+ * + * int64 rank = 11 [json_name = "rank"]; + * @return The rank. + */ + long getRank(); + + /** + *
+   * The maximum number of score updates allowed by the owner.
+   * 
+ * + * uint32 max_num_score = 12 [json_name = "maxNumScore"]; + * @return The maxNumScore. + */ + int getMaxNumScore(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequest.java b/src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequest.java new file mode 100644 index 00000000..a9277b8d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Leave a group.
+ * 
+ * + * Protobuf type {@code nakama.api.LeaveGroupRequest} + */ +public final class LeaveGroupRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.LeaveGroupRequest) + LeaveGroupRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LeaveGroupRequest.class.getName()); + } + // Use LeaveGroupRequest.newBuilder() to construct. + private LeaveGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LeaveGroupRequest() { + groupId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaveGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaveGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaveGroupRequest.class, com.heroiclabs.nakama.api.LeaveGroupRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group ID to leave.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group ID to leave.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.LeaveGroupRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.LeaveGroupRequest other = (com.heroiclabs.nakama.api.LeaveGroupRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LeaveGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.LeaveGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Leave a group.
+   * 
+ * + * Protobuf type {@code nakama.api.LeaveGroupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.LeaveGroupRequest) + com.heroiclabs.nakama.api.LeaveGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaveGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaveGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LeaveGroupRequest.class, com.heroiclabs.nakama.api.LeaveGroupRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.LeaveGroupRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LeaveGroupRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaveGroupRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.LeaveGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaveGroupRequest build() { + com.heroiclabs.nakama.api.LeaveGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaveGroupRequest buildPartial() { + com.heroiclabs.nakama.api.LeaveGroupRequest result = new com.heroiclabs.nakama.api.LeaveGroupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.LeaveGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.LeaveGroupRequest) { + return mergeFrom((com.heroiclabs.nakama.api.LeaveGroupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.LeaveGroupRequest other) { + if (other == com.heroiclabs.nakama.api.LeaveGroupRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group ID to leave.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group ID to leave.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group ID to leave.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group ID to leave.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group ID to leave.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.LeaveGroupRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.LeaveGroupRequest) + private static final com.heroiclabs.nakama.api.LeaveGroupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.LeaveGroupRequest(); + } + + public static com.heroiclabs.nakama.api.LeaveGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LeaveGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LeaveGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequestOrBuilder.java new file mode 100644 index 00000000..f5a796e6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LeaveGroupRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface LeaveGroupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.LeaveGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group ID to leave.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group ID to leave.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequest.java b/src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequest.java new file mode 100644 index 00000000..04d333e3 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequest.java @@ -0,0 +1,847 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Link Facebook to the current user's account.
+ * 
+ * + * Protobuf type {@code nakama.api.LinkFacebookRequest} + */ +public final class LinkFacebookRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.LinkFacebookRequest) + LinkFacebookRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LinkFacebookRequest.class.getName()); + } + // Use LinkFacebookRequest.newBuilder() to construct. + private LinkFacebookRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LinkFacebookRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkFacebookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkFacebookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LinkFacebookRequest.class, com.heroiclabs.nakama.api.LinkFacebookRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountFacebook account_; + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebook getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + + public static final int SYNC_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue sync_; + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + @java.lang.Override + public boolean hasSync() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return The sync. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getSync() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSync()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSync()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.LinkFacebookRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.LinkFacebookRequest other = (com.heroiclabs.nakama.api.LinkFacebookRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasSync() != other.hasSync()) return false; + if (hasSync()) { + if (!getSync() + .equals(other.getSync())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasSync()) { + hash = (37 * hash) + SYNC_FIELD_NUMBER; + hash = (53 * hash) + getSync().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LinkFacebookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.LinkFacebookRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Link Facebook to the current user's account.
+   * 
+ * + * Protobuf type {@code nakama.api.LinkFacebookRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.LinkFacebookRequest) + com.heroiclabs.nakama.api.LinkFacebookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkFacebookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkFacebookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LinkFacebookRequest.class, com.heroiclabs.nakama.api.LinkFacebookRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.LinkFacebookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getSyncFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkFacebookRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkFacebookRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.LinkFacebookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkFacebookRequest build() { + com.heroiclabs.nakama.api.LinkFacebookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkFacebookRequest buildPartial() { + com.heroiclabs.nakama.api.LinkFacebookRequest result = new com.heroiclabs.nakama.api.LinkFacebookRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.LinkFacebookRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sync_ = syncBuilder_ == null + ? sync_ + : syncBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.LinkFacebookRequest) { + return mergeFrom((com.heroiclabs.nakama.api.LinkFacebookRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.LinkFacebookRequest other) { + if (other == com.heroiclabs.nakama.api.LinkFacebookRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasSync()) { + mergeSync(other.getSync()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getSyncFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountFacebook account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder> accountBuilder_; + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountFacebook getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountFacebook value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountFacebook.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountFacebook value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebook.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance() : account_; + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountFacebook, com.heroiclabs.nakama.api.AccountFacebook.Builder, com.heroiclabs.nakama.api.AccountFacebookOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue sync_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> syncBuilder_; + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + public boolean hasSync() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return The sync. + */ + public com.google.protobuf.BoolValue getSync() { + if (syncBuilder_ == null) { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } else { + return syncBuilder_.getMessage(); + } + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder setSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sync_ = value; + } else { + syncBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder setSync( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (syncBuilder_ == null) { + sync_ = builderForValue.build(); + } else { + syncBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder mergeSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + sync_ != null && + sync_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getSyncBuilder().mergeFrom(value); + } else { + sync_ = value; + } + } else { + syncBuilder_.mergeFrom(value); + } + if (sync_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder clearSync() { + bitField0_ = (bitField0_ & ~0x00000002); + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValue.Builder getSyncBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSyncFieldBuilder().getBuilder(); + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + if (syncBuilder_ != null) { + return syncBuilder_.getMessageOrBuilder(); + } else { + return sync_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + } + /** + *
+     * Import Facebook friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getSyncFieldBuilder() { + if (syncBuilder_ == null) { + syncBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getSync(), + getParentForChildren(), + isClean()); + sync_ = null; + } + return syncBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.LinkFacebookRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.LinkFacebookRequest) + private static final com.heroiclabs.nakama.api.LinkFacebookRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.LinkFacebookRequest(); + } + + public static com.heroiclabs.nakama.api.LinkFacebookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkFacebookRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkFacebookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequestOrBuilder.java new file mode 100644 index 00000000..5316034b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LinkFacebookRequestOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface LinkFacebookRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.LinkFacebookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountFacebook getAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountFacebook account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountFacebookOrBuilder getAccountOrBuilder(); + + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + boolean hasSync(); + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return The sync. + */ + com.google.protobuf.BoolValue getSync(); + /** + *
+   * Import Facebook friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/LinkSteamRequest.java b/src/main/java/com/heroiclabs/nakama/api/LinkSteamRequest.java new file mode 100644 index 00000000..44c79a50 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LinkSteamRequest.java @@ -0,0 +1,847 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Link Steam to the current user's account.
+ * 
+ * + * Protobuf type {@code nakama.api.LinkSteamRequest} + */ +public final class LinkSteamRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.LinkSteamRequest) + LinkSteamRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LinkSteamRequest.class.getName()); + } + // Use LinkSteamRequest.newBuilder() to construct. + private LinkSteamRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LinkSteamRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkSteamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkSteamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LinkSteamRequest.class, com.heroiclabs.nakama.api.LinkSteamRequest.Builder.class); + } + + private int bitField0_; + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.AccountSteam account_; + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteam getAccount() { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder() { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + + public static final int SYNC_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue sync_; + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + @java.lang.Override + public boolean hasSync() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return The sync. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getSync() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSync()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSync()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.LinkSteamRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.LinkSteamRequest other = (com.heroiclabs.nakama.api.LinkSteamRequest) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (hasSync() != other.hasSync()) return false; + if (hasSync()) { + if (!getSync() + .equals(other.getSync())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + if (hasSync()) { + hash = (37 * hash) + SYNC_FIELD_NUMBER; + hash = (53 * hash) + getSync().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.LinkSteamRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.LinkSteamRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.LinkSteamRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.LinkSteamRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Link Steam to the current user's account.
+   * 
+ * + * Protobuf type {@code nakama.api.LinkSteamRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.LinkSteamRequest) + com.heroiclabs.nakama.api.LinkSteamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkSteamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkSteamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.LinkSteamRequest.class, com.heroiclabs.nakama.api.LinkSteamRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.LinkSteamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccountFieldBuilder(); + getSyncFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_LinkSteamRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkSteamRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.LinkSteamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkSteamRequest build() { + com.heroiclabs.nakama.api.LinkSteamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkSteamRequest buildPartial() { + com.heroiclabs.nakama.api.LinkSteamRequest result = new com.heroiclabs.nakama.api.LinkSteamRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.LinkSteamRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.account_ = accountBuilder_ == null + ? account_ + : accountBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sync_ = syncBuilder_ == null + ? sync_ + : syncBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.LinkSteamRequest) { + return mergeFrom((com.heroiclabs.nakama.api.LinkSteamRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.LinkSteamRequest other) { + if (other == com.heroiclabs.nakama.api.LinkSteamRequest.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + if (other.hasSync()) { + mergeSync(other.getSync()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getSyncFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.AccountSteam account_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder> accountBuilder_; + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + public com.heroiclabs.nakama.api.AccountSteam getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder setAccount(com.heroiclabs.nakama.api.AccountSteam value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + } else { + accountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder setAccount( + com.heroiclabs.nakama.api.AccountSteam.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(com.heroiclabs.nakama.api.AccountSteam value) { + if (accountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + account_ != null && + account_ != com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance()) { + getAccountBuilder().mergeFrom(value); + } else { + account_ = value; + } + } else { + accountBuilder_.mergeFrom(value); + } + if (account_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + bitField0_ = (bitField0_ & ~0x00000001); + account_ = null; + if (accountBuilder_ != null) { + accountBuilder_.dispose(); + accountBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountSteam.Builder getAccountBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + public com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance() : account_; + } + } + /** + *
+     * The Facebook account details.
+     * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.AccountSteam, com.heroiclabs.nakama.api.AccountSteam.Builder, com.heroiclabs.nakama.api.AccountSteamOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + + private com.google.protobuf.BoolValue sync_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> syncBuilder_; + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + public boolean hasSync() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return The sync. + */ + public com.google.protobuf.BoolValue getSync() { + if (syncBuilder_ == null) { + return sync_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } else { + return syncBuilder_.getMessage(); + } + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder setSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sync_ = value; + } else { + syncBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder setSync( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (syncBuilder_ == null) { + sync_ = builderForValue.build(); + } else { + syncBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder mergeSync(com.google.protobuf.BoolValue value) { + if (syncBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + sync_ != null && + sync_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getSyncBuilder().mergeFrom(value); + } else { + sync_ = value; + } + } else { + syncBuilder_.mergeFrom(value); + } + if (sync_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public Builder clearSync() { + bitField0_ = (bitField0_ & ~0x00000002); + sync_ = null; + if (syncBuilder_ != null) { + syncBuilder_.dispose(); + syncBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValue.Builder getSyncBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSyncFieldBuilder().getBuilder(); + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + public com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder() { + if (syncBuilder_ != null) { + return syncBuilder_.getMessageOrBuilder(); + } else { + return sync_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : sync_; + } + } + /** + *
+     * Import Steam friends for the user.
+     * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getSyncFieldBuilder() { + if (syncBuilder_ == null) { + syncBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getSync(), + getParentForChildren(), + isClean()); + sync_ = null; + } + return syncBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.LinkSteamRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.LinkSteamRequest) + private static final com.heroiclabs.nakama.api.LinkSteamRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.LinkSteamRequest(); + } + + public static com.heroiclabs.nakama.api.LinkSteamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkSteamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.LinkSteamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/LinkSteamRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/LinkSteamRequestOrBuilder.java new file mode 100644 index 00000000..ab18366b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/LinkSteamRequestOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface LinkSteamRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.LinkSteamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + * @return The account. + */ + com.heroiclabs.nakama.api.AccountSteam getAccount(); + /** + *
+   * The Facebook account details.
+   * 
+ * + * .nakama.api.AccountSteam account = 1 [json_name = "account"]; + */ + com.heroiclabs.nakama.api.AccountSteamOrBuilder getAccountOrBuilder(); + + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return Whether the sync field is set. + */ + boolean hasSync(); + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + * @return The sync. + */ + com.google.protobuf.BoolValue getSync(); + /** + *
+   * Import Steam friends for the user.
+   * 
+ * + * .google.protobuf.BoolValue sync = 2 [json_name = "sync"]; + */ + com.google.protobuf.BoolValueOrBuilder getSyncOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequest.java new file mode 100644 index 00000000..a0d71998 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List a channel's message history.
+ * 
+ * + * Protobuf type {@code nakama.api.ListChannelMessagesRequest} + */ +public final class ListChannelMessagesRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListChannelMessagesRequest) + ListChannelMessagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListChannelMessagesRequest.class.getName()); + } + // Use ListChannelMessagesRequest.newBuilder() to construct. + private ListChannelMessagesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListChannelMessagesRequest() { + channelId_ = ""; + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListChannelMessagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListChannelMessagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListChannelMessagesRequest.class, com.heroiclabs.nakama.api.ListChannelMessagesRequest.Builder.class); + } + + private int bitField0_; + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The channel ID to list from.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The channel ID to list from.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int FORWARD_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue forward_; + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + * @return Whether the forward field is set. + */ + @java.lang.Override + public boolean hasForward() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + * @return The forward. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getForward() { + return forward_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : forward_; + } + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getForwardOrBuilder() { + return forward_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : forward_; + } + + public static final int CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getForward()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getForward()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListChannelMessagesRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListChannelMessagesRequest other = (com.heroiclabs.nakama.api.ListChannelMessagesRequest) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (hasForward() != other.hasForward()) return false; + if (hasForward()) { + if (!getForward() + .equals(other.getForward())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + if (hasForward()) { + hash = (37 * hash) + FORWARD_FIELD_NUMBER; + hash = (53 * hash) + getForward().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListChannelMessagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List a channel's message history.
+   * 
+ * + * Protobuf type {@code nakama.api.ListChannelMessagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListChannelMessagesRequest) + com.heroiclabs.nakama.api.ListChannelMessagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListChannelMessagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListChannelMessagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListChannelMessagesRequest.class, com.heroiclabs.nakama.api.ListChannelMessagesRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListChannelMessagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getForwardFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + forward_ = null; + if (forwardBuilder_ != null) { + forwardBuilder_.dispose(); + forwardBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListChannelMessagesRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListChannelMessagesRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListChannelMessagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListChannelMessagesRequest build() { + com.heroiclabs.nakama.api.ListChannelMessagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListChannelMessagesRequest buildPartial() { + com.heroiclabs.nakama.api.ListChannelMessagesRequest result = new com.heroiclabs.nakama.api.ListChannelMessagesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListChannelMessagesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.forward_ = forwardBuilder_ == null + ? forward_ + : forwardBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListChannelMessagesRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListChannelMessagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListChannelMessagesRequest other) { + if (other == com.heroiclabs.nakama.api.ListChannelMessagesRequest.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (other.hasForward()) { + mergeForward(other.getForward()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getForwardFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The channel ID to list from.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The channel ID to list from.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The channel ID to list from.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The channel ID to list from.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The channel ID to list from.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private com.google.protobuf.BoolValue forward_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> forwardBuilder_; + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + * @return Whether the forward field is set. + */ + public boolean hasForward() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + * @return The forward. + */ + public com.google.protobuf.BoolValue getForward() { + if (forwardBuilder_ == null) { + return forward_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : forward_; + } else { + return forwardBuilder_.getMessage(); + } + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + public Builder setForward(com.google.protobuf.BoolValue value) { + if (forwardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + forward_ = value; + } else { + forwardBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + public Builder setForward( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (forwardBuilder_ == null) { + forward_ = builderForValue.build(); + } else { + forwardBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + public Builder mergeForward(com.google.protobuf.BoolValue value) { + if (forwardBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + forward_ != null && + forward_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getForwardBuilder().mergeFrom(value); + } else { + forward_ = value; + } + } else { + forwardBuilder_.mergeFrom(value); + } + if (forward_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + public Builder clearForward() { + bitField0_ = (bitField0_ & ~0x00000004); + forward_ = null; + if (forwardBuilder_ != null) { + forwardBuilder_.dispose(); + forwardBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + public com.google.protobuf.BoolValue.Builder getForwardBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getForwardFieldBuilder().getBuilder(); + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + public com.google.protobuf.BoolValueOrBuilder getForwardOrBuilder() { + if (forwardBuilder_ != null) { + return forwardBuilder_.getMessageOrBuilder(); + } else { + return forward_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : forward_; + } + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getForwardFieldBuilder() { + if (forwardBuilder_ == null) { + forwardBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getForward(), + getParentForChildren(), + isClean()); + forward_ = null; + } + return forwardBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListChannelMessagesRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListChannelMessagesRequest) + private static final com.heroiclabs.nakama.api.ListChannelMessagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListChannelMessagesRequest(); + } + + public static com.heroiclabs.nakama.api.ListChannelMessagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListChannelMessagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListChannelMessagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequestOrBuilder.java new file mode 100644 index 00000000..72fbfba6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListChannelMessagesRequestOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListChannelMessagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListChannelMessagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel ID to list from.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The channel ID to list from.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + * @return Whether the forward field is set. + */ + boolean hasForward(); + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + * @return The forward. + */ + com.google.protobuf.BoolValue getForward(); + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * .google.protobuf.BoolValue forward = 3 [json_name = "forward"]; + */ + com.google.protobuf.BoolValueOrBuilder getForwardOrBuilder(); + + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequest.java new file mode 100644 index 00000000..f0265e61 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequest.java @@ -0,0 +1,770 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + * Protobuf type {@code nakama.api.ListFriendsOfFriendsRequest} + */ +public final class ListFriendsOfFriendsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListFriendsOfFriendsRequest) + ListFriendsOfFriendsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListFriendsOfFriendsRequest.class.getName()); + } + // Use ListFriendsOfFriendsRequest.newBuilder() to construct. + private ListFriendsOfFriendsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListFriendsOfFriendsRequest() { + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsOfFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsOfFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.class, com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.Builder.class); + } + + private int bitField0_; + public static final int LIMIT_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest other = (com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest) obj; + + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code nakama.api.ListFriendsOfFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListFriendsOfFriendsRequest) + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsOfFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsOfFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.class, com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsOfFriendsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest build() { + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest buildPartial() { + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest result = new com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest other) { + if (other == com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.getDefaultInstance()) return this; + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListFriendsOfFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListFriendsOfFriendsRequest) + private static final com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest(); + } + + public static com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFriendsOfFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequestOrBuilder.java new file mode 100644 index 00000000..960b8a09 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListFriendsOfFriendsRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListFriendsOfFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListFriendsOfFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListFriendsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListFriendsRequest.java new file mode 100644 index 00000000..d1b04dbb --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListFriendsRequest.java @@ -0,0 +1,1011 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List friends for a user.
+ * 
+ * + * Protobuf type {@code nakama.api.ListFriendsRequest} + */ +public final class ListFriendsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListFriendsRequest) + ListFriendsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListFriendsRequest.class.getName()); + } + // Use ListFriendsRequest.newBuilder() to construct. + private ListFriendsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListFriendsRequest() { + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListFriendsRequest.class, com.heroiclabs.nakama.api.ListFriendsRequest.Builder.class); + } + + private int bitField0_; + public static final int LIMIT_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int STATE_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value state_; + /** + *
+   * The friend state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + @java.lang.Override + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The friend state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getState() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + /** + *
+   * The friend state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + + public static final int CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getState()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getState()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListFriendsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListFriendsRequest other = (com.heroiclabs.nakama.api.ListFriendsRequest) obj; + + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (hasState() != other.hasState()) return false; + if (hasState()) { + if (!getState() + .equals(other.getState())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListFriendsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListFriendsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListFriendsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListFriendsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List friends for a user.
+   * 
+ * + * Protobuf type {@code nakama.api.ListFriendsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListFriendsRequest) + com.heroiclabs.nakama.api.ListFriendsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListFriendsRequest.class, com.heroiclabs.nakama.api.ListFriendsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListFriendsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListFriendsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListFriendsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsRequest build() { + com.heroiclabs.nakama.api.ListFriendsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsRequest buildPartial() { + com.heroiclabs.nakama.api.ListFriendsRequest result = new com.heroiclabs.nakama.api.ListFriendsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListFriendsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = stateBuilder_ == null + ? state_ + : stateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListFriendsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListFriendsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListFriendsRequest other) { + if (other == com.heroiclabs.nakama.api.ListFriendsRequest.getDefaultInstance()) return this; + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (other.hasState()) { + mergeState(other.getState()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private com.google.protobuf.Int32Value state_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> stateBuilder_; + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + public com.google.protobuf.Int32Value getState() { + if (stateBuilder_ == null) { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } else { + return stateBuilder_.getMessage(); + } + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + } else { + stateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (stateBuilder_ == null) { + state_ = builderForValue.build(); + } else { + stateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder mergeState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + state_ != null && + state_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getStateBuilder().mergeFrom(value); + } else { + state_ = value; + } + } else { + stateBuilder_.mergeFrom(value); + } + if (state_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32Value.Builder getStateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStateFieldBuilder().getBuilder(); + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + if (stateBuilder_ != null) { + return stateBuilder_.getMessageOrBuilder(); + } else { + return state_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + } + /** + *
+     * The friend state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getStateFieldBuilder() { + if (stateBuilder_ == null) { + stateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListFriendsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListFriendsRequest) + private static final com.heroiclabs.nakama.api.ListFriendsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListFriendsRequest(); + } + + public static com.heroiclabs.nakama.api.ListFriendsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFriendsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListFriendsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListFriendsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListFriendsRequestOrBuilder.java new file mode 100644 index 00000000..fb7955fd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListFriendsRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListFriendsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListFriendsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * The friend state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + boolean hasState(); + /** + *
+   * The friend state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + com.google.protobuf.Int32Value getState(); + /** + *
+   * The friend state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder(); + + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequest.java new file mode 100644 index 00000000..a459ac40 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List all users that are part of a group.
+ * 
+ * + * Protobuf type {@code nakama.api.ListGroupUsersRequest} + */ +public final class ListGroupUsersRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListGroupUsersRequest) + ListGroupUsersRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListGroupUsersRequest.class.getName()); + } + // Use ListGroupUsersRequest.newBuilder() to construct. + private ListGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListGroupUsersRequest() { + groupId_ = ""; + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListGroupUsersRequest.class, com.heroiclabs.nakama.api.ListGroupUsersRequest.Builder.class); + } + + private int bitField0_; + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group ID to list from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group ID to list from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value state_; + /** + *
+   * The group user state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return Whether the state field is set. + */ + @java.lang.Override + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The group user state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getState() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + /** + *
+   * The group user state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + + public static final int CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getState()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getState()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListGroupUsersRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListGroupUsersRequest other = (com.heroiclabs.nakama.api.ListGroupUsersRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (hasState() != other.hasState()) return false; + if (hasState()) { + if (!getState() + .equals(other.getState())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListGroupUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List all users that are part of a group.
+   * 
+ * + * Protobuf type {@code nakama.api.ListGroupUsersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListGroupUsersRequest) + com.heroiclabs.nakama.api.ListGroupUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListGroupUsersRequest.class, com.heroiclabs.nakama.api.ListGroupUsersRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListGroupUsersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupUsersRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupUsersRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListGroupUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupUsersRequest build() { + com.heroiclabs.nakama.api.ListGroupUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupUsersRequest buildPartial() { + com.heroiclabs.nakama.api.ListGroupUsersRequest result = new com.heroiclabs.nakama.api.ListGroupUsersRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListGroupUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = stateBuilder_ == null + ? state_ + : stateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListGroupUsersRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListGroupUsersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListGroupUsersRequest other) { + if (other == com.heroiclabs.nakama.api.ListGroupUsersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (other.hasState()) { + mergeState(other.getState()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group ID to list from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group ID to list from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group ID to list from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group ID to list from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group ID to list from.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private com.google.protobuf.Int32Value state_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> stateBuilder_; + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return Whether the state field is set. + */ + public boolean hasState() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return The state. + */ + public com.google.protobuf.Int32Value getState() { + if (stateBuilder_ == null) { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } else { + return stateBuilder_.getMessage(); + } + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder setState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + } else { + stateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder setState( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (stateBuilder_ == null) { + state_ = builderForValue.build(); + } else { + stateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder mergeState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + state_ != null && + state_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getStateBuilder().mergeFrom(value); + } else { + state_ = value; + } + } else { + stateBuilder_.mergeFrom(value); + } + if (state_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public com.google.protobuf.Int32Value.Builder getStateBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStateFieldBuilder().getBuilder(); + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + if (stateBuilder_ != null) { + return stateBuilder_.getMessageOrBuilder(); + } else { + return state_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + } + /** + *
+     * The group user state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getStateFieldBuilder() { + if (stateBuilder_ == null) { + stateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListGroupUsersRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListGroupUsersRequest) + private static final com.heroiclabs.nakama.api.ListGroupUsersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListGroupUsersRequest(); + } + + public static com.heroiclabs.nakama.api.ListGroupUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequestOrBuilder.java new file mode 100644 index 00000000..37019648 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListGroupUsersRequestOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListGroupUsersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListGroupUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group ID to list from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group ID to list from.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * The group user state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return Whether the state field is set. + */ + boolean hasState(); + /** + *
+   * The group user state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return The state. + */ + com.google.protobuf.Int32Value getState(); + /** + *
+   * The group user state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder(); + + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListGroupsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListGroupsRequest.java new file mode 100644 index 00000000..6dfb07fa --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListGroupsRequest.java @@ -0,0 +1,1572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List groups based on given filters.
+ * 
+ * + * Protobuf type {@code nakama.api.ListGroupsRequest} + */ +public final class ListGroupsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListGroupsRequest) + ListGroupsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListGroupsRequest.class.getName()); + } + // Use ListGroupsRequest.newBuilder() to construct. + private ListGroupsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListGroupsRequest() { + name_ = ""; + cursor_ = ""; + langTag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListGroupsRequest.class, com.heroiclabs.nakama.api.ListGroupsRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * List groups that contain this value in their names.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * List groups that contain this value in their names.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * Optional pagination cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * Optional pagination cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIMIT_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of groups to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of groups to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of groups to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int LANG_TAG_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object langTag_ = ""; + /** + *
+   * Language tag filter
+   * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + @java.lang.Override + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } + } + /** + *
+   * Language tag filter
+   * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMBERS_FIELD_NUMBER = 5; + private com.google.protobuf.Int32Value members_; + /** + *
+   * Number of group members
+   * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + * @return Whether the members field is set. + */ + @java.lang.Override + public boolean hasMembers() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Number of group members
+   * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + * @return The members. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMembers() { + return members_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : members_; + } + /** + *
+   * Number of group members
+   * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMembersOrBuilder() { + return members_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : members_; + } + + public static final int OPEN_FIELD_NUMBER = 6; + private com.google.protobuf.BoolValue open_; + /** + *
+   * Optional Open/Closed filter.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return Whether the open field is set. + */ + @java.lang.Override + public boolean hasOpen() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Optional Open/Closed filter.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getOpen() { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + /** + *
+   * Optional Open/Closed filter.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder() { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, langTag_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getMembers()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getOpen()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, langTag_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getMembers()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getOpen()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListGroupsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListGroupsRequest other = (com.heroiclabs.nakama.api.ListGroupsRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getLangTag() + .equals(other.getLangTag())) return false; + if (hasMembers() != other.hasMembers()) return false; + if (hasMembers()) { + if (!getMembers() + .equals(other.getMembers())) return false; + } + if (hasOpen() != other.hasOpen()) return false; + if (hasOpen()) { + if (!getOpen() + .equals(other.getOpen())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + LANG_TAG_FIELD_NUMBER; + hash = (53 * hash) + getLangTag().hashCode(); + if (hasMembers()) { + hash = (37 * hash) + MEMBERS_FIELD_NUMBER; + hash = (53 * hash) + getMembers().hashCode(); + } + if (hasOpen()) { + hash = (37 * hash) + OPEN_FIELD_NUMBER; + hash = (53 * hash) + getOpen().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListGroupsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListGroupsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List groups based on given filters.
+   * 
+ * + * Protobuf type {@code nakama.api.ListGroupsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListGroupsRequest) + com.heroiclabs.nakama.api.ListGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListGroupsRequest.class, com.heroiclabs.nakama.api.ListGroupsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListGroupsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getMembersFieldBuilder(); + getOpenFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + cursor_ = ""; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + langTag_ = ""; + members_ = null; + if (membersBuilder_ != null) { + membersBuilder_.dispose(); + membersBuilder_ = null; + } + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListGroupsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupsRequest build() { + com.heroiclabs.nakama.api.ListGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupsRequest buildPartial() { + com.heroiclabs.nakama.api.ListGroupsRequest result = new com.heroiclabs.nakama.api.ListGroupsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListGroupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.langTag_ = langTag_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.members_ = membersBuilder_ == null + ? members_ + : membersBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.open_ = openBuilder_ == null + ? open_ + : openBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListGroupsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListGroupsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListGroupsRequest other) { + if (other == com.heroiclabs.nakama.api.ListGroupsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getLangTag().isEmpty()) { + langTag_ = other.langTag_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasMembers()) { + mergeMembers(other.getMembers()); + } + if (other.hasOpen()) { + mergeOpen(other.getOpen()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + langTag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getMembersFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getOpenFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * List groups that contain this value in their names.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * List groups that contain this value in their names.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * List groups that contain this value in their names.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * List groups that contain this value in their names.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List groups that contain this value in their names.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * Optional pagination cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional pagination cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional pagination cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional pagination cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional pagination cursor.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of groups to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object langTag_ = ""; + /** + *
+     * Language tag filter
+     * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Language tag filter
+     * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Language tag filter
+     * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @param value The langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTag( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + langTag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Language tag filter
+     * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @return This builder for chaining. + */ + public Builder clearLangTag() { + langTag_ = getDefaultInstance().getLangTag(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Language tag filter
+     * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @param value The bytes for langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + langTag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value members_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> membersBuilder_; + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + * @return Whether the members field is set. + */ + public boolean hasMembers() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + * @return The members. + */ + public com.google.protobuf.Int32Value getMembers() { + if (membersBuilder_ == null) { + return members_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : members_; + } else { + return membersBuilder_.getMessage(); + } + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + public Builder setMembers(com.google.protobuf.Int32Value value) { + if (membersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + members_ = value; + } else { + membersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + public Builder setMembers( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (membersBuilder_ == null) { + members_ = builderForValue.build(); + } else { + membersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + public Builder mergeMembers(com.google.protobuf.Int32Value value) { + if (membersBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + members_ != null && + members_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMembersBuilder().mergeFrom(value); + } else { + members_ = value; + } + } else { + membersBuilder_.mergeFrom(value); + } + if (members_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + public Builder clearMembers() { + bitField0_ = (bitField0_ & ~0x00000010); + members_ = null; + if (membersBuilder_ != null) { + membersBuilder_.dispose(); + membersBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + public com.google.protobuf.Int32Value.Builder getMembersBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMembersFieldBuilder().getBuilder(); + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getMembersOrBuilder() { + if (membersBuilder_ != null) { + return membersBuilder_.getMessageOrBuilder(); + } else { + return members_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : members_; + } + } + /** + *
+     * Number of group members
+     * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getMembersFieldBuilder() { + if (membersBuilder_ == null) { + membersBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getMembers(), + getParentForChildren(), + isClean()); + members_ = null; + } + return membersBuilder_; + } + + private com.google.protobuf.BoolValue open_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> openBuilder_; + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return Whether the open field is set. + */ + public boolean hasOpen() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return The open. + */ + public com.google.protobuf.BoolValue getOpen() { + if (openBuilder_ == null) { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } else { + return openBuilder_.getMessage(); + } + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder setOpen(com.google.protobuf.BoolValue value) { + if (openBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + open_ = value; + } else { + openBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder setOpen( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (openBuilder_ == null) { + open_ = builderForValue.build(); + } else { + openBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder mergeOpen(com.google.protobuf.BoolValue value) { + if (openBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + open_ != null && + open_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getOpenBuilder().mergeFrom(value); + } else { + open_ = value; + } + } else { + openBuilder_.mergeFrom(value); + } + if (open_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder clearOpen() { + bitField0_ = (bitField0_ & ~0x00000020); + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public com.google.protobuf.BoolValue.Builder getOpenBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getOpenFieldBuilder().getBuilder(); + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder() { + if (openBuilder_ != null) { + return openBuilder_.getMessageOrBuilder(); + } else { + return open_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + } + /** + *
+     * Optional Open/Closed filter.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getOpenFieldBuilder() { + if (openBuilder_ == null) { + openBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getOpen(), + getParentForChildren(), + isClean()); + open_ = null; + } + return openBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListGroupsRequest) + private static final com.heroiclabs.nakama.api.ListGroupsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListGroupsRequest(); + } + + public static com.heroiclabs.nakama.api.ListGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListGroupsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListGroupsRequestOrBuilder.java new file mode 100644 index 00000000..fe4fd15b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListGroupsRequestOrBuilder.java @@ -0,0 +1,152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListGroupsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List groups that contain this value in their names.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * List groups that contain this value in their names.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional pagination cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * Optional pagination cursor.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); + + /** + *
+   * Max number of groups to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of groups to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of groups to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * Language tag filter
+   * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + java.lang.String getLangTag(); + /** + *
+   * Language tag filter
+   * 
+ * + * string lang_tag = 4 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + com.google.protobuf.ByteString + getLangTagBytes(); + + /** + *
+   * Number of group members
+   * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + * @return Whether the members field is set. + */ + boolean hasMembers(); + /** + *
+   * Number of group members
+   * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + * @return The members. + */ + com.google.protobuf.Int32Value getMembers(); + /** + *
+   * Number of group members
+   * 
+ * + * .google.protobuf.Int32Value members = 5 [json_name = "members"]; + */ + com.google.protobuf.Int32ValueOrBuilder getMembersOrBuilder(); + + /** + *
+   * Optional Open/Closed filter.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return Whether the open field is set. + */ + boolean hasOpen(); + /** + *
+   * Optional Open/Closed filter.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return The open. + */ + com.google.protobuf.BoolValue getOpen(); + /** + *
+   * Optional Open/Closed filter.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequest.java new file mode 100644 index 00000000..1e9c1e1c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequest.java @@ -0,0 +1,1339 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List leaerboard records from a given leaderboard around the owner.
+ * 
+ * + * Protobuf type {@code nakama.api.ListLeaderboardRecordsAroundOwnerRequest} + */ +public final class ListLeaderboardRecordsAroundOwnerRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListLeaderboardRecordsAroundOwnerRequest) + ListLeaderboardRecordsAroundOwnerRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListLeaderboardRecordsAroundOwnerRequest.class.getName()); + } + // Use ListLeaderboardRecordsAroundOwnerRequest.newBuilder() to construct. + private ListLeaderboardRecordsAroundOwnerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListLeaderboardRecordsAroundOwnerRequest() { + leaderboardId_ = ""; + ownerId_ = ""; + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.class, com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.Builder.class); + } + + private int bitField0_; + public static final int LEADERBOARD_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object leaderboardId_ = ""; + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + @java.lang.Override + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } + } + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private com.google.protobuf.UInt32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getLimit() { + return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } + + public static final int OWNER_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object ownerId_ = ""; + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The ownerId. + */ + @java.lang.Override + public java.lang.String getOwnerId() { + java.lang.Object ref = ownerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerId_ = s; + return s; + } + } + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOwnerIdBytes() { + java.lang.Object ref = ownerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ownerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRY_FIELD_NUMBER = 4; + private com.google.protobuf.Int64Value expiry_; + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + @java.lang.Override + public boolean hasExpiry() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return The expiry. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getExpiry() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + + public static final int CURSOR_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, leaderboardId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ownerId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, ownerId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getExpiry()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, leaderboardId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ownerId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ownerId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getExpiry()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest other = (com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest) obj; + + if (!getLeaderboardId() + .equals(other.getLeaderboardId())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getOwnerId() + .equals(other.getOwnerId())) return false; + if (hasExpiry() != other.hasExpiry()) return false; + if (hasExpiry()) { + if (!getExpiry() + .equals(other.getExpiry())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEADERBOARD_ID_FIELD_NUMBER; + hash = (53 * hash) + getLeaderboardId().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + OWNER_ID_FIELD_NUMBER; + hash = (53 * hash) + getOwnerId().hashCode(); + if (hasExpiry()) { + hash = (37 * hash) + EXPIRY_FIELD_NUMBER; + hash = (53 * hash) + getExpiry().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List leaerboard records from a given leaderboard around the owner.
+   * 
+ * + * Protobuf type {@code nakama.api.ListLeaderboardRecordsAroundOwnerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListLeaderboardRecordsAroundOwnerRequest) + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.class, com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getExpiryFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + leaderboardId_ = ""; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + ownerId_ = ""; + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsAroundOwnerRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest build() { + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest buildPartial() { + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest result = new com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.leaderboardId_ = leaderboardId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ownerId_ = ownerId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.expiry_ = expiryBuilder_ == null + ? expiry_ + : expiryBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest other) { + if (other == com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.getDefaultInstance()) return this; + if (!other.getLeaderboardId().isEmpty()) { + leaderboardId_ = other.leaderboardId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getOwnerId().isEmpty()) { + ownerId_ = other.ownerId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExpiry()) { + mergeExpiry(other.getExpiry()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + leaderboardId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + ownerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getExpiryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object leaderboardId_ = ""; + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return This builder for chaining. + */ + public Builder clearLeaderboardId() { + leaderboardId_ = getDefaultInstance().getLeaderboardId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The bytes for leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.UInt32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.UInt32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.UInt32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.UInt32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + limit_ != null && + limit_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.UInt32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.UInt32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object ownerId_ = ""; + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The ownerId. + */ + public java.lang.String getOwnerId() { + java.lang.Object ref = ownerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + public com.google.protobuf.ByteString + getOwnerIdBytes() { + java.lang.Object ref = ownerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ownerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @param value The ownerId to set. + * @return This builder for chaining. + */ + public Builder setOwnerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ownerId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return This builder for chaining. + */ + public Builder clearOwnerId() { + ownerId_ = getDefaultInstance().getOwnerId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @param value The bytes for ownerId to set. + * @return This builder for chaining. + */ + public Builder setOwnerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ownerId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Int64Value expiry_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> expiryBuilder_; + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + public boolean hasExpiry() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return The expiry. + */ + public com.google.protobuf.Int64Value getExpiry() { + if (expiryBuilder_ == null) { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } else { + return expiryBuilder_.getMessage(); + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder setExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiry_ = value; + } else { + expiryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder setExpiry( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (expiryBuilder_ == null) { + expiry_ = builderForValue.build(); + } else { + expiryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder mergeExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + expiry_ != null && + expiry_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getExpiryBuilder().mergeFrom(value); + } else { + expiry_ = value; + } + } else { + expiryBuilder_.mergeFrom(value); + } + if (expiry_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder clearExpiry() { + bitField0_ = (bitField0_ & ~0x00000008); + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64Value.Builder getExpiryBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExpiryFieldBuilder().getBuilder(); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + if (expiryBuilder_ != null) { + return expiryBuilder_.getMessageOrBuilder(); + } else { + return expiry_ == null ? + com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getExpiryFieldBuilder() { + if (expiryBuilder_ == null) { + expiryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + getExpiry(), + getParentForChildren(), + isClean()); + expiry_ = null; + } + return expiryBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListLeaderboardRecordsAroundOwnerRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListLeaderboardRecordsAroundOwnerRequest) + private static final com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest(); + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLeaderboardRecordsAroundOwnerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequestOrBuilder.java new file mode 100644 index 00000000..7e0f231c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsAroundOwnerRequestOrBuilder.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListLeaderboardRecordsAroundOwnerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListLeaderboardRecordsAroundOwnerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + java.lang.String getLeaderboardId(); + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + com.google.protobuf.ByteString + getLeaderboardIdBytes(); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.UInt32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + com.google.protobuf.UInt32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The ownerId. + */ + java.lang.String getOwnerId(); + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + com.google.protobuf.ByteString + getOwnerIdBytes(); + + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + boolean hasExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return The expiry. + */ + com.google.protobuf.Int64Value getExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder(); + + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequest.java new file mode 100644 index 00000000..468fa304 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequest.java @@ -0,0 +1,1416 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List leaderboard records from a given leaderboard.
+ * 
+ * + * Protobuf type {@code nakama.api.ListLeaderboardRecordsRequest} + */ +public final class ListLeaderboardRecordsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListLeaderboardRecordsRequest) + ListLeaderboardRecordsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListLeaderboardRecordsRequest.class.getName()); + } + // Use ListLeaderboardRecordsRequest.newBuilder() to construct. + private ListLeaderboardRecordsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListLeaderboardRecordsRequest() { + leaderboardId_ = ""; + ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.class, com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.Builder.class); + } + + private int bitField0_; + public static final int LEADERBOARD_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object leaderboardId_ = ""; + /** + *
+   * The ID of the leaderboard to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + @java.lang.Override + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } + } + /** + *
+   * The ID of the leaderboard to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return A list containing the ownerIds. + */ + public com.google.protobuf.ProtocolStringList + getOwnerIdsList() { + return ownerIds_; + } + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return The count of ownerIds. + */ + public int getOwnerIdsCount() { + return ownerIds_.size(); + } + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the element to return. + * @return The ownerIds at the given index. + */ + public java.lang.String getOwnerIds(int index) { + return ownerIds_.get(index); + } + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the value to return. + * @return The bytes of the ownerIds at the given index. + */ + public com.google.protobuf.ByteString + getOwnerIdsBytes(int index) { + return ownerIds_.getByteString(index); + } + + public static final int LIMIT_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRY_FIELD_NUMBER = 5; + private com.google.protobuf.Int64Value expiry_; + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + @java.lang.Override + public boolean hasExpiry() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return The expiry. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getExpiry() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, leaderboardId_); + } + for (int i = 0; i < ownerIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ownerIds_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cursor_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getExpiry()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, leaderboardId_); + } + { + int dataSize = 0; + for (int i = 0; i < ownerIds_.size(); i++) { + dataSize += computeStringSizeNoTag(ownerIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getOwnerIdsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cursor_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getExpiry()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest other = (com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest) obj; + + if (!getLeaderboardId() + .equals(other.getLeaderboardId())) return false; + if (!getOwnerIdsList() + .equals(other.getOwnerIdsList())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (hasExpiry() != other.hasExpiry()) return false; + if (hasExpiry()) { + if (!getExpiry() + .equals(other.getExpiry())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEADERBOARD_ID_FIELD_NUMBER; + hash = (53 * hash) + getLeaderboardId().hashCode(); + if (getOwnerIdsCount() > 0) { + hash = (37 * hash) + OWNER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getOwnerIdsList().hashCode(); + } + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + if (hasExpiry()) { + hash = (37 * hash) + EXPIRY_FIELD_NUMBER; + hash = (53 * hash) + getExpiry().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List leaderboard records from a given leaderboard.
+   * 
+ * + * Protobuf type {@code nakama.api.ListLeaderboardRecordsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListLeaderboardRecordsRequest) + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.class, com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getExpiryFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + leaderboardId_ = ""; + ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + cursor_ = ""; + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListLeaderboardRecordsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest build() { + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest buildPartial() { + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest result = new com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.leaderboardId_ = leaderboardId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + ownerIds_.makeImmutable(); + result.ownerIds_ = ownerIds_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cursor_ = cursor_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.expiry_ = expiryBuilder_ == null + ? expiry_ + : expiryBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest other) { + if (other == com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.getDefaultInstance()) return this; + if (!other.getLeaderboardId().isEmpty()) { + leaderboardId_ = other.leaderboardId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.ownerIds_.isEmpty()) { + if (ownerIds_.isEmpty()) { + ownerIds_ = other.ownerIds_; + bitField0_ |= 0x00000002; + } else { + ensureOwnerIdsIsMutable(); + ownerIds_.addAll(other.ownerIds_); + } + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasExpiry()) { + mergeExpiry(other.getExpiry()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + leaderboardId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureOwnerIdsIsMutable(); + ownerIds_.add(s); + break; + } // case 18 + case 26: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getExpiryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object leaderboardId_ = ""; + /** + *
+     * The ID of the leaderboard to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the leaderboard to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the leaderboard to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return This builder for chaining. + */ + public Builder clearLeaderboardId() { + leaderboardId_ = getDefaultInstance().getLeaderboardId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard to list for.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The bytes for leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureOwnerIdsIsMutable() { + if (!ownerIds_.isModifiable()) { + ownerIds_ = new com.google.protobuf.LazyStringArrayList(ownerIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return A list containing the ownerIds. + */ + public com.google.protobuf.ProtocolStringList + getOwnerIdsList() { + ownerIds_.makeImmutable(); + return ownerIds_; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return The count of ownerIds. + */ + public int getOwnerIdsCount() { + return ownerIds_.size(); + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the element to return. + * @return The ownerIds at the given index. + */ + public java.lang.String getOwnerIds(int index) { + return ownerIds_.get(index); + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the value to return. + * @return The bytes of the ownerIds at the given index. + */ + public com.google.protobuf.ByteString + getOwnerIdsBytes(int index) { + return ownerIds_.getByteString(index); + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index to set the value at. + * @param value The ownerIds to set. + * @return This builder for chaining. + */ + public Builder setOwnerIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureOwnerIdsIsMutable(); + ownerIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param value The ownerIds to add. + * @return This builder for chaining. + */ + public Builder addOwnerIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureOwnerIdsIsMutable(); + ownerIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param values The ownerIds to add. + * @return This builder for chaining. + */ + public Builder addAllOwnerIds( + java.lang.Iterable values) { + ensureOwnerIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ownerIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return This builder for chaining. + */ + public Builder clearOwnerIds() { + ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param value The bytes of the ownerIds to add. + * @return This builder for chaining. + */ + public Builder addOwnerIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureOwnerIdsIsMutable(); + ownerIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Int64Value expiry_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> expiryBuilder_; + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + public boolean hasExpiry() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return The expiry. + */ + public com.google.protobuf.Int64Value getExpiry() { + if (expiryBuilder_ == null) { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } else { + return expiryBuilder_.getMessage(); + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder setExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiry_ = value; + } else { + expiryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder setExpiry( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (expiryBuilder_ == null) { + expiry_ = builderForValue.build(); + } else { + expiryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder mergeExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + expiry_ != null && + expiry_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getExpiryBuilder().mergeFrom(value); + } else { + expiry_ = value; + } + } else { + expiryBuilder_.mergeFrom(value); + } + if (expiry_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder clearExpiry() { + bitField0_ = (bitField0_ & ~0x00000010); + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64Value.Builder getExpiryBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getExpiryFieldBuilder().getBuilder(); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + if (expiryBuilder_ != null) { + return expiryBuilder_.getMessageOrBuilder(); + } else { + return expiry_ == null ? + com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getExpiryFieldBuilder() { + if (expiryBuilder_ == null) { + expiryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + getExpiry(), + getParentForChildren(), + isClean()); + expiry_ = null; + } + return expiryBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListLeaderboardRecordsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListLeaderboardRecordsRequest) + private static final com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest(); + } + + public static com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLeaderboardRecordsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequestOrBuilder.java new file mode 100644 index 00000000..e583ae73 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListLeaderboardRecordsRequestOrBuilder.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListLeaderboardRecordsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListLeaderboardRecordsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the leaderboard to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + java.lang.String getLeaderboardId(); + /** + *
+   * The ID of the leaderboard to list for.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + com.google.protobuf.ByteString + getLeaderboardIdBytes(); + + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return A list containing the ownerIds. + */ + java.util.List + getOwnerIdsList(); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return The count of ownerIds. + */ + int getOwnerIdsCount(); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the element to return. + * @return The ownerIds at the given index. + */ + java.lang.String getOwnerIds(int index); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the value to return. + * @return The bytes of the ownerIds at the given index. + */ + com.google.protobuf.ByteString + getOwnerIdsBytes(int index); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); + + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + boolean hasExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return The expiry. + */ + com.google.protobuf.Int64Value getExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListMatchesRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListMatchesRequest.java new file mode 100644 index 00000000..97b56afd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListMatchesRequest.java @@ -0,0 +1,1779 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List realtime matches.
+ * 
+ * + * Protobuf type {@code nakama.api.ListMatchesRequest} + */ +public final class ListMatchesRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListMatchesRequest) + ListMatchesRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListMatchesRequest.class.getName()); + } + // Use ListMatchesRequest.newBuilder() to construct. + private ListMatchesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListMatchesRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListMatchesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListMatchesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListMatchesRequest.class, com.heroiclabs.nakama.api.ListMatchesRequest.Builder.class); + } + + private int bitField0_; + public static final int LIMIT_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Limit the number of returned matches.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Limit the number of returned matches.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Limit the number of returned matches.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int AUTHORITATIVE_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue authoritative_; + /** + *
+   * Authoritative or relayed matches.
+   * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + * @return Whether the authoritative field is set. + */ + @java.lang.Override + public boolean hasAuthoritative() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Authoritative or relayed matches.
+   * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getAuthoritative() { + return authoritative_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : authoritative_; + } + /** + *
+   * Authoritative or relayed matches.
+   * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getAuthoritativeOrBuilder() { + return authoritative_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : authoritative_; + } + + public static final int LABEL_FIELD_NUMBER = 3; + private com.google.protobuf.StringValue label_; + /** + *
+   * Label filter.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + @java.lang.Override + public boolean hasLabel() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Label filter.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + @java.lang.Override + public com.google.protobuf.StringValue getLabel() { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + /** + *
+   * Label filter.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getLabelOrBuilder() { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + + public static final int MIN_SIZE_FIELD_NUMBER = 4; + private com.google.protobuf.Int32Value minSize_; + /** + *
+   * Minimum user count.
+   * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + * @return Whether the minSize field is set. + */ + @java.lang.Override + public boolean hasMinSize() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * Minimum user count.
+   * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + * @return The minSize. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMinSize() { + return minSize_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : minSize_; + } + /** + *
+   * Minimum user count.
+   * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMinSizeOrBuilder() { + return minSize_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : minSize_; + } + + public static final int MAX_SIZE_FIELD_NUMBER = 5; + private com.google.protobuf.Int32Value maxSize_; + /** + *
+   * Maximum user count.
+   * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + * @return Whether the maxSize field is set. + */ + @java.lang.Override + public boolean hasMaxSize() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+   * Maximum user count.
+   * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + * @return The maxSize. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getMaxSize() { + return maxSize_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : maxSize_; + } + /** + *
+   * Maximum user count.
+   * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getMaxSizeOrBuilder() { + return maxSize_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : maxSize_; + } + + public static final int QUERY_FIELD_NUMBER = 6; + private com.google.protobuf.StringValue query_; + /** + *
+   * Arbitrary label query.
+   * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+   * Arbitrary label query.
+   * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + * @return The query. + */ + @java.lang.Override + public com.google.protobuf.StringValue getQuery() { + return query_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : query_; + } + /** + *
+   * Arbitrary label query.
+   * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getQueryOrBuilder() { + return query_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : query_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAuthoritative()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getLabel()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getMinSize()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getMaxSize()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(6, getQuery()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAuthoritative()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLabel()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getMinSize()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getMaxSize()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getQuery()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListMatchesRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListMatchesRequest other = (com.heroiclabs.nakama.api.ListMatchesRequest) obj; + + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (hasAuthoritative() != other.hasAuthoritative()) return false; + if (hasAuthoritative()) { + if (!getAuthoritative() + .equals(other.getAuthoritative())) return false; + } + if (hasLabel() != other.hasLabel()) return false; + if (hasLabel()) { + if (!getLabel() + .equals(other.getLabel())) return false; + } + if (hasMinSize() != other.hasMinSize()) return false; + if (hasMinSize()) { + if (!getMinSize() + .equals(other.getMinSize())) return false; + } + if (hasMaxSize() != other.hasMaxSize()) return false; + if (hasMaxSize()) { + if (!getMaxSize() + .equals(other.getMaxSize())) return false; + } + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery() + .equals(other.getQuery())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + if (hasAuthoritative()) { + hash = (37 * hash) + AUTHORITATIVE_FIELD_NUMBER; + hash = (53 * hash) + getAuthoritative().hashCode(); + } + if (hasLabel()) { + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + } + if (hasMinSize()) { + hash = (37 * hash) + MIN_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMinSize().hashCode(); + } + if (hasMaxSize()) { + hash = (37 * hash) + MAX_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxSize().hashCode(); + } + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListMatchesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListMatchesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListMatchesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListMatchesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List realtime matches.
+   * 
+ * + * Protobuf type {@code nakama.api.ListMatchesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListMatchesRequest) + com.heroiclabs.nakama.api.ListMatchesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListMatchesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListMatchesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListMatchesRequest.class, com.heroiclabs.nakama.api.ListMatchesRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListMatchesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getAuthoritativeFieldBuilder(); + getLabelFieldBuilder(); + getMinSizeFieldBuilder(); + getMaxSizeFieldBuilder(); + getQueryFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + authoritative_ = null; + if (authoritativeBuilder_ != null) { + authoritativeBuilder_.dispose(); + authoritativeBuilder_ = null; + } + label_ = null; + if (labelBuilder_ != null) { + labelBuilder_.dispose(); + labelBuilder_ = null; + } + minSize_ = null; + if (minSizeBuilder_ != null) { + minSizeBuilder_.dispose(); + minSizeBuilder_ = null; + } + maxSize_ = null; + if (maxSizeBuilder_ != null) { + maxSizeBuilder_.dispose(); + maxSizeBuilder_ = null; + } + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListMatchesRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListMatchesRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListMatchesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListMatchesRequest build() { + com.heroiclabs.nakama.api.ListMatchesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListMatchesRequest buildPartial() { + com.heroiclabs.nakama.api.ListMatchesRequest result = new com.heroiclabs.nakama.api.ListMatchesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListMatchesRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authoritative_ = authoritativeBuilder_ == null + ? authoritative_ + : authoritativeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.label_ = labelBuilder_ == null + ? label_ + : labelBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.minSize_ = minSizeBuilder_ == null + ? minSize_ + : minSizeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.maxSize_ = maxSizeBuilder_ == null + ? maxSize_ + : maxSizeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.query_ = queryBuilder_ == null + ? query_ + : queryBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListMatchesRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListMatchesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListMatchesRequest other) { + if (other == com.heroiclabs.nakama.api.ListMatchesRequest.getDefaultInstance()) return this; + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (other.hasAuthoritative()) { + mergeAuthoritative(other.getAuthoritative()); + } + if (other.hasLabel()) { + mergeLabel(other.getLabel()); + } + if (other.hasMinSize()) { + mergeMinSize(other.getMinSize()); + } + if (other.hasMaxSize()) { + mergeMaxSize(other.getMaxSize()); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getAuthoritativeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getLabelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getMinSizeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getMaxSizeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getQueryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Limit the number of returned matches.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private com.google.protobuf.BoolValue authoritative_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> authoritativeBuilder_; + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + * @return Whether the authoritative field is set. + */ + public boolean hasAuthoritative() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + public com.google.protobuf.BoolValue getAuthoritative() { + if (authoritativeBuilder_ == null) { + return authoritative_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : authoritative_; + } else { + return authoritativeBuilder_.getMessage(); + } + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + public Builder setAuthoritative(com.google.protobuf.BoolValue value) { + if (authoritativeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authoritative_ = value; + } else { + authoritativeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + public Builder setAuthoritative( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (authoritativeBuilder_ == null) { + authoritative_ = builderForValue.build(); + } else { + authoritativeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + public Builder mergeAuthoritative(com.google.protobuf.BoolValue value) { + if (authoritativeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + authoritative_ != null && + authoritative_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getAuthoritativeBuilder().mergeFrom(value); + } else { + authoritative_ = value; + } + } else { + authoritativeBuilder_.mergeFrom(value); + } + if (authoritative_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + public Builder clearAuthoritative() { + bitField0_ = (bitField0_ & ~0x00000002); + authoritative_ = null; + if (authoritativeBuilder_ != null) { + authoritativeBuilder_.dispose(); + authoritativeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + public com.google.protobuf.BoolValue.Builder getAuthoritativeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAuthoritativeFieldBuilder().getBuilder(); + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + public com.google.protobuf.BoolValueOrBuilder getAuthoritativeOrBuilder() { + if (authoritativeBuilder_ != null) { + return authoritativeBuilder_.getMessageOrBuilder(); + } else { + return authoritative_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : authoritative_; + } + } + /** + *
+     * Authoritative or relayed matches.
+     * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getAuthoritativeFieldBuilder() { + if (authoritativeBuilder_ == null) { + authoritativeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getAuthoritative(), + getParentForChildren(), + isClean()); + authoritative_ = null; + } + return authoritativeBuilder_; + } + + private com.google.protobuf.StringValue label_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> labelBuilder_; + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + public boolean hasLabel() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + public com.google.protobuf.StringValue getLabel() { + if (labelBuilder_ == null) { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } else { + return labelBuilder_.getMessage(); + } + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder setLabel(com.google.protobuf.StringValue value) { + if (labelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + label_ = value; + } else { + labelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder setLabel( + com.google.protobuf.StringValue.Builder builderForValue) { + if (labelBuilder_ == null) { + label_ = builderForValue.build(); + } else { + labelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder mergeLabel(com.google.protobuf.StringValue value) { + if (labelBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + label_ != null && + label_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getLabelBuilder().mergeFrom(value); + } else { + label_ = value; + } + } else { + labelBuilder_.mergeFrom(value); + } + if (label_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder clearLabel() { + bitField0_ = (bitField0_ & ~0x00000004); + label_ = null; + if (labelBuilder_ != null) { + labelBuilder_.dispose(); + labelBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public com.google.protobuf.StringValue.Builder getLabelBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLabelFieldBuilder().getBuilder(); + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public com.google.protobuf.StringValueOrBuilder getLabelOrBuilder() { + if (labelBuilder_ != null) { + return labelBuilder_.getMessageOrBuilder(); + } else { + return label_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + } + /** + *
+     * Label filter.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getLabelFieldBuilder() { + if (labelBuilder_ == null) { + labelBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getLabel(), + getParentForChildren(), + isClean()); + label_ = null; + } + return labelBuilder_; + } + + private com.google.protobuf.Int32Value minSize_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> minSizeBuilder_; + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + * @return Whether the minSize field is set. + */ + public boolean hasMinSize() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + * @return The minSize. + */ + public com.google.protobuf.Int32Value getMinSize() { + if (minSizeBuilder_ == null) { + return minSize_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : minSize_; + } else { + return minSizeBuilder_.getMessage(); + } + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + public Builder setMinSize(com.google.protobuf.Int32Value value) { + if (minSizeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minSize_ = value; + } else { + minSizeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + public Builder setMinSize( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (minSizeBuilder_ == null) { + minSize_ = builderForValue.build(); + } else { + minSizeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + public Builder mergeMinSize(com.google.protobuf.Int32Value value) { + if (minSizeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + minSize_ != null && + minSize_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMinSizeBuilder().mergeFrom(value); + } else { + minSize_ = value; + } + } else { + minSizeBuilder_.mergeFrom(value); + } + if (minSize_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + public Builder clearMinSize() { + bitField0_ = (bitField0_ & ~0x00000008); + minSize_ = null; + if (minSizeBuilder_ != null) { + minSizeBuilder_.dispose(); + minSizeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + public com.google.protobuf.Int32Value.Builder getMinSizeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMinSizeFieldBuilder().getBuilder(); + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getMinSizeOrBuilder() { + if (minSizeBuilder_ != null) { + return minSizeBuilder_.getMessageOrBuilder(); + } else { + return minSize_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : minSize_; + } + } + /** + *
+     * Minimum user count.
+     * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getMinSizeFieldBuilder() { + if (minSizeBuilder_ == null) { + minSizeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getMinSize(), + getParentForChildren(), + isClean()); + minSize_ = null; + } + return minSizeBuilder_; + } + + private com.google.protobuf.Int32Value maxSize_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> maxSizeBuilder_; + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + * @return Whether the maxSize field is set. + */ + public boolean hasMaxSize() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + * @return The maxSize. + */ + public com.google.protobuf.Int32Value getMaxSize() { + if (maxSizeBuilder_ == null) { + return maxSize_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : maxSize_; + } else { + return maxSizeBuilder_.getMessage(); + } + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + public Builder setMaxSize(com.google.protobuf.Int32Value value) { + if (maxSizeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxSize_ = value; + } else { + maxSizeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + public Builder setMaxSize( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (maxSizeBuilder_ == null) { + maxSize_ = builderForValue.build(); + } else { + maxSizeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + public Builder mergeMaxSize(com.google.protobuf.Int32Value value) { + if (maxSizeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + maxSize_ != null && + maxSize_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getMaxSizeBuilder().mergeFrom(value); + } else { + maxSize_ = value; + } + } else { + maxSizeBuilder_.mergeFrom(value); + } + if (maxSize_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + public Builder clearMaxSize() { + bitField0_ = (bitField0_ & ~0x00000010); + maxSize_ = null; + if (maxSizeBuilder_ != null) { + maxSizeBuilder_.dispose(); + maxSizeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + public com.google.protobuf.Int32Value.Builder getMaxSizeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMaxSizeFieldBuilder().getBuilder(); + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getMaxSizeOrBuilder() { + if (maxSizeBuilder_ != null) { + return maxSizeBuilder_.getMessageOrBuilder(); + } else { + return maxSize_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : maxSize_; + } + } + /** + *
+     * Maximum user count.
+     * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getMaxSizeFieldBuilder() { + if (maxSizeBuilder_ == null) { + maxSizeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getMaxSize(), + getParentForChildren(), + isClean()); + maxSize_ = null; + } + return maxSizeBuilder_; + } + + private com.google.protobuf.StringValue query_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> queryBuilder_; + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + * @return The query. + */ + public com.google.protobuf.StringValue getQuery() { + if (queryBuilder_ == null) { + return query_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + public Builder setQuery(com.google.protobuf.StringValue value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + public Builder setQuery( + com.google.protobuf.StringValue.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + public Builder mergeQuery(com.google.protobuf.StringValue value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + query_ != null && + query_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + if (query_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000020); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + public com.google.protobuf.StringValue.Builder getQueryBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + public com.google.protobuf.StringValueOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : query_; + } + } + /** + *
+     * Arbitrary label query.
+     * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getQuery(), + getParentForChildren(), + isClean()); + query_ = null; + } + return queryBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListMatchesRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListMatchesRequest) + private static final com.heroiclabs.nakama.api.ListMatchesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListMatchesRequest(); + } + + public static com.heroiclabs.nakama.api.ListMatchesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMatchesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListMatchesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListMatchesRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListMatchesRequestOrBuilder.java new file mode 100644 index 00000000..5637d764 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListMatchesRequestOrBuilder.java @@ -0,0 +1,173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListMatchesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListMatchesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Limit the number of returned matches.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Limit the number of returned matches.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Limit the number of returned matches.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * Authoritative or relayed matches.
+   * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + * @return Whether the authoritative field is set. + */ + boolean hasAuthoritative(); + /** + *
+   * Authoritative or relayed matches.
+   * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + com.google.protobuf.BoolValue getAuthoritative(); + /** + *
+   * Authoritative or relayed matches.
+   * 
+ * + * .google.protobuf.BoolValue authoritative = 2 [json_name = "authoritative"]; + */ + com.google.protobuf.BoolValueOrBuilder getAuthoritativeOrBuilder(); + + /** + *
+   * Label filter.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + boolean hasLabel(); + /** + *
+   * Label filter.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + com.google.protobuf.StringValue getLabel(); + /** + *
+   * Label filter.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + com.google.protobuf.StringValueOrBuilder getLabelOrBuilder(); + + /** + *
+   * Minimum user count.
+   * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + * @return Whether the minSize field is set. + */ + boolean hasMinSize(); + /** + *
+   * Minimum user count.
+   * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + * @return The minSize. + */ + com.google.protobuf.Int32Value getMinSize(); + /** + *
+   * Minimum user count.
+   * 
+ * + * .google.protobuf.Int32Value min_size = 4 [json_name = "minSize"]; + */ + com.google.protobuf.Int32ValueOrBuilder getMinSizeOrBuilder(); + + /** + *
+   * Maximum user count.
+   * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + * @return Whether the maxSize field is set. + */ + boolean hasMaxSize(); + /** + *
+   * Maximum user count.
+   * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + * @return The maxSize. + */ + com.google.protobuf.Int32Value getMaxSize(); + /** + *
+   * Maximum user count.
+   * 
+ * + * .google.protobuf.Int32Value max_size = 5 [json_name = "maxSize"]; + */ + com.google.protobuf.Int32ValueOrBuilder getMaxSizeOrBuilder(); + + /** + *
+   * Arbitrary label query.
+   * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + *
+   * Arbitrary label query.
+   * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + * @return The query. + */ + com.google.protobuf.StringValue getQuery(); + /** + *
+   * Arbitrary label query.
+   * 
+ * + * .google.protobuf.StringValue query = 6 [json_name = "query"]; + */ + com.google.protobuf.StringValueOrBuilder getQueryOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequest.java new file mode 100644 index 00000000..851e14e9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Get a list of unexpired notifications.
+ * 
+ * + * Protobuf type {@code nakama.api.ListNotificationsRequest} + */ +public final class ListNotificationsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListNotificationsRequest) + ListNotificationsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListNotificationsRequest.class.getName()); + } + // Use ListNotificationsRequest.newBuilder() to construct. + private ListNotificationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListNotificationsRequest() { + cacheableCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListNotificationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListNotificationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListNotificationsRequest.class, com.heroiclabs.nakama.api.ListNotificationsRequest.Builder.class); + } + + private int bitField0_; + public static final int LIMIT_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * The number of notifications to get. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The number of notifications to get. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * The number of notifications to get. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int CACHEABLE_CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cacheableCursor_ = ""; + /** + *
+   * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + @java.lang.Override + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } + } + /** + *
+   * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cacheableCursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cacheableCursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListNotificationsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListNotificationsRequest other = (com.heroiclabs.nakama.api.ListNotificationsRequest) obj; + + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getCacheableCursor() + .equals(other.getCacheableCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + CACHEABLE_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCacheableCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListNotificationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListNotificationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Get a list of unexpired notifications.
+   * 
+ * + * Protobuf type {@code nakama.api.ListNotificationsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListNotificationsRequest) + com.heroiclabs.nakama.api.ListNotificationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListNotificationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListNotificationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListNotificationsRequest.class, com.heroiclabs.nakama.api.ListNotificationsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListNotificationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + cacheableCursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListNotificationsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListNotificationsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListNotificationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListNotificationsRequest build() { + com.heroiclabs.nakama.api.ListNotificationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListNotificationsRequest buildPartial() { + com.heroiclabs.nakama.api.ListNotificationsRequest result = new com.heroiclabs.nakama.api.ListNotificationsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListNotificationsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cacheableCursor_ = cacheableCursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListNotificationsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListNotificationsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListNotificationsRequest other) { + if (other == com.heroiclabs.nakama.api.ListNotificationsRequest.getDefaultInstance()) return this; + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getCacheableCursor().isEmpty()) { + cacheableCursor_ = other.cacheableCursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + cacheableCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * The number of notifications to get. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object cacheableCursor_ = ""; + /** + *
+     * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @param value The cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cacheableCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return This builder for chaining. + */ + public Builder clearCacheableCursor() { + cacheableCursor_ = getDefaultInstance().getCacheableCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @param value The bytes for cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cacheableCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListNotificationsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListNotificationsRequest) + private static final com.heroiclabs.nakama.api.ListNotificationsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListNotificationsRequest(); + } + + public static com.heroiclabs.nakama.api.ListNotificationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNotificationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListNotificationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequestOrBuilder.java new file mode 100644 index 00000000..22316bd9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListNotificationsRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListNotificationsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListNotificationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The number of notifications to get. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * The number of notifications to get. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * The number of notifications to get. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + java.lang.String getCacheableCursor(); + /** + *
+   * A cursor to page through notifications. May be cached by clients to get from point in time forwards.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + com.google.protobuf.ByteString + getCacheableCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequest.java new file mode 100644 index 00000000..5444c54d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequest.java @@ -0,0 +1,1106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List publicly readable storage objects in a given collection.
+ * 
+ * + * Protobuf type {@code nakama.api.ListStorageObjectsRequest} + */ +public final class ListStorageObjectsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListStorageObjectsRequest) + ListStorageObjectsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListStorageObjectsRequest.class.getName()); + } + // Use ListStorageObjectsRequest.newBuilder() to construct. + private ListStorageObjectsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListStorageObjectsRequest() { + userId_ = ""; + collection_ = ""; + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListStorageObjectsRequest.class, com.heroiclabs.nakama.api.ListStorageObjectsRequest.Builder.class); + } + + private int bitField0_; + public static final int USER_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLECTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 2 [json_name = "collection"]; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 2 [json_name = "collection"]; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIMIT_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * The number of storage objects to list. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The number of storage objects to list. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * The number of storage objects to list. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * The cursor to page through results from.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * The cursor to page through results from.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, collection_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, collection_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListStorageObjectsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListStorageObjectsRequest other = (com.heroiclabs.nakama.api.ListStorageObjectsRequest) obj; + + if (!getUserId() + .equals(other.getUserId())) return false; + if (!getCollection() + .equals(other.getCollection())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListStorageObjectsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List publicly readable storage objects in a given collection.
+   * 
+ * + * Protobuf type {@code nakama.api.ListStorageObjectsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListStorageObjectsRequest) + com.heroiclabs.nakama.api.ListStorageObjectsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListStorageObjectsRequest.class, com.heroiclabs.nakama.api.ListStorageObjectsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListStorageObjectsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = ""; + collection_ = ""; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListStorageObjectsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListStorageObjectsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListStorageObjectsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListStorageObjectsRequest build() { + com.heroiclabs.nakama.api.ListStorageObjectsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListStorageObjectsRequest buildPartial() { + com.heroiclabs.nakama.api.ListStorageObjectsRequest result = new com.heroiclabs.nakama.api.ListStorageObjectsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListStorageObjectsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.collection_ = collection_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListStorageObjectsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListStorageObjectsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListStorageObjectsRequest other) { + if (other == com.heroiclabs.nakama.api.ListStorageObjectsRequest.getDefaultInstance()) return this; + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object userId_ = ""; + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object collection_ = ""; + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 2 [json_name = "collection"]; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 2 [json_name = "collection"]; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 2 [json_name = "collection"]; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 2 [json_name = "collection"]; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 2 [json_name = "collection"]; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * The number of storage objects to list. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * The cursor to page through results from.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to page through results from.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to page through results from.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cursor to page through results from.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cursor to page through results from.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListStorageObjectsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListStorageObjectsRequest) + private static final com.heroiclabs.nakama.api.ListStorageObjectsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListStorageObjectsRequest(); + } + + public static com.heroiclabs.nakama.api.ListStorageObjectsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListStorageObjectsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListStorageObjectsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequestOrBuilder.java new file mode 100644 index 00000000..3aba8df1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListStorageObjectsRequestOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListStorageObjectsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListStorageObjectsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 2 [json_name = "collection"]; + * @return The collection. + */ + java.lang.String getCollection(); + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 2 [json_name = "collection"]; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + *
+   * The number of storage objects to list. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * The number of storage objects to list. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * The number of storage objects to list. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * The cursor to page through results from.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * The cursor to page through results from.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequest.java new file mode 100644 index 00000000..15ea95b8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List user subscriptions.
+ * 
+ * + * Protobuf type {@code nakama.api.ListSubscriptionsRequest} + */ +public final class ListSubscriptionsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListSubscriptionsRequest) + ListSubscriptionsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListSubscriptionsRequest.class.getName()); + } + // Use ListSubscriptionsRequest.newBuilder() to construct. + private ListSubscriptionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListSubscriptionsRequest() { + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListSubscriptionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListSubscriptionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListSubscriptionsRequest.class, com.heroiclabs.nakama.api.ListSubscriptionsRequest.Builder.class); + } + + private int bitField0_; + public static final int LIMIT_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of results per page
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of results per page
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of results per page
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * Cursor to retrieve a page of records from
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * Cursor to retrieve a page of records from
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListSubscriptionsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListSubscriptionsRequest other = (com.heroiclabs.nakama.api.ListSubscriptionsRequest) obj; + + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListSubscriptionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List user subscriptions.
+   * 
+ * + * Protobuf type {@code nakama.api.ListSubscriptionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListSubscriptionsRequest) + com.heroiclabs.nakama.api.ListSubscriptionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListSubscriptionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListSubscriptionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListSubscriptionsRequest.class, com.heroiclabs.nakama.api.ListSubscriptionsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListSubscriptionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListSubscriptionsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListSubscriptionsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListSubscriptionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListSubscriptionsRequest build() { + com.heroiclabs.nakama.api.ListSubscriptionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListSubscriptionsRequest buildPartial() { + com.heroiclabs.nakama.api.ListSubscriptionsRequest result = new com.heroiclabs.nakama.api.ListSubscriptionsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListSubscriptionsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListSubscriptionsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListSubscriptionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListSubscriptionsRequest other) { + if (other == com.heroiclabs.nakama.api.ListSubscriptionsRequest.getDefaultInstance()) return this; + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of results per page
+     * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * Cursor to retrieve a page of records from
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Cursor to retrieve a page of records from
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Cursor to retrieve a page of records from
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Cursor to retrieve a page of records from
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Cursor to retrieve a page of records from
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListSubscriptionsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListSubscriptionsRequest) + private static final com.heroiclabs.nakama.api.ListSubscriptionsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListSubscriptionsRequest(); + } + + public static com.heroiclabs.nakama.api.ListSubscriptionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubscriptionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListSubscriptionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequestOrBuilder.java new file mode 100644 index 00000000..1dc85dc0 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListSubscriptionsRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListSubscriptionsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListSubscriptionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Max number of results per page
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of results per page
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of results per page
+   * 
+ * + * .google.protobuf.Int32Value limit = 1 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * Cursor to retrieve a page of records from
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * Cursor to retrieve a page of records from
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequest.java new file mode 100644 index 00000000..df16c7f5 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequest.java @@ -0,0 +1,1339 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List tournament records from a given tournament around the owner.
+ * 
+ * + * Protobuf type {@code nakama.api.ListTournamentRecordsAroundOwnerRequest} + */ +public final class ListTournamentRecordsAroundOwnerRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListTournamentRecordsAroundOwnerRequest) + ListTournamentRecordsAroundOwnerRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListTournamentRecordsAroundOwnerRequest.class.getName()); + } + // Use ListTournamentRecordsAroundOwnerRequest.newBuilder() to construct. + private ListTournamentRecordsAroundOwnerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListTournamentRecordsAroundOwnerRequest() { + tournamentId_ = ""; + ownerId_ = ""; + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.class, com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.Builder.class); + } + + private int bitField0_; + public static final int TOURNAMENT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object tournamentId_ = ""; + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + @java.lang.Override + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } + } + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private com.google.protobuf.UInt32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getLimit() { + return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } + + public static final int OWNER_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object ownerId_ = ""; + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The ownerId. + */ + @java.lang.Override + public java.lang.String getOwnerId() { + java.lang.Object ref = ownerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerId_ = s; + return s; + } + } + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOwnerIdBytes() { + java.lang.Object ref = ownerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ownerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRY_FIELD_NUMBER = 4; + private com.google.protobuf.Int64Value expiry_; + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + @java.lang.Override + public boolean hasExpiry() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return The expiry. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getExpiry() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + + public static final int CURSOR_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tournamentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ownerId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, ownerId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getExpiry()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tournamentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ownerId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ownerId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getExpiry()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest other = (com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest) obj; + + if (!getTournamentId() + .equals(other.getTournamentId())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getOwnerId() + .equals(other.getOwnerId())) return false; + if (hasExpiry() != other.hasExpiry()) return false; + if (hasExpiry()) { + if (!getExpiry() + .equals(other.getExpiry())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOURNAMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTournamentId().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + OWNER_ID_FIELD_NUMBER; + hash = (53 * hash) + getOwnerId().hashCode(); + if (hasExpiry()) { + hash = (37 * hash) + EXPIRY_FIELD_NUMBER; + hash = (53 * hash) + getExpiry().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List tournament records from a given tournament around the owner.
+   * 
+ * + * Protobuf type {@code nakama.api.ListTournamentRecordsAroundOwnerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListTournamentRecordsAroundOwnerRequest) + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.class, com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getExpiryFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tournamentId_ = ""; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + ownerId_ = ""; + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsAroundOwnerRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest build() { + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest buildPartial() { + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest result = new com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tournamentId_ = tournamentId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ownerId_ = ownerId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.expiry_ = expiryBuilder_ == null + ? expiry_ + : expiryBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest other) { + if (other == com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.getDefaultInstance()) return this; + if (!other.getTournamentId().isEmpty()) { + tournamentId_ = other.tournamentId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getOwnerId().isEmpty()) { + ownerId_ = other.ownerId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExpiry()) { + mergeExpiry(other.getExpiry()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tournamentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + ownerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getExpiryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object tournamentId_ = ""; + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return This builder for chaining. + */ + public Builder clearTournamentId() { + tournamentId_ = getDefaultInstance().getTournamentId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The bytes for tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.UInt32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.UInt32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.UInt32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.UInt32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + limit_ != null && + limit_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.UInt32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.UInt32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object ownerId_ = ""; + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The ownerId. + */ + public java.lang.String getOwnerId() { + java.lang.Object ref = ownerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + public com.google.protobuf.ByteString + getOwnerIdBytes() { + java.lang.Object ref = ownerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ownerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @param value The ownerId to set. + * @return This builder for chaining. + */ + public Builder setOwnerId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ownerId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return This builder for chaining. + */ + public Builder clearOwnerId() { + ownerId_ = getDefaultInstance().getOwnerId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The owner to retrieve records around.
+     * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @param value The bytes for ownerId to set. + * @return This builder for chaining. + */ + public Builder setOwnerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ownerId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Int64Value expiry_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> expiryBuilder_; + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + public boolean hasExpiry() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return The expiry. + */ + public com.google.protobuf.Int64Value getExpiry() { + if (expiryBuilder_ == null) { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } else { + return expiryBuilder_.getMessage(); + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder setExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiry_ = value; + } else { + expiryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder setExpiry( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (expiryBuilder_ == null) { + expiry_ = builderForValue.build(); + } else { + expiryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder mergeExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + expiry_ != null && + expiry_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getExpiryBuilder().mergeFrom(value); + } else { + expiry_ = value; + } + } else { + expiryBuilder_.mergeFrom(value); + } + if (expiry_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public Builder clearExpiry() { + bitField0_ = (bitField0_ & ~0x00000008); + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64Value.Builder getExpiryBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExpiryFieldBuilder().getBuilder(); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + if (expiryBuilder_ != null) { + return expiryBuilder_.getMessageOrBuilder(); + } else { + return expiry_ == null ? + com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getExpiryFieldBuilder() { + if (expiryBuilder_ == null) { + expiryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + getExpiry(), + getParentForChildren(), + isClean()); + expiry_ = null; + } + return expiryBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListTournamentRecordsAroundOwnerRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListTournamentRecordsAroundOwnerRequest) + private static final com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest(); + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTournamentRecordsAroundOwnerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequestOrBuilder.java new file mode 100644 index 00000000..63bc1139 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsAroundOwnerRequestOrBuilder.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListTournamentRecordsAroundOwnerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListTournamentRecordsAroundOwnerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + java.lang.String getTournamentId(); + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + com.google.protobuf.ByteString + getTournamentIdBytes(); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.UInt32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.UInt32Value limit = 2 [json_name = "limit"]; + */ + com.google.protobuf.UInt32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The ownerId. + */ + java.lang.String getOwnerId(); + /** + *
+   * The owner to retrieve records around.
+   * 
+ * + * string owner_id = 3 [json_name = "ownerId"]; + * @return The bytes for ownerId. + */ + com.google.protobuf.ByteString + getOwnerIdBytes(); + + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + boolean hasExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + * @return The expiry. + */ + com.google.protobuf.Int64Value getExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 4 [json_name = "expiry"]; + */ + com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder(); + + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 5 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequest.java new file mode 100644 index 00000000..147e4554 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequest.java @@ -0,0 +1,1416 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List tournament records from a given tournament.
+ * 
+ * + * Protobuf type {@code nakama.api.ListTournamentRecordsRequest} + */ +public final class ListTournamentRecordsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListTournamentRecordsRequest) + ListTournamentRecordsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListTournamentRecordsRequest.class.getName()); + } + // Use ListTournamentRecordsRequest.newBuilder() to construct. + private ListTournamentRecordsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListTournamentRecordsRequest() { + tournamentId_ = ""; + ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListTournamentRecordsRequest.class, com.heroiclabs.nakama.api.ListTournamentRecordsRequest.Builder.class); + } + + private int bitField0_; + public static final int TOURNAMENT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object tournamentId_ = ""; + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + @java.lang.Override + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } + } + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return A list containing the ownerIds. + */ + public com.google.protobuf.ProtocolStringList + getOwnerIdsList() { + return ownerIds_; + } + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return The count of ownerIds. + */ + public int getOwnerIdsCount() { + return ownerIds_.size(); + } + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the element to return. + * @return The ownerIds at the given index. + */ + public java.lang.String getOwnerIds(int index) { + return ownerIds_.get(index); + } + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the value to return. + * @return The bytes of the ownerIds at the given index. + */ + public com.google.protobuf.ByteString + getOwnerIdsBytes(int index) { + return ownerIds_.getByteString(index); + } + + public static final int LIMIT_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRY_FIELD_NUMBER = 5; + private com.google.protobuf.Int64Value expiry_; + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + @java.lang.Override + public boolean hasExpiry() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return The expiry. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getExpiry() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tournamentId_); + } + for (int i = 0; i < ownerIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ownerIds_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cursor_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getExpiry()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tournamentId_); + } + { + int dataSize = 0; + for (int i = 0; i < ownerIds_.size(); i++) { + dataSize += computeStringSizeNoTag(ownerIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getOwnerIdsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cursor_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getExpiry()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListTournamentRecordsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListTournamentRecordsRequest other = (com.heroiclabs.nakama.api.ListTournamentRecordsRequest) obj; + + if (!getTournamentId() + .equals(other.getTournamentId())) return false; + if (!getOwnerIdsList() + .equals(other.getOwnerIdsList())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (hasExpiry() != other.hasExpiry()) return false; + if (hasExpiry()) { + if (!getExpiry() + .equals(other.getExpiry())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOURNAMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTournamentId().hashCode(); + if (getOwnerIdsCount() > 0) { + hash = (37 * hash) + OWNER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getOwnerIdsList().hashCode(); + } + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + if (hasExpiry()) { + hash = (37 * hash) + EXPIRY_FIELD_NUMBER; + hash = (53 * hash) + getExpiry().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListTournamentRecordsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List tournament records from a given tournament.
+   * 
+ * + * Protobuf type {@code nakama.api.ListTournamentRecordsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListTournamentRecordsRequest) + com.heroiclabs.nakama.api.ListTournamentRecordsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListTournamentRecordsRequest.class, com.heroiclabs.nakama.api.ListTournamentRecordsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListTournamentRecordsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getExpiryFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tournamentId_ = ""; + ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + cursor_ = ""; + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentRecordsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListTournamentRecordsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsRequest build() { + com.heroiclabs.nakama.api.ListTournamentRecordsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsRequest buildPartial() { + com.heroiclabs.nakama.api.ListTournamentRecordsRequest result = new com.heroiclabs.nakama.api.ListTournamentRecordsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListTournamentRecordsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tournamentId_ = tournamentId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + ownerIds_.makeImmutable(); + result.ownerIds_ = ownerIds_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cursor_ = cursor_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.expiry_ = expiryBuilder_ == null + ? expiry_ + : expiryBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListTournamentRecordsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListTournamentRecordsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListTournamentRecordsRequest other) { + if (other == com.heroiclabs.nakama.api.ListTournamentRecordsRequest.getDefaultInstance()) return this; + if (!other.getTournamentId().isEmpty()) { + tournamentId_ = other.tournamentId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.ownerIds_.isEmpty()) { + if (ownerIds_.isEmpty()) { + ownerIds_ = other.ownerIds_; + bitField0_ |= 0x00000002; + } else { + ensureOwnerIdsIsMutable(); + ownerIds_.addAll(other.ownerIds_); + } + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasExpiry()) { + mergeExpiry(other.getExpiry()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tournamentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureOwnerIdsIsMutable(); + ownerIds_.add(s); + break; + } // case 18 + case 26: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getExpiryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object tournamentId_ = ""; + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return This builder for chaining. + */ + public Builder clearTournamentId() { + tournamentId_ = getDefaultInstance().getTournamentId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament to list for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The bytes for tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureOwnerIdsIsMutable() { + if (!ownerIds_.isModifiable()) { + ownerIds_ = new com.google.protobuf.LazyStringArrayList(ownerIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return A list containing the ownerIds. + */ + public com.google.protobuf.ProtocolStringList + getOwnerIdsList() { + ownerIds_.makeImmutable(); + return ownerIds_; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return The count of ownerIds. + */ + public int getOwnerIdsCount() { + return ownerIds_.size(); + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the element to return. + * @return The ownerIds at the given index. + */ + public java.lang.String getOwnerIds(int index) { + return ownerIds_.get(index); + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the value to return. + * @return The bytes of the ownerIds at the given index. + */ + public com.google.protobuf.ByteString + getOwnerIdsBytes(int index) { + return ownerIds_.getByteString(index); + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index to set the value at. + * @param value The ownerIds to set. + * @return This builder for chaining. + */ + public Builder setOwnerIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureOwnerIdsIsMutable(); + ownerIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param value The ownerIds to add. + * @return This builder for chaining. + */ + public Builder addOwnerIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureOwnerIdsIsMutable(); + ownerIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param values The ownerIds to add. + * @return This builder for chaining. + */ + public Builder addAllOwnerIds( + java.lang.Iterable values) { + ensureOwnerIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ownerIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return This builder for chaining. + */ + public Builder clearOwnerIds() { + ownerIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * One or more owners to retrieve records for.
+     * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param value The bytes of the ownerIds to add. + * @return This builder for chaining. + */ + public Builder addOwnerIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureOwnerIdsIsMutable(); + ownerIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A next or previous page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Int64Value expiry_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> expiryBuilder_; + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + public boolean hasExpiry() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return The expiry. + */ + public com.google.protobuf.Int64Value getExpiry() { + if (expiryBuilder_ == null) { + return expiry_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } else { + return expiryBuilder_.getMessage(); + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder setExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiry_ = value; + } else { + expiryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder setExpiry( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (expiryBuilder_ == null) { + expiry_ = builderForValue.build(); + } else { + expiryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder mergeExpiry(com.google.protobuf.Int64Value value) { + if (expiryBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + expiry_ != null && + expiry_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getExpiryBuilder().mergeFrom(value); + } else { + expiry_ = value; + } + } else { + expiryBuilder_.mergeFrom(value); + } + if (expiry_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public Builder clearExpiry() { + bitField0_ = (bitField0_ & ~0x00000010); + expiry_ = null; + if (expiryBuilder_ != null) { + expiryBuilder_.dispose(); + expiryBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64Value.Builder getExpiryBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getExpiryFieldBuilder().getBuilder(); + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + public com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder() { + if (expiryBuilder_ != null) { + return expiryBuilder_.getMessageOrBuilder(); + } else { + return expiry_ == null ? + com.google.protobuf.Int64Value.getDefaultInstance() : expiry_; + } + } + /** + *
+     * Expiry in seconds (since epoch) to begin fetching records from.
+     * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getExpiryFieldBuilder() { + if (expiryBuilder_ == null) { + expiryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + getExpiry(), + getParentForChildren(), + isClean()); + expiry_ = null; + } + return expiryBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListTournamentRecordsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListTournamentRecordsRequest) + private static final com.heroiclabs.nakama.api.ListTournamentRecordsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListTournamentRecordsRequest(); + } + + public static com.heroiclabs.nakama.api.ListTournamentRecordsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTournamentRecordsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentRecordsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequestOrBuilder.java new file mode 100644 index 00000000..b624fafe --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListTournamentRecordsRequestOrBuilder.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListTournamentRecordsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListTournamentRecordsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + java.lang.String getTournamentId(); + /** + *
+   * The ID of the tournament to list for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + com.google.protobuf.ByteString + getTournamentIdBytes(); + + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return A list containing the ownerIds. + */ + java.util.List + getOwnerIdsList(); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @return The count of ownerIds. + */ + int getOwnerIdsCount(); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the element to return. + * @return The ownerIds at the given index. + */ + java.lang.String getOwnerIds(int index); + /** + *
+   * One or more owners to retrieve records for.
+   * 
+ * + * repeated string owner_ids = 2 [json_name = "ownerIds"]; + * @param index The index of the value to return. + * @return The bytes of the ownerIds at the given index. + */ + com.google.protobuf.ByteString + getOwnerIdsBytes(int index); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 3 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A next or previous page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); + + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return Whether the expiry field is set. + */ + boolean hasExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + * @return The expiry. + */ + com.google.protobuf.Int64Value getExpiry(); + /** + *
+   * Expiry in seconds (since epoch) to begin fetching records from.
+   * 
+ * + * .google.protobuf.Int64Value expiry = 5 [json_name = "expiry"]; + */ + com.google.protobuf.Int64ValueOrBuilder getExpiryOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequest.java new file mode 100644 index 00000000..35ec96a8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequest.java @@ -0,0 +1,1710 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List active/upcoming tournaments based on given filters.
+ * 
+ * + * Protobuf type {@code nakama.api.ListTournamentsRequest} + */ +public final class ListTournamentsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListTournamentsRequest) + ListTournamentsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListTournamentsRequest.class.getName()); + } + // Use ListTournamentsRequest.newBuilder() to construct. + private ListTournamentsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListTournamentsRequest() { + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListTournamentsRequest.class, com.heroiclabs.nakama.api.ListTournamentsRequest.Builder.class); + } + + private int bitField0_; + public static final int CATEGORY_START_FIELD_NUMBER = 1; + private com.google.protobuf.UInt32Value categoryStart_; + /** + *
+   * The start of the categories to include. Defaults to 0.
+   * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + * @return Whether the categoryStart field is set. + */ + @java.lang.Override + public boolean hasCategoryStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The start of the categories to include. Defaults to 0.
+   * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + * @return The categoryStart. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getCategoryStart() { + return categoryStart_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : categoryStart_; + } + /** + *
+   * The start of the categories to include. Defaults to 0.
+   * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getCategoryStartOrBuilder() { + return categoryStart_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : categoryStart_; + } + + public static final int CATEGORY_END_FIELD_NUMBER = 2; + private com.google.protobuf.UInt32Value categoryEnd_; + /** + *
+   * The end of the categories to include. Defaults to 128.
+   * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + * @return Whether the categoryEnd field is set. + */ + @java.lang.Override + public boolean hasCategoryEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The end of the categories to include. Defaults to 128.
+   * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + * @return The categoryEnd. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getCategoryEnd() { + return categoryEnd_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : categoryEnd_; + } + /** + *
+   * The end of the categories to include. Defaults to 128.
+   * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getCategoryEndOrBuilder() { + return categoryEnd_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : categoryEnd_; + } + + public static final int START_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.UInt32Value startTime_; + /** + *
+   * The start time for tournaments. Defaults to epoch.
+   * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The start time for tournaments. Defaults to epoch.
+   * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getStartTime() { + return startTime_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : startTime_; + } + /** + *
+   * The start time for tournaments. Defaults to epoch.
+   * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.UInt32Value endTime_; + /** + *
+   * The end time for tournaments. Defaults to +1 year from current Unix time.
+   * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * The end time for tournaments. Defaults to +1 year from current Unix time.
+   * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getEndTime() { + return endTime_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : endTime_; + } + /** + *
+   * The end time for tournaments. Defaults to +1 year from current Unix time.
+   * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : endTime_; + } + + public static final int LIMIT_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int CURSOR_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A next page cursor for listings (optional).
+   * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A next page cursor for listings (optional).
+   * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCategoryStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCategoryEnd()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getStartTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getEndTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(6, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCategoryStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCategoryEnd()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getStartTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getEndTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getLimit()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListTournamentsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListTournamentsRequest other = (com.heroiclabs.nakama.api.ListTournamentsRequest) obj; + + if (hasCategoryStart() != other.hasCategoryStart()) return false; + if (hasCategoryStart()) { + if (!getCategoryStart() + .equals(other.getCategoryStart())) return false; + } + if (hasCategoryEnd() != other.hasCategoryEnd()) return false; + if (hasCategoryEnd()) { + if (!getCategoryEnd() + .equals(other.getCategoryEnd())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCategoryStart()) { + hash = (37 * hash) + CATEGORY_START_FIELD_NUMBER; + hash = (53 * hash) + getCategoryStart().hashCode(); + } + if (hasCategoryEnd()) { + hash = (37 * hash) + CATEGORY_END_FIELD_NUMBER; + hash = (53 * hash) + getCategoryEnd().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListTournamentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListTournamentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List active/upcoming tournaments based on given filters.
+   * 
+ * + * Protobuf type {@code nakama.api.ListTournamentsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListTournamentsRequest) + com.heroiclabs.nakama.api.ListTournamentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListTournamentsRequest.class, com.heroiclabs.nakama.api.ListTournamentsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListTournamentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCategoryStartFieldBuilder(); + getCategoryEndFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + getLimitFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + categoryStart_ = null; + if (categoryStartBuilder_ != null) { + categoryStartBuilder_.dispose(); + categoryStartBuilder_ = null; + } + categoryEnd_ = null; + if (categoryEndBuilder_ != null) { + categoryEndBuilder_.dispose(); + categoryEndBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListTournamentsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListTournamentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentsRequest build() { + com.heroiclabs.nakama.api.ListTournamentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentsRequest buildPartial() { + com.heroiclabs.nakama.api.ListTournamentsRequest result = new com.heroiclabs.nakama.api.ListTournamentsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListTournamentsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.categoryStart_ = categoryStartBuilder_ == null + ? categoryStart_ + : categoryStartBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.categoryEnd_ = categoryEndBuilder_ == null + ? categoryEnd_ + : categoryEndBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListTournamentsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListTournamentsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListTournamentsRequest other) { + if (other == com.heroiclabs.nakama.api.ListTournamentsRequest.getDefaultInstance()) return this; + if (other.hasCategoryStart()) { + mergeCategoryStart(other.getCategoryStart()); + } + if (other.hasCategoryEnd()) { + mergeCategoryEnd(other.getCategoryEnd()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCategoryStartFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCategoryEndFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 66: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt32Value categoryStart_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> categoryStartBuilder_; + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + * @return Whether the categoryStart field is set. + */ + public boolean hasCategoryStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + * @return The categoryStart. + */ + public com.google.protobuf.UInt32Value getCategoryStart() { + if (categoryStartBuilder_ == null) { + return categoryStart_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : categoryStart_; + } else { + return categoryStartBuilder_.getMessage(); + } + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + public Builder setCategoryStart(com.google.protobuf.UInt32Value value) { + if (categoryStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + categoryStart_ = value; + } else { + categoryStartBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + public Builder setCategoryStart( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (categoryStartBuilder_ == null) { + categoryStart_ = builderForValue.build(); + } else { + categoryStartBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + public Builder mergeCategoryStart(com.google.protobuf.UInt32Value value) { + if (categoryStartBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + categoryStart_ != null && + categoryStart_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getCategoryStartBuilder().mergeFrom(value); + } else { + categoryStart_ = value; + } + } else { + categoryStartBuilder_.mergeFrom(value); + } + if (categoryStart_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + public Builder clearCategoryStart() { + bitField0_ = (bitField0_ & ~0x00000001); + categoryStart_ = null; + if (categoryStartBuilder_ != null) { + categoryStartBuilder_.dispose(); + categoryStartBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + public com.google.protobuf.UInt32Value.Builder getCategoryStartBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCategoryStartFieldBuilder().getBuilder(); + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + public com.google.protobuf.UInt32ValueOrBuilder getCategoryStartOrBuilder() { + if (categoryStartBuilder_ != null) { + return categoryStartBuilder_.getMessageOrBuilder(); + } else { + return categoryStart_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : categoryStart_; + } + } + /** + *
+     * The start of the categories to include. Defaults to 0.
+     * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getCategoryStartFieldBuilder() { + if (categoryStartBuilder_ == null) { + categoryStartBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getCategoryStart(), + getParentForChildren(), + isClean()); + categoryStart_ = null; + } + return categoryStartBuilder_; + } + + private com.google.protobuf.UInt32Value categoryEnd_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> categoryEndBuilder_; + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + * @return Whether the categoryEnd field is set. + */ + public boolean hasCategoryEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + * @return The categoryEnd. + */ + public com.google.protobuf.UInt32Value getCategoryEnd() { + if (categoryEndBuilder_ == null) { + return categoryEnd_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : categoryEnd_; + } else { + return categoryEndBuilder_.getMessage(); + } + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + public Builder setCategoryEnd(com.google.protobuf.UInt32Value value) { + if (categoryEndBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + categoryEnd_ = value; + } else { + categoryEndBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + public Builder setCategoryEnd( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (categoryEndBuilder_ == null) { + categoryEnd_ = builderForValue.build(); + } else { + categoryEndBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + public Builder mergeCategoryEnd(com.google.protobuf.UInt32Value value) { + if (categoryEndBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + categoryEnd_ != null && + categoryEnd_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getCategoryEndBuilder().mergeFrom(value); + } else { + categoryEnd_ = value; + } + } else { + categoryEndBuilder_.mergeFrom(value); + } + if (categoryEnd_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + public Builder clearCategoryEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + categoryEnd_ = null; + if (categoryEndBuilder_ != null) { + categoryEndBuilder_.dispose(); + categoryEndBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + public com.google.protobuf.UInt32Value.Builder getCategoryEndBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCategoryEndFieldBuilder().getBuilder(); + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + public com.google.protobuf.UInt32ValueOrBuilder getCategoryEndOrBuilder() { + if (categoryEndBuilder_ != null) { + return categoryEndBuilder_.getMessageOrBuilder(); + } else { + return categoryEnd_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : categoryEnd_; + } + } + /** + *
+     * The end of the categories to include. Defaults to 128.
+     * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getCategoryEndFieldBuilder() { + if (categoryEndBuilder_ == null) { + categoryEndBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getCategoryEnd(), + getParentForChildren(), + isClean()); + categoryEnd_ = null; + } + return categoryEndBuilder_; + } + + private com.google.protobuf.UInt32Value startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> startTimeBuilder_; + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + * @return The startTime. + */ + public com.google.protobuf.UInt32Value getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + public Builder setStartTime(com.google.protobuf.UInt32Value value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + public Builder setStartTime( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + public Builder mergeStartTime(com.google.protobuf.UInt32Value value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000004); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + public com.google.protobuf.UInt32Value.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + public com.google.protobuf.UInt32ValueOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : startTime_; + } + } + /** + *
+     * The start time for tournaments. Defaults to epoch.
+     * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.UInt32Value endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> endTimeBuilder_; + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + * @return The endTime. + */ + public com.google.protobuf.UInt32Value getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + public Builder setEndTime(com.google.protobuf.UInt32Value value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + public Builder setEndTime( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + public Builder mergeEndTime(com.google.protobuf.UInt32Value value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000008); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + public com.google.protobuf.UInt32Value.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + public com.google.protobuf.UInt32ValueOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : endTime_; + } + } + /** + *
+     * The end time for tournaments. Defaults to +1 year from current Unix time.
+     * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000010); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A next page cursor for listings (optional).
+     * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A next page cursor for listings (optional).
+     * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A next page cursor for listings (optional).
+     * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A next page cursor for listings (optional).
+     * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * A next page cursor for listings (optional).
+     * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListTournamentsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListTournamentsRequest) + private static final com.heroiclabs.nakama.api.ListTournamentsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListTournamentsRequest(); + } + + public static com.heroiclabs.nakama.api.ListTournamentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTournamentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListTournamentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequestOrBuilder.java new file mode 100644 index 00000000..22f10886 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListTournamentsRequestOrBuilder.java @@ -0,0 +1,166 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListTournamentsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListTournamentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The start of the categories to include. Defaults to 0.
+   * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + * @return Whether the categoryStart field is set. + */ + boolean hasCategoryStart(); + /** + *
+   * The start of the categories to include. Defaults to 0.
+   * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + * @return The categoryStart. + */ + com.google.protobuf.UInt32Value getCategoryStart(); + /** + *
+   * The start of the categories to include. Defaults to 0.
+   * 
+ * + * .google.protobuf.UInt32Value category_start = 1 [json_name = "categoryStart"]; + */ + com.google.protobuf.UInt32ValueOrBuilder getCategoryStartOrBuilder(); + + /** + *
+   * The end of the categories to include. Defaults to 128.
+   * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + * @return Whether the categoryEnd field is set. + */ + boolean hasCategoryEnd(); + /** + *
+   * The end of the categories to include. Defaults to 128.
+   * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + * @return The categoryEnd. + */ + com.google.protobuf.UInt32Value getCategoryEnd(); + /** + *
+   * The end of the categories to include. Defaults to 128.
+   * 
+ * + * .google.protobuf.UInt32Value category_end = 2 [json_name = "categoryEnd"]; + */ + com.google.protobuf.UInt32ValueOrBuilder getCategoryEndOrBuilder(); + + /** + *
+   * The start time for tournaments. Defaults to epoch.
+   * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * The start time for tournaments. Defaults to epoch.
+   * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + * @return The startTime. + */ + com.google.protobuf.UInt32Value getStartTime(); + /** + *
+   * The start time for tournaments. Defaults to epoch.
+   * 
+ * + * .google.protobuf.UInt32Value start_time = 3 [json_name = "startTime"]; + */ + com.google.protobuf.UInt32ValueOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * The end time for tournaments. Defaults to +1 year from current Unix time.
+   * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * The end time for tournaments. Defaults to +1 year from current Unix time.
+   * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + * @return The endTime. + */ + com.google.protobuf.UInt32Value getEndTime(); + /** + *
+   * The end time for tournaments. Defaults to +1 year from current Unix time.
+   * 
+ * + * .google.protobuf.UInt32Value end_time = 4 [json_name = "endTime"]; + */ + com.google.protobuf.UInt32ValueOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 6 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * A next page cursor for listings (optional).
+   * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A next page cursor for listings (optional).
+   * 
+ * + * string cursor = 8 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequest.java new file mode 100644 index 00000000..d516591a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequest.java @@ -0,0 +1,1175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List the groups a user is part of, and their relationship to each.
+ * 
+ * + * Protobuf type {@code nakama.api.ListUserGroupsRequest} + */ +public final class ListUserGroupsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ListUserGroupsRequest) + ListUserGroupsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ListUserGroupsRequest.class.getName()); + } + // Use ListUserGroupsRequest.newBuilder() to construct. + private ListUserGroupsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ListUserGroupsRequest() { + userId_ = ""; + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListUserGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListUserGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListUserGroupsRequest.class, com.heroiclabs.nakama.api.ListUserGroupsRequest.Builder.class); + } + + private int bitField0_; + public static final int USER_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value limit_; + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getLimit() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + + public static final int STATE_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value state_; + /** + *
+   * The user group state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return Whether the state field is set. + */ + @java.lang.Override + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The user group state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getState() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + /** + *
+   * The user group state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + + public static final int CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getState()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLimit()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getState()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ListUserGroupsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ListUserGroupsRequest other = (com.heroiclabs.nakama.api.ListUserGroupsRequest) obj; + + if (!getUserId() + .equals(other.getUserId())) return false; + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit() + .equals(other.getLimit())) return false; + } + if (hasState() != other.hasState()) return false; + if (hasState()) { + if (!getState() + .equals(other.getState())) return false; + } + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ListUserGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ListUserGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List the groups a user is part of, and their relationship to each.
+   * 
+ * + * Protobuf type {@code nakama.api.ListUserGroupsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ListUserGroupsRequest) + com.heroiclabs.nakama.api.ListUserGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListUserGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListUserGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ListUserGroupsRequest.class, com.heroiclabs.nakama.api.ListUserGroupsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ListUserGroupsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLimitFieldBuilder(); + getStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = ""; + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ListUserGroupsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListUserGroupsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ListUserGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListUserGroupsRequest build() { + com.heroiclabs.nakama.api.ListUserGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListUserGroupsRequest buildPartial() { + com.heroiclabs.nakama.api.ListUserGroupsRequest result = new com.heroiclabs.nakama.api.ListUserGroupsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ListUserGroupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limit_ = limitBuilder_ == null + ? limit_ + : limitBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = stateBuilder_ == null + ? state_ + : stateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cursor_ = cursor_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ListUserGroupsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ListUserGroupsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ListUserGroupsRequest other) { + if (other == com.heroiclabs.nakama.api.ListUserGroupsRequest.getDefaultInstance()) return this; + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (other.hasState()) { + mergeState(other.getState()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getLimitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object userId_ = ""; + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * ID of the user.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value limit_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> limitBuilder_; + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + public com.google.protobuf.Int32Value getLimit() { + if (limitBuilder_ == null) { + return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder setLimit( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder mergeLimit(com.google.protobuf.Int32Value value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + limit_ != null && + limit_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + if (limit_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.Int32Value.Builder getLimitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : limit_; + } + } + /** + *
+     * Max number of records to return. Between 1 and 100.
+     * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getLimit(), + getParentForChildren(), + isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private com.google.protobuf.Int32Value state_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> stateBuilder_; + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return Whether the state field is set. + */ + public boolean hasState() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return The state. + */ + public com.google.protobuf.Int32Value getState() { + if (stateBuilder_ == null) { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } else { + return stateBuilder_.getMessage(); + } + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder setState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + } else { + stateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder setState( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (stateBuilder_ == null) { + state_ = builderForValue.build(); + } else { + stateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder mergeState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + state_ != null && + state_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getStateBuilder().mergeFrom(value); + } else { + state_ = value; + } + } else { + stateBuilder_.mergeFrom(value); + } + if (state_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public com.google.protobuf.Int32Value.Builder getStateBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStateFieldBuilder().getBuilder(); + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + if (stateBuilder_ != null) { + return stateBuilder_.getMessageOrBuilder(); + } else { + return state_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + } + /** + *
+     * The user group state to list.
+     * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getStateFieldBuilder() { + if (stateBuilder_ == null) { + stateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * An optional next page cursor.
+     * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ListUserGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ListUserGroupsRequest) + private static final com.heroiclabs.nakama.api.ListUserGroupsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ListUserGroupsRequest(); + } + + public static com.heroiclabs.nakama.api.ListUserGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ListUserGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequestOrBuilder.java new file mode 100644 index 00000000..e681adab --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ListUserGroupsRequestOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ListUserGroupsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ListUserGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * ID of the user.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + * @return The limit. + */ + com.google.protobuf.Int32Value getLimit(); + /** + *
+   * Max number of records to return. Between 1 and 100.
+   * 
+ * + * .google.protobuf.Int32Value limit = 2 [json_name = "limit"]; + */ + com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder(); + + /** + *
+   * The user group state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return Whether the state field is set. + */ + boolean hasState(); + /** + *
+   * The user group state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + * @return The state. + */ + com.google.protobuf.Int32Value getState(); + /** + *
+   * The user group state to list.
+   * 
+ * + * .google.protobuf.Int32Value state = 3 [json_name = "state"]; + */ + com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder(); + + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * An optional next page cursor.
+   * 
+ * + * string cursor = 4 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Match.java b/src/main/java/com/heroiclabs/nakama/api/Match.java new file mode 100644 index 00000000..973b869f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Match.java @@ -0,0 +1,1189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Represents a realtime match.
+ * 
+ * + * Protobuf type {@code nakama.api.Match} + */ +public final class Match extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Match) + MatchOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Match.class.getName()); + } + // Use Match.newBuilder() to construct. + private Match(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Match() { + matchId_ = ""; + handlerName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Match_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Match_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Match.class, com.heroiclabs.nakama.api.Match.Builder.class); + } + + private int bitField0_; + public static final int MATCH_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object matchId_ = ""; + /** + *
+   * The ID of the match, can be used to join.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } + } + /** + *
+   * The ID of the match, can be used to join.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHORITATIVE_FIELD_NUMBER = 2; + private boolean authoritative_ = false; + /** + *
+   * True if it's an server-managed authoritative match, false otherwise.
+   * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + + public static final int LABEL_FIELD_NUMBER = 3; + private com.google.protobuf.StringValue label_; + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + @java.lang.Override + public boolean hasLabel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + @java.lang.Override + public com.google.protobuf.StringValue getLabel() { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getLabelOrBuilder() { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + + public static final int SIZE_FIELD_NUMBER = 4; + private int size_ = 0; + /** + *
+   * Current number of users in the match.
+   * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + + public static final int TICK_RATE_FIELD_NUMBER = 5; + private int tickRate_ = 0; + /** + *
+   * Tick Rate
+   * 
+ * + * int32 tick_rate = 5 [json_name = "tickRate"]; + * @return The tickRate. + */ + @java.lang.Override + public int getTickRate() { + return tickRate_; + } + + public static final int HANDLER_NAME_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerName_ = ""; + /** + *
+   * Handler name
+   * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @return The handlerName. + */ + @java.lang.Override + public java.lang.String getHandlerName() { + java.lang.Object ref = handlerName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerName_ = s; + return s; + } + } + /** + *
+   * Handler name
+   * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @return The bytes for handlerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerNameBytes() { + java.lang.Object ref = handlerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, matchId_); + } + if (authoritative_ != false) { + output.writeBool(2, authoritative_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLabel()); + } + if (size_ != 0) { + output.writeInt32(4, size_); + } + if (tickRate_ != 0) { + output.writeInt32(5, tickRate_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(handlerName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, handlerName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, matchId_); + } + if (authoritative_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, authoritative_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLabel()); + } + if (size_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, size_); + } + if (tickRate_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, tickRate_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(handlerName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, handlerName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Match)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Match other = (com.heroiclabs.nakama.api.Match) obj; + + if (!getMatchId() + .equals(other.getMatchId())) return false; + if (getAuthoritative() + != other.getAuthoritative()) return false; + if (hasLabel() != other.hasLabel()) return false; + if (hasLabel()) { + if (!getLabel() + .equals(other.getLabel())) return false; + } + if (getSize() + != other.getSize()) return false; + if (getTickRate() + != other.getTickRate()) return false; + if (!getHandlerName() + .equals(other.getHandlerName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + hash = (37 * hash) + AUTHORITATIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAuthoritative()); + if (hasLabel()) { + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + } + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + getSize(); + hash = (37 * hash) + TICK_RATE_FIELD_NUMBER; + hash = (53 * hash) + getTickRate(); + hash = (37 * hash) + HANDLER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getHandlerName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Match parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Match parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Match parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Match parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Match parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Match parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Match parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Match parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Match parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Match parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Match parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Match parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Match prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a realtime match.
+   * 
+ * + * Protobuf type {@code nakama.api.Match} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Match) + com.heroiclabs.nakama.api.MatchOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Match_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Match_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Match.class, com.heroiclabs.nakama.api.Match.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Match.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLabelFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchId_ = ""; + authoritative_ = false; + label_ = null; + if (labelBuilder_ != null) { + labelBuilder_.dispose(); + labelBuilder_ = null; + } + size_ = 0; + tickRate_ = 0; + handlerName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Match_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Match getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Match.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Match build() { + com.heroiclabs.nakama.api.Match result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Match buildPartial() { + com.heroiclabs.nakama.api.Match result = new com.heroiclabs.nakama.api.Match(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Match result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchId_ = matchId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authoritative_ = authoritative_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.label_ = labelBuilder_ == null + ? label_ + : labelBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.size_ = size_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.tickRate_ = tickRate_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.handlerName_ = handlerName_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Match) { + return mergeFrom((com.heroiclabs.nakama.api.Match)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Match other) { + if (other == com.heroiclabs.nakama.api.Match.getDefaultInstance()) return this; + if (!other.getMatchId().isEmpty()) { + matchId_ = other.matchId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAuthoritative() != false) { + setAuthoritative(other.getAuthoritative()); + } + if (other.hasLabel()) { + mergeLabel(other.getLabel()); + } + if (other.getSize() != 0) { + setSize(other.getSize()); + } + if (other.getTickRate() != 0) { + setTickRate(other.getTickRate()); + } + if (!other.getHandlerName().isEmpty()) { + handlerName_ = other.handlerName_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + matchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + authoritative_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getLabelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + size_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + tickRate_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + handlerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object matchId_ = ""; + /** + *
+     * The ID of the match, can be used to join.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the match, can be used to join.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the match, can be used to join.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the match, can be used to join.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + matchId_ = getDefaultInstance().getMatchId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the match, can be used to join.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean authoritative_ ; + /** + *
+     * True if it's an server-managed authoritative match, false otherwise.
+     * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + /** + *
+     * True if it's an server-managed authoritative match, false otherwise.
+     * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @param value The authoritative to set. + * @return This builder for chaining. + */ + public Builder setAuthoritative(boolean value) { + + authoritative_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * True if it's an server-managed authoritative match, false otherwise.
+     * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return This builder for chaining. + */ + public Builder clearAuthoritative() { + bitField0_ = (bitField0_ & ~0x00000002); + authoritative_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.StringValue label_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> labelBuilder_; + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + public boolean hasLabel() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + public com.google.protobuf.StringValue getLabel() { + if (labelBuilder_ == null) { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } else { + return labelBuilder_.getMessage(); + } + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder setLabel(com.google.protobuf.StringValue value) { + if (labelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + label_ = value; + } else { + labelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder setLabel( + com.google.protobuf.StringValue.Builder builderForValue) { + if (labelBuilder_ == null) { + label_ = builderForValue.build(); + } else { + labelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder mergeLabel(com.google.protobuf.StringValue value) { + if (labelBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + label_ != null && + label_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getLabelBuilder().mergeFrom(value); + } else { + label_ = value; + } + } else { + labelBuilder_.mergeFrom(value); + } + if (label_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder clearLabel() { + bitField0_ = (bitField0_ & ~0x00000004); + label_ = null; + if (labelBuilder_ != null) { + labelBuilder_.dispose(); + labelBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public com.google.protobuf.StringValue.Builder getLabelBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLabelFieldBuilder().getBuilder(); + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public com.google.protobuf.StringValueOrBuilder getLabelOrBuilder() { + if (labelBuilder_ != null) { + return labelBuilder_.getMessageOrBuilder(); + } else { + return label_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getLabelFieldBuilder() { + if (labelBuilder_ == null) { + labelBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getLabel(), + getParentForChildren(), + isClean()); + label_ = null; + } + return labelBuilder_; + } + + private int size_ ; + /** + *
+     * Current number of users in the match.
+     * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + /** + *
+     * Current number of users in the match.
+     * 
+ * + * int32 size = 4 [json_name = "size"]; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(int value) { + + size_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Current number of users in the match.
+     * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return This builder for chaining. + */ + public Builder clearSize() { + bitField0_ = (bitField0_ & ~0x00000008); + size_ = 0; + onChanged(); + return this; + } + + private int tickRate_ ; + /** + *
+     * Tick Rate
+     * 
+ * + * int32 tick_rate = 5 [json_name = "tickRate"]; + * @return The tickRate. + */ + @java.lang.Override + public int getTickRate() { + return tickRate_; + } + /** + *
+     * Tick Rate
+     * 
+ * + * int32 tick_rate = 5 [json_name = "tickRate"]; + * @param value The tickRate to set. + * @return This builder for chaining. + */ + public Builder setTickRate(int value) { + + tickRate_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Tick Rate
+     * 
+ * + * int32 tick_rate = 5 [json_name = "tickRate"]; + * @return This builder for chaining. + */ + public Builder clearTickRate() { + bitField0_ = (bitField0_ & ~0x00000010); + tickRate_ = 0; + onChanged(); + return this; + } + + private java.lang.Object handlerName_ = ""; + /** + *
+     * Handler name
+     * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @return The handlerName. + */ + public java.lang.String getHandlerName() { + java.lang.Object ref = handlerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Handler name
+     * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @return The bytes for handlerName. + */ + public com.google.protobuf.ByteString + getHandlerNameBytes() { + java.lang.Object ref = handlerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Handler name
+     * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @param value The handlerName to set. + * @return This builder for chaining. + */ + public Builder setHandlerName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Handler name
+     * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @return This builder for chaining. + */ + public Builder clearHandlerName() { + handlerName_ = getDefaultInstance().getHandlerName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * Handler name
+     * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @param value The bytes for handlerName to set. + * @return This builder for chaining. + */ + public Builder setHandlerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Match) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Match) + private static final com.heroiclabs.nakama.api.Match DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Match(); + } + + public static com.heroiclabs.nakama.api.Match getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Match parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Match getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/MatchList.java b/src/main/java/com/heroiclabs/nakama/api/MatchList.java new file mode 100644 index 00000000..6c679f63 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/MatchList.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of realtime matches.
+ * 
+ * + * Protobuf type {@code nakama.api.MatchList} + */ +public final class MatchList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.MatchList) + MatchListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchList.class.getName()); + } + // Use MatchList.newBuilder() to construct. + private MatchList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchList() { + matches_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.MatchList.class, com.heroiclabs.nakama.api.MatchList.Builder.class); + } + + public static final int MATCHES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List matches_; + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + @java.lang.Override + public java.util.List getMatchesList() { + return matches_; + } + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + @java.lang.Override + public java.util.List + getMatchesOrBuilderList() { + return matches_; + } + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + @java.lang.Override + public int getMatchesCount() { + return matches_.size(); + } + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Match getMatches(int index) { + return matches_.get(index); + } + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.MatchOrBuilder getMatchesOrBuilder( + int index) { + return matches_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < matches_.size(); i++) { + output.writeMessage(1, matches_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < matches_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, matches_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.MatchList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.MatchList other = (com.heroiclabs.nakama.api.MatchList) obj; + + if (!getMatchesList() + .equals(other.getMatchesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMatchesCount() > 0) { + hash = (37 * hash) + MATCHES_FIELD_NUMBER; + hash = (53 * hash) + getMatchesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.MatchList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.MatchList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.MatchList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.MatchList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.MatchList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of realtime matches.
+   * 
+ * + * Protobuf type {@code nakama.api.MatchList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.MatchList) + com.heroiclabs.nakama.api.MatchListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.MatchList.class, com.heroiclabs.nakama.api.MatchList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.MatchList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (matchesBuilder_ == null) { + matches_ = java.util.Collections.emptyList(); + } else { + matches_ = null; + matchesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.MatchList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchList build() { + com.heroiclabs.nakama.api.MatchList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchList buildPartial() { + com.heroiclabs.nakama.api.MatchList result = new com.heroiclabs.nakama.api.MatchList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.MatchList result) { + if (matchesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + matches_ = java.util.Collections.unmodifiableList(matches_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.matches_ = matches_; + } else { + result.matches_ = matchesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.MatchList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.MatchList) { + return mergeFrom((com.heroiclabs.nakama.api.MatchList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.MatchList other) { + if (other == com.heroiclabs.nakama.api.MatchList.getDefaultInstance()) return this; + if (matchesBuilder_ == null) { + if (!other.matches_.isEmpty()) { + if (matches_.isEmpty()) { + matches_ = other.matches_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMatchesIsMutable(); + matches_.addAll(other.matches_); + } + onChanged(); + } + } else { + if (!other.matches_.isEmpty()) { + if (matchesBuilder_.isEmpty()) { + matchesBuilder_.dispose(); + matchesBuilder_ = null; + matches_ = other.matches_; + bitField0_ = (bitField0_ & ~0x00000001); + matchesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMatchesFieldBuilder() : null; + } else { + matchesBuilder_.addAllMessages(other.matches_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.Match m = + input.readMessage( + com.heroiclabs.nakama.api.Match.parser(), + extensionRegistry); + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.add(m); + } else { + matchesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List matches_ = + java.util.Collections.emptyList(); + private void ensureMatchesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + matches_ = new java.util.ArrayList(matches_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Match, com.heroiclabs.nakama.api.Match.Builder, com.heroiclabs.nakama.api.MatchOrBuilder> matchesBuilder_; + + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public java.util.List getMatchesList() { + if (matchesBuilder_ == null) { + return java.util.Collections.unmodifiableList(matches_); + } else { + return matchesBuilder_.getMessageList(); + } + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public int getMatchesCount() { + if (matchesBuilder_ == null) { + return matches_.size(); + } else { + return matchesBuilder_.getCount(); + } + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public com.heroiclabs.nakama.api.Match getMatches(int index) { + if (matchesBuilder_ == null) { + return matches_.get(index); + } else { + return matchesBuilder_.getMessage(index); + } + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder setMatches( + int index, com.heroiclabs.nakama.api.Match value) { + if (matchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchesIsMutable(); + matches_.set(index, value); + onChanged(); + } else { + matchesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder setMatches( + int index, com.heroiclabs.nakama.api.Match.Builder builderForValue) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.set(index, builderForValue.build()); + onChanged(); + } else { + matchesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder addMatches(com.heroiclabs.nakama.api.Match value) { + if (matchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchesIsMutable(); + matches_.add(value); + onChanged(); + } else { + matchesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder addMatches( + int index, com.heroiclabs.nakama.api.Match value) { + if (matchesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchesIsMutable(); + matches_.add(index, value); + onChanged(); + } else { + matchesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder addMatches( + com.heroiclabs.nakama.api.Match.Builder builderForValue) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.add(builderForValue.build()); + onChanged(); + } else { + matchesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder addMatches( + int index, com.heroiclabs.nakama.api.Match.Builder builderForValue) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.add(index, builderForValue.build()); + onChanged(); + } else { + matchesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder addAllMatches( + java.lang.Iterable values) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, matches_); + onChanged(); + } else { + matchesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder clearMatches() { + if (matchesBuilder_ == null) { + matches_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + matchesBuilder_.clear(); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public Builder removeMatches(int index) { + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.remove(index); + onChanged(); + } else { + matchesBuilder_.remove(index); + } + return this; + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public com.heroiclabs.nakama.api.Match.Builder getMatchesBuilder( + int index) { + return getMatchesFieldBuilder().getBuilder(index); + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public com.heroiclabs.nakama.api.MatchOrBuilder getMatchesOrBuilder( + int index) { + if (matchesBuilder_ == null) { + return matches_.get(index); } else { + return matchesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public java.util.List + getMatchesOrBuilderList() { + if (matchesBuilder_ != null) { + return matchesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(matches_); + } + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public com.heroiclabs.nakama.api.Match.Builder addMatchesBuilder() { + return getMatchesFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.Match.getDefaultInstance()); + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public com.heroiclabs.nakama.api.Match.Builder addMatchesBuilder( + int index) { + return getMatchesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.Match.getDefaultInstance()); + } + /** + *
+     * A number of matches corresponding to a list operation.
+     * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + public java.util.List + getMatchesBuilderList() { + return getMatchesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Match, com.heroiclabs.nakama.api.Match.Builder, com.heroiclabs.nakama.api.MatchOrBuilder> + getMatchesFieldBuilder() { + if (matchesBuilder_ == null) { + matchesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Match, com.heroiclabs.nakama.api.Match.Builder, com.heroiclabs.nakama.api.MatchOrBuilder>( + matches_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + matches_ = null; + } + return matchesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.MatchList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.MatchList) + private static final com.heroiclabs.nakama.api.MatchList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.MatchList(); + } + + public static com.heroiclabs.nakama.api.MatchList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/MatchListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/MatchListOrBuilder.java new file mode 100644 index 00000000..81ce968e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/MatchListOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface MatchListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.MatchList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + java.util.List + getMatchesList(); + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + com.heroiclabs.nakama.api.Match getMatches(int index); + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + int getMatchesCount(); + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + java.util.List + getMatchesOrBuilderList(); + /** + *
+   * A number of matches corresponding to a list operation.
+   * 
+ * + * repeated .nakama.api.Match matches = 1 [json_name = "matches"]; + */ + com.heroiclabs.nakama.api.MatchOrBuilder getMatchesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/MatchOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/MatchOrBuilder.java new file mode 100644 index 00000000..8795dabe --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/MatchOrBuilder.java @@ -0,0 +1,108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface MatchOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Match) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the match, can be used to join.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * The ID of the match, can be used to join.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); + + /** + *
+   * True if it's an server-managed authoritative match, false otherwise.
+   * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + boolean getAuthoritative(); + + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + boolean hasLabel(); + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + com.google.protobuf.StringValue getLabel(); + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + com.google.protobuf.StringValueOrBuilder getLabelOrBuilder(); + + /** + *
+   * Current number of users in the match.
+   * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return The size. + */ + int getSize(); + + /** + *
+   * Tick Rate
+   * 
+ * + * int32 tick_rate = 5 [json_name = "tickRate"]; + * @return The tickRate. + */ + int getTickRate(); + + /** + *
+   * Handler name
+   * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @return The handlerName. + */ + java.lang.String getHandlerName(); + /** + *
+   * Handler name
+   * 
+ * + * string handler_name = 6 [json_name = "handlerName"]; + * @return The bytes for handlerName. + */ + com.google.protobuf.ByteString + getHandlerNameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStats.java b/src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStats.java new file mode 100644 index 00000000..4da268ed --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStats.java @@ -0,0 +1,751 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Matchmaker ticket completion stats
+ * 
+ * + * Protobuf type {@code nakama.api.MatchmakerCompletionStats} + */ +public final class MatchmakerCompletionStats extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.MatchmakerCompletionStats) + MatchmakerCompletionStatsOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchmakerCompletionStats.class.getName()); + } + // Use MatchmakerCompletionStats.newBuilder() to construct. + private MatchmakerCompletionStats(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchmakerCompletionStats() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerCompletionStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerCompletionStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.MatchmakerCompletionStats.class, com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int COMPLETE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp completeTime_; + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + * @return Whether the completeTime field is set. + */ + @java.lang.Override + public boolean hasCompleteTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + * @return The completeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCompleteTime() { + return completeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : completeTime_; + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { + return completeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : completeTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCompleteTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCompleteTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.MatchmakerCompletionStats)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.MatchmakerCompletionStats other = (com.heroiclabs.nakama.api.MatchmakerCompletionStats) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasCompleteTime() != other.hasCompleteTime()) return false; + if (hasCompleteTime()) { + if (!getCompleteTime() + .equals(other.getCompleteTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasCompleteTime()) { + hash = (37 * hash) + COMPLETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCompleteTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.MatchmakerCompletionStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Matchmaker ticket completion stats
+   * 
+ * + * Protobuf type {@code nakama.api.MatchmakerCompletionStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.MatchmakerCompletionStats) + com.heroiclabs.nakama.api.MatchmakerCompletionStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerCompletionStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerCompletionStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.MatchmakerCompletionStats.class, com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.MatchmakerCompletionStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getCompleteTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + completeTime_ = null; + if (completeTimeBuilder_ != null) { + completeTimeBuilder_.dispose(); + completeTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerCompletionStats_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerCompletionStats getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.MatchmakerCompletionStats.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerCompletionStats build() { + com.heroiclabs.nakama.api.MatchmakerCompletionStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerCompletionStats buildPartial() { + com.heroiclabs.nakama.api.MatchmakerCompletionStats result = new com.heroiclabs.nakama.api.MatchmakerCompletionStats(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.MatchmakerCompletionStats result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.completeTime_ = completeTimeBuilder_ == null + ? completeTime_ + : completeTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.MatchmakerCompletionStats) { + return mergeFrom((com.heroiclabs.nakama.api.MatchmakerCompletionStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.MatchmakerCompletionStats other) { + if (other == com.heroiclabs.nakama.api.MatchmakerCompletionStats.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasCompleteTime()) { + mergeCompleteTime(other.getCompleteTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getCompleteTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp completeTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> completeTimeBuilder_; + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + * @return Whether the completeTime field is set. + */ + public boolean hasCompleteTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + * @return The completeTime. + */ + public com.google.protobuf.Timestamp getCompleteTime() { + if (completeTimeBuilder_ == null) { + return completeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : completeTime_; + } else { + return completeTimeBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + public Builder setCompleteTime(com.google.protobuf.Timestamp value) { + if (completeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeTime_ = value; + } else { + completeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + public Builder setCompleteTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (completeTimeBuilder_ == null) { + completeTime_ = builderForValue.build(); + } else { + completeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + public Builder mergeCompleteTime(com.google.protobuf.Timestamp value) { + if (completeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + completeTime_ != null && + completeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCompleteTimeBuilder().mergeFrom(value); + } else { + completeTime_ = value; + } + } else { + completeTimeBuilder_.mergeFrom(value); + } + if (completeTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + public Builder clearCompleteTime() { + bitField0_ = (bitField0_ & ~0x00000002); + completeTime_ = null; + if (completeTimeBuilder_ != null) { + completeTimeBuilder_.dispose(); + completeTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCompleteTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCompleteTimeFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { + if (completeTimeBuilder_ != null) { + return completeTimeBuilder_.getMessageOrBuilder(); + } else { + return completeTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : completeTime_; + } + } + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCompleteTimeFieldBuilder() { + if (completeTimeBuilder_ == null) { + completeTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCompleteTime(), + getParentForChildren(), + isClean()); + completeTime_ = null; + } + return completeTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.MatchmakerCompletionStats) + } + + // @@protoc_insertion_point(class_scope:nakama.api.MatchmakerCompletionStats) + private static final com.heroiclabs.nakama.api.MatchmakerCompletionStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.MatchmakerCompletionStats(); + } + + public static com.heroiclabs.nakama.api.MatchmakerCompletionStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchmakerCompletionStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerCompletionStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStatsOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStatsOrBuilder.java new file mode 100644 index 00000000..0ce24846 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/MatchmakerCompletionStatsOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface MatchmakerCompletionStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.MatchmakerCompletionStats) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * .google.protobuf.Timestamp create_time = 1 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + * @return Whether the completeTime field is set. + */ + boolean hasCompleteTime(); + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + * @return The completeTime. + */ + com.google.protobuf.Timestamp getCompleteTime(); + /** + * .google.protobuf.Timestamp complete_time = 2 [json_name = "completeTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/MatchmakerStats.java b/src/main/java/com/heroiclabs/nakama/api/MatchmakerStats.java new file mode 100644 index 00000000..d4de9a62 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/MatchmakerStats.java @@ -0,0 +1,987 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Matchmaker stats
+ * 
+ * + * Protobuf type {@code nakama.api.MatchmakerStats} + */ +public final class MatchmakerStats extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.MatchmakerStats) + MatchmakerStatsOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchmakerStats.class.getName()); + } + // Use MatchmakerStats.newBuilder() to construct. + private MatchmakerStats(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchmakerStats() { + completions_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.MatchmakerStats.class, com.heroiclabs.nakama.api.MatchmakerStats.Builder.class); + } + + private int bitField0_; + public static final int TICKET_COUNT_FIELD_NUMBER = 1; + private int ticketCount_ = 0; + /** + * int32 ticket_count = 1 [json_name = "ticketCount"]; + * @return The ticketCount. + */ + @java.lang.Override + public int getTicketCount() { + return ticketCount_; + } + + public static final int OLDEST_TICKET_CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp oldestTicketCreateTime_; + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + * @return Whether the oldestTicketCreateTime field is set. + */ + @java.lang.Override + public boolean hasOldestTicketCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + * @return The oldestTicketCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOldestTicketCreateTime() { + return oldestTicketCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : oldestTicketCreateTime_; + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOldestTicketCreateTimeOrBuilder() { + return oldestTicketCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : oldestTicketCreateTime_; + } + + public static final int COMPLETIONS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List completions_; + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + @java.lang.Override + public java.util.List getCompletionsList() { + return completions_; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + @java.lang.Override + public java.util.List + getCompletionsOrBuilderList() { + return completions_; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + @java.lang.Override + public int getCompletionsCount() { + return completions_.size(); + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerCompletionStats getCompletions(int index) { + return completions_.get(index); + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerCompletionStatsOrBuilder getCompletionsOrBuilder( + int index) { + return completions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (ticketCount_ != 0) { + output.writeInt32(1, ticketCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getOldestTicketCreateTime()); + } + for (int i = 0; i < completions_.size(); i++) { + output.writeMessage(3, completions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ticketCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, ticketCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOldestTicketCreateTime()); + } + for (int i = 0; i < completions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, completions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.MatchmakerStats)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.MatchmakerStats other = (com.heroiclabs.nakama.api.MatchmakerStats) obj; + + if (getTicketCount() + != other.getTicketCount()) return false; + if (hasOldestTicketCreateTime() != other.hasOldestTicketCreateTime()) return false; + if (hasOldestTicketCreateTime()) { + if (!getOldestTicketCreateTime() + .equals(other.getOldestTicketCreateTime())) return false; + } + if (!getCompletionsList() + .equals(other.getCompletionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TICKET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTicketCount(); + if (hasOldestTicketCreateTime()) { + hash = (37 * hash) + OLDEST_TICKET_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOldestTicketCreateTime().hashCode(); + } + if (getCompletionsCount() > 0) { + hash = (37 * hash) + COMPLETIONS_FIELD_NUMBER; + hash = (53 * hash) + getCompletionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.MatchmakerStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.MatchmakerStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.MatchmakerStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.MatchmakerStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Matchmaker stats
+   * 
+ * + * Protobuf type {@code nakama.api.MatchmakerStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.MatchmakerStats) + com.heroiclabs.nakama.api.MatchmakerStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.MatchmakerStats.class, com.heroiclabs.nakama.api.MatchmakerStats.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.MatchmakerStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getOldestTicketCreateTimeFieldBuilder(); + getCompletionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ticketCount_ = 0; + oldestTicketCreateTime_ = null; + if (oldestTicketCreateTimeBuilder_ != null) { + oldestTicketCreateTimeBuilder_.dispose(); + oldestTicketCreateTimeBuilder_ = null; + } + if (completionsBuilder_ == null) { + completions_ = java.util.Collections.emptyList(); + } else { + completions_ = null; + completionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_MatchmakerStats_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerStats getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.MatchmakerStats.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerStats build() { + com.heroiclabs.nakama.api.MatchmakerStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerStats buildPartial() { + com.heroiclabs.nakama.api.MatchmakerStats result = new com.heroiclabs.nakama.api.MatchmakerStats(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.MatchmakerStats result) { + if (completionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + completions_ = java.util.Collections.unmodifiableList(completions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.completions_ = completions_; + } else { + result.completions_ = completionsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.MatchmakerStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ticketCount_ = ticketCount_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.oldestTicketCreateTime_ = oldestTicketCreateTimeBuilder_ == null + ? oldestTicketCreateTime_ + : oldestTicketCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.MatchmakerStats) { + return mergeFrom((com.heroiclabs.nakama.api.MatchmakerStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.MatchmakerStats other) { + if (other == com.heroiclabs.nakama.api.MatchmakerStats.getDefaultInstance()) return this; + if (other.getTicketCount() != 0) { + setTicketCount(other.getTicketCount()); + } + if (other.hasOldestTicketCreateTime()) { + mergeOldestTicketCreateTime(other.getOldestTicketCreateTime()); + } + if (completionsBuilder_ == null) { + if (!other.completions_.isEmpty()) { + if (completions_.isEmpty()) { + completions_ = other.completions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureCompletionsIsMutable(); + completions_.addAll(other.completions_); + } + onChanged(); + } + } else { + if (!other.completions_.isEmpty()) { + if (completionsBuilder_.isEmpty()) { + completionsBuilder_.dispose(); + completionsBuilder_ = null; + completions_ = other.completions_; + bitField0_ = (bitField0_ & ~0x00000004); + completionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getCompletionsFieldBuilder() : null; + } else { + completionsBuilder_.addAllMessages(other.completions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + ticketCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getOldestTicketCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.heroiclabs.nakama.api.MatchmakerCompletionStats m = + input.readMessage( + com.heroiclabs.nakama.api.MatchmakerCompletionStats.parser(), + extensionRegistry); + if (completionsBuilder_ == null) { + ensureCompletionsIsMutable(); + completions_.add(m); + } else { + completionsBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int ticketCount_ ; + /** + * int32 ticket_count = 1 [json_name = "ticketCount"]; + * @return The ticketCount. + */ + @java.lang.Override + public int getTicketCount() { + return ticketCount_; + } + /** + * int32 ticket_count = 1 [json_name = "ticketCount"]; + * @param value The ticketCount to set. + * @return This builder for chaining. + */ + public Builder setTicketCount(int value) { + + ticketCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 ticket_count = 1 [json_name = "ticketCount"]; + * @return This builder for chaining. + */ + public Builder clearTicketCount() { + bitField0_ = (bitField0_ & ~0x00000001); + ticketCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp oldestTicketCreateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> oldestTicketCreateTimeBuilder_; + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + * @return Whether the oldestTicketCreateTime field is set. + */ + public boolean hasOldestTicketCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + * @return The oldestTicketCreateTime. + */ + public com.google.protobuf.Timestamp getOldestTicketCreateTime() { + if (oldestTicketCreateTimeBuilder_ == null) { + return oldestTicketCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : oldestTicketCreateTime_; + } else { + return oldestTicketCreateTimeBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + public Builder setOldestTicketCreateTime(com.google.protobuf.Timestamp value) { + if (oldestTicketCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oldestTicketCreateTime_ = value; + } else { + oldestTicketCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + public Builder setOldestTicketCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (oldestTicketCreateTimeBuilder_ == null) { + oldestTicketCreateTime_ = builderForValue.build(); + } else { + oldestTicketCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + public Builder mergeOldestTicketCreateTime(com.google.protobuf.Timestamp value) { + if (oldestTicketCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + oldestTicketCreateTime_ != null && + oldestTicketCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getOldestTicketCreateTimeBuilder().mergeFrom(value); + } else { + oldestTicketCreateTime_ = value; + } + } else { + oldestTicketCreateTimeBuilder_.mergeFrom(value); + } + if (oldestTicketCreateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + public Builder clearOldestTicketCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + oldestTicketCreateTime_ = null; + if (oldestTicketCreateTimeBuilder_ != null) { + oldestTicketCreateTimeBuilder_.dispose(); + oldestTicketCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getOldestTicketCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOldestTicketCreateTimeFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getOldestTicketCreateTimeOrBuilder() { + if (oldestTicketCreateTimeBuilder_ != null) { + return oldestTicketCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return oldestTicketCreateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : oldestTicketCreateTime_; + } + } + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getOldestTicketCreateTimeFieldBuilder() { + if (oldestTicketCreateTimeBuilder_ == null) { + oldestTicketCreateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getOldestTicketCreateTime(), + getParentForChildren(), + isClean()); + oldestTicketCreateTime_ = null; + } + return oldestTicketCreateTimeBuilder_; + } + + private java.util.List completions_ = + java.util.Collections.emptyList(); + private void ensureCompletionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + completions_ = new java.util.ArrayList(completions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.MatchmakerCompletionStats, com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder, com.heroiclabs.nakama.api.MatchmakerCompletionStatsOrBuilder> completionsBuilder_; + + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public java.util.List getCompletionsList() { + if (completionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(completions_); + } else { + return completionsBuilder_.getMessageList(); + } + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public int getCompletionsCount() { + if (completionsBuilder_ == null) { + return completions_.size(); + } else { + return completionsBuilder_.getCount(); + } + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public com.heroiclabs.nakama.api.MatchmakerCompletionStats getCompletions(int index) { + if (completionsBuilder_ == null) { + return completions_.get(index); + } else { + return completionsBuilder_.getMessage(index); + } + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder setCompletions( + int index, com.heroiclabs.nakama.api.MatchmakerCompletionStats value) { + if (completionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletionsIsMutable(); + completions_.set(index, value); + onChanged(); + } else { + completionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder setCompletions( + int index, com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder builderForValue) { + if (completionsBuilder_ == null) { + ensureCompletionsIsMutable(); + completions_.set(index, builderForValue.build()); + onChanged(); + } else { + completionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder addCompletions(com.heroiclabs.nakama.api.MatchmakerCompletionStats value) { + if (completionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletionsIsMutable(); + completions_.add(value); + onChanged(); + } else { + completionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder addCompletions( + int index, com.heroiclabs.nakama.api.MatchmakerCompletionStats value) { + if (completionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletionsIsMutable(); + completions_.add(index, value); + onChanged(); + } else { + completionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder addCompletions( + com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder builderForValue) { + if (completionsBuilder_ == null) { + ensureCompletionsIsMutable(); + completions_.add(builderForValue.build()); + onChanged(); + } else { + completionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder addCompletions( + int index, com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder builderForValue) { + if (completionsBuilder_ == null) { + ensureCompletionsIsMutable(); + completions_.add(index, builderForValue.build()); + onChanged(); + } else { + completionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder addAllCompletions( + java.lang.Iterable values) { + if (completionsBuilder_ == null) { + ensureCompletionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, completions_); + onChanged(); + } else { + completionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder clearCompletions() { + if (completionsBuilder_ == null) { + completions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + completionsBuilder_.clear(); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public Builder removeCompletions(int index) { + if (completionsBuilder_ == null) { + ensureCompletionsIsMutable(); + completions_.remove(index); + onChanged(); + } else { + completionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder getCompletionsBuilder( + int index) { + return getCompletionsFieldBuilder().getBuilder(index); + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public com.heroiclabs.nakama.api.MatchmakerCompletionStatsOrBuilder getCompletionsOrBuilder( + int index) { + if (completionsBuilder_ == null) { + return completions_.get(index); } else { + return completionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public java.util.List + getCompletionsOrBuilderList() { + if (completionsBuilder_ != null) { + return completionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(completions_); + } + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder addCompletionsBuilder() { + return getCompletionsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.MatchmakerCompletionStats.getDefaultInstance()); + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder addCompletionsBuilder( + int index) { + return getCompletionsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.MatchmakerCompletionStats.getDefaultInstance()); + } + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + public java.util.List + getCompletionsBuilderList() { + return getCompletionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.MatchmakerCompletionStats, com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder, com.heroiclabs.nakama.api.MatchmakerCompletionStatsOrBuilder> + getCompletionsFieldBuilder() { + if (completionsBuilder_ == null) { + completionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.MatchmakerCompletionStats, com.heroiclabs.nakama.api.MatchmakerCompletionStats.Builder, com.heroiclabs.nakama.api.MatchmakerCompletionStatsOrBuilder>( + completions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + completions_ = null; + } + return completionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.MatchmakerStats) + } + + // @@protoc_insertion_point(class_scope:nakama.api.MatchmakerStats) + private static final com.heroiclabs.nakama.api.MatchmakerStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.MatchmakerStats(); + } + + public static com.heroiclabs.nakama.api.MatchmakerStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchmakerStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.MatchmakerStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/MatchmakerStatsOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/MatchmakerStatsOrBuilder.java new file mode 100644 index 00000000..c746eeb2 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/MatchmakerStatsOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface MatchmakerStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.MatchmakerStats) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 ticket_count = 1 [json_name = "ticketCount"]; + * @return The ticketCount. + */ + int getTicketCount(); + + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + * @return Whether the oldestTicketCreateTime field is set. + */ + boolean hasOldestTicketCreateTime(); + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + * @return The oldestTicketCreateTime. + */ + com.google.protobuf.Timestamp getOldestTicketCreateTime(); + /** + * .google.protobuf.Timestamp oldest_ticket_create_time = 2 [json_name = "oldestTicketCreateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getOldestTicketCreateTimeOrBuilder(); + + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + java.util.List + getCompletionsList(); + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + com.heroiclabs.nakama.api.MatchmakerCompletionStats getCompletions(int index); + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + int getCompletionsCount(); + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + java.util.List + getCompletionsOrBuilderList(); + /** + * repeated .nakama.api.MatchmakerCompletionStats completions = 3 [json_name = "completions"]; + */ + com.heroiclabs.nakama.api.MatchmakerCompletionStatsOrBuilder getCompletionsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/NakamaGrpc.java b/src/main/java/com/heroiclabs/nakama/api/NakamaGrpc.java new file mode 100644 index 00000000..21b08111 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/NakamaGrpc.java @@ -0,0 +1,7381 @@ +package com.heroiclabs.nakama.api; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ **
+ * The Nakama RPC protocol service built with GRPC.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: github.com/heroiclabs/nakama/api/apigrpc.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class NakamaGrpc { + + private NakamaGrpc() {} + + public static final java.lang.String SERVICE_NAME = "nakama.api.Nakama"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getAddFriendsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddFriends", + requestType = com.heroiclabs.nakama.api.AddFriendsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAddFriendsMethod() { + io.grpc.MethodDescriptor getAddFriendsMethod; + if ((getAddFriendsMethod = NakamaGrpc.getAddFriendsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAddFriendsMethod = NakamaGrpc.getAddFriendsMethod) == null) { + NakamaGrpc.getAddFriendsMethod = getAddFriendsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddFriends")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AddFriendsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AddFriends")) + .build(); + } + } + } + return getAddFriendsMethod; + } + + private static volatile io.grpc.MethodDescriptor getAddGroupUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddGroupUsers", + requestType = com.heroiclabs.nakama.api.AddGroupUsersRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAddGroupUsersMethod() { + io.grpc.MethodDescriptor getAddGroupUsersMethod; + if ((getAddGroupUsersMethod = NakamaGrpc.getAddGroupUsersMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAddGroupUsersMethod = NakamaGrpc.getAddGroupUsersMethod) == null) { + NakamaGrpc.getAddGroupUsersMethod = getAddGroupUsersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddGroupUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AddGroupUsersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AddGroupUsers")) + .build(); + } + } + } + return getAddGroupUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor getSessionRefreshMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SessionRefresh", + requestType = com.heroiclabs.nakama.api.SessionRefreshRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSessionRefreshMethod() { + io.grpc.MethodDescriptor getSessionRefreshMethod; + if ((getSessionRefreshMethod = NakamaGrpc.getSessionRefreshMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getSessionRefreshMethod = NakamaGrpc.getSessionRefreshMethod) == null) { + NakamaGrpc.getSessionRefreshMethod = getSessionRefreshMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SessionRefresh")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.SessionRefreshRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("SessionRefresh")) + .build(); + } + } + } + return getSessionRefreshMethod; + } + + private static volatile io.grpc.MethodDescriptor getSessionLogoutMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SessionLogout", + requestType = com.heroiclabs.nakama.api.SessionLogoutRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSessionLogoutMethod() { + io.grpc.MethodDescriptor getSessionLogoutMethod; + if ((getSessionLogoutMethod = NakamaGrpc.getSessionLogoutMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getSessionLogoutMethod = NakamaGrpc.getSessionLogoutMethod) == null) { + NakamaGrpc.getSessionLogoutMethod = getSessionLogoutMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SessionLogout")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.SessionLogoutRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("SessionLogout")) + .build(); + } + } + } + return getSessionLogoutMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateAppleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateApple", + requestType = com.heroiclabs.nakama.api.AuthenticateAppleRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateAppleMethod() { + io.grpc.MethodDescriptor getAuthenticateAppleMethod; + if ((getAuthenticateAppleMethod = NakamaGrpc.getAuthenticateAppleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateAppleMethod = NakamaGrpc.getAuthenticateAppleMethod) == null) { + NakamaGrpc.getAuthenticateAppleMethod = getAuthenticateAppleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateApple")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateAppleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateApple")) + .build(); + } + } + } + return getAuthenticateAppleMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateCustomMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateCustom", + requestType = com.heroiclabs.nakama.api.AuthenticateCustomRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateCustomMethod() { + io.grpc.MethodDescriptor getAuthenticateCustomMethod; + if ((getAuthenticateCustomMethod = NakamaGrpc.getAuthenticateCustomMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateCustomMethod = NakamaGrpc.getAuthenticateCustomMethod) == null) { + NakamaGrpc.getAuthenticateCustomMethod = getAuthenticateCustomMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateCustom")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateCustomRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateCustom")) + .build(); + } + } + } + return getAuthenticateCustomMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateDevice", + requestType = com.heroiclabs.nakama.api.AuthenticateDeviceRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateDeviceMethod() { + io.grpc.MethodDescriptor getAuthenticateDeviceMethod; + if ((getAuthenticateDeviceMethod = NakamaGrpc.getAuthenticateDeviceMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateDeviceMethod = NakamaGrpc.getAuthenticateDeviceMethod) == null) { + NakamaGrpc.getAuthenticateDeviceMethod = getAuthenticateDeviceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateDevice")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateDeviceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateDevice")) + .build(); + } + } + } + return getAuthenticateDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateEmailMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateEmail", + requestType = com.heroiclabs.nakama.api.AuthenticateEmailRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateEmailMethod() { + io.grpc.MethodDescriptor getAuthenticateEmailMethod; + if ((getAuthenticateEmailMethod = NakamaGrpc.getAuthenticateEmailMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateEmailMethod = NakamaGrpc.getAuthenticateEmailMethod) == null) { + NakamaGrpc.getAuthenticateEmailMethod = getAuthenticateEmailMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateEmail")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateEmailRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateEmail")) + .build(); + } + } + } + return getAuthenticateEmailMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateFacebookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateFacebook", + requestType = com.heroiclabs.nakama.api.AuthenticateFacebookRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateFacebookMethod() { + io.grpc.MethodDescriptor getAuthenticateFacebookMethod; + if ((getAuthenticateFacebookMethod = NakamaGrpc.getAuthenticateFacebookMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateFacebookMethod = NakamaGrpc.getAuthenticateFacebookMethod) == null) { + NakamaGrpc.getAuthenticateFacebookMethod = getAuthenticateFacebookMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateFacebook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateFacebookRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateFacebook")) + .build(); + } + } + } + return getAuthenticateFacebookMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateFacebookInstantGameMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateFacebookInstantGame", + requestType = com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateFacebookInstantGameMethod() { + io.grpc.MethodDescriptor getAuthenticateFacebookInstantGameMethod; + if ((getAuthenticateFacebookInstantGameMethod = NakamaGrpc.getAuthenticateFacebookInstantGameMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateFacebookInstantGameMethod = NakamaGrpc.getAuthenticateFacebookInstantGameMethod) == null) { + NakamaGrpc.getAuthenticateFacebookInstantGameMethod = getAuthenticateFacebookInstantGameMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateFacebookInstantGame")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateFacebookInstantGame")) + .build(); + } + } + } + return getAuthenticateFacebookInstantGameMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateGameCenterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateGameCenter", + requestType = com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateGameCenterMethod() { + io.grpc.MethodDescriptor getAuthenticateGameCenterMethod; + if ((getAuthenticateGameCenterMethod = NakamaGrpc.getAuthenticateGameCenterMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateGameCenterMethod = NakamaGrpc.getAuthenticateGameCenterMethod) == null) { + NakamaGrpc.getAuthenticateGameCenterMethod = getAuthenticateGameCenterMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateGameCenter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateGameCenter")) + .build(); + } + } + } + return getAuthenticateGameCenterMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateGoogleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateGoogle", + requestType = com.heroiclabs.nakama.api.AuthenticateGoogleRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateGoogleMethod() { + io.grpc.MethodDescriptor getAuthenticateGoogleMethod; + if ((getAuthenticateGoogleMethod = NakamaGrpc.getAuthenticateGoogleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateGoogleMethod = NakamaGrpc.getAuthenticateGoogleMethod) == null) { + NakamaGrpc.getAuthenticateGoogleMethod = getAuthenticateGoogleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateGoogle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateGoogleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateGoogle")) + .build(); + } + } + } + return getAuthenticateGoogleMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateSteamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateSteam", + requestType = com.heroiclabs.nakama.api.AuthenticateSteamRequest.class, + responseType = com.heroiclabs.nakama.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateSteamMethod() { + io.grpc.MethodDescriptor getAuthenticateSteamMethod; + if ((getAuthenticateSteamMethod = NakamaGrpc.getAuthenticateSteamMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getAuthenticateSteamMethod = NakamaGrpc.getAuthenticateSteamMethod) == null) { + NakamaGrpc.getAuthenticateSteamMethod = getAuthenticateSteamMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateSteam")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AuthenticateSteamRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("AuthenticateSteam")) + .build(); + } + } + } + return getAuthenticateSteamMethod; + } + + private static volatile io.grpc.MethodDescriptor getBanGroupUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BanGroupUsers", + requestType = com.heroiclabs.nakama.api.BanGroupUsersRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBanGroupUsersMethod() { + io.grpc.MethodDescriptor getBanGroupUsersMethod; + if ((getBanGroupUsersMethod = NakamaGrpc.getBanGroupUsersMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getBanGroupUsersMethod = NakamaGrpc.getBanGroupUsersMethod) == null) { + NakamaGrpc.getBanGroupUsersMethod = getBanGroupUsersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BanGroupUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.BanGroupUsersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("BanGroupUsers")) + .build(); + } + } + } + return getBanGroupUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor getBlockFriendsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BlockFriends", + requestType = com.heroiclabs.nakama.api.BlockFriendsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBlockFriendsMethod() { + io.grpc.MethodDescriptor getBlockFriendsMethod; + if ((getBlockFriendsMethod = NakamaGrpc.getBlockFriendsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getBlockFriendsMethod = NakamaGrpc.getBlockFriendsMethod) == null) { + NakamaGrpc.getBlockFriendsMethod = getBlockFriendsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BlockFriends")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.BlockFriendsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("BlockFriends")) + .build(); + } + } + } + return getBlockFriendsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateGroup", + requestType = com.heroiclabs.nakama.api.CreateGroupRequest.class, + responseType = com.heroiclabs.nakama.api.Group.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateGroupMethod() { + io.grpc.MethodDescriptor getCreateGroupMethod; + if ((getCreateGroupMethod = NakamaGrpc.getCreateGroupMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getCreateGroupMethod = NakamaGrpc.getCreateGroupMethod) == null) { + NakamaGrpc.getCreateGroupMethod = getCreateGroupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.CreateGroupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Group.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("CreateGroup")) + .build(); + } + } + } + return getCreateGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAccount", + requestType = com.google.protobuf.Empty.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteAccountMethod() { + io.grpc.MethodDescriptor getDeleteAccountMethod; + if ((getDeleteAccountMethod = NakamaGrpc.getDeleteAccountMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDeleteAccountMethod = NakamaGrpc.getDeleteAccountMethod) == null) { + NakamaGrpc.getDeleteAccountMethod = getDeleteAccountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DeleteAccount")) + .build(); + } + } + } + return getDeleteAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteFriendsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFriends", + requestType = com.heroiclabs.nakama.api.DeleteFriendsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteFriendsMethod() { + io.grpc.MethodDescriptor getDeleteFriendsMethod; + if ((getDeleteFriendsMethod = NakamaGrpc.getDeleteFriendsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDeleteFriendsMethod = NakamaGrpc.getDeleteFriendsMethod) == null) { + NakamaGrpc.getDeleteFriendsMethod = getDeleteFriendsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteFriends")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.DeleteFriendsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DeleteFriends")) + .build(); + } + } + } + return getDeleteFriendsMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteGroup", + requestType = com.heroiclabs.nakama.api.DeleteGroupRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteGroupMethod() { + io.grpc.MethodDescriptor getDeleteGroupMethod; + if ((getDeleteGroupMethod = NakamaGrpc.getDeleteGroupMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDeleteGroupMethod = NakamaGrpc.getDeleteGroupMethod) == null) { + NakamaGrpc.getDeleteGroupMethod = getDeleteGroupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.DeleteGroupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DeleteGroup")) + .build(); + } + } + } + return getDeleteGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteLeaderboardRecordMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteLeaderboardRecord", + requestType = com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteLeaderboardRecordMethod() { + io.grpc.MethodDescriptor getDeleteLeaderboardRecordMethod; + if ((getDeleteLeaderboardRecordMethod = NakamaGrpc.getDeleteLeaderboardRecordMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDeleteLeaderboardRecordMethod = NakamaGrpc.getDeleteLeaderboardRecordMethod) == null) { + NakamaGrpc.getDeleteLeaderboardRecordMethod = getDeleteLeaderboardRecordMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteLeaderboardRecord")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DeleteLeaderboardRecord")) + .build(); + } + } + } + return getDeleteLeaderboardRecordMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteNotificationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNotifications", + requestType = com.heroiclabs.nakama.api.DeleteNotificationsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteNotificationsMethod() { + io.grpc.MethodDescriptor getDeleteNotificationsMethod; + if ((getDeleteNotificationsMethod = NakamaGrpc.getDeleteNotificationsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDeleteNotificationsMethod = NakamaGrpc.getDeleteNotificationsMethod) == null) { + NakamaGrpc.getDeleteNotificationsMethod = getDeleteNotificationsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNotifications")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.DeleteNotificationsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DeleteNotifications")) + .build(); + } + } + } + return getDeleteNotificationsMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteTournamentRecordMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTournamentRecord", + requestType = com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteTournamentRecordMethod() { + io.grpc.MethodDescriptor getDeleteTournamentRecordMethod; + if ((getDeleteTournamentRecordMethod = NakamaGrpc.getDeleteTournamentRecordMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDeleteTournamentRecordMethod = NakamaGrpc.getDeleteTournamentRecordMethod) == null) { + NakamaGrpc.getDeleteTournamentRecordMethod = getDeleteTournamentRecordMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTournamentRecord")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DeleteTournamentRecord")) + .build(); + } + } + } + return getDeleteTournamentRecordMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteStorageObjectsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteStorageObjects", + requestType = com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteStorageObjectsMethod() { + io.grpc.MethodDescriptor getDeleteStorageObjectsMethod; + if ((getDeleteStorageObjectsMethod = NakamaGrpc.getDeleteStorageObjectsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDeleteStorageObjectsMethod = NakamaGrpc.getDeleteStorageObjectsMethod) == null) { + NakamaGrpc.getDeleteStorageObjectsMethod = getDeleteStorageObjectsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteStorageObjects")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DeleteStorageObjects")) + .build(); + } + } + } + return getDeleteStorageObjectsMethod; + } + + private static volatile io.grpc.MethodDescriptor getEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Event", + requestType = com.heroiclabs.nakama.api.Event.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getEventMethod() { + io.grpc.MethodDescriptor getEventMethod; + if ((getEventMethod = NakamaGrpc.getEventMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getEventMethod = NakamaGrpc.getEventMethod) == null) { + NakamaGrpc.getEventMethod = getEventMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Event")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Event.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("Event")) + .build(); + } + } + } + return getEventMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAccount", + requestType = com.google.protobuf.Empty.class, + responseType = com.heroiclabs.nakama.api.Account.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAccountMethod() { + io.grpc.MethodDescriptor getGetAccountMethod; + if ((getGetAccountMethod = NakamaGrpc.getGetAccountMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getGetAccountMethod = NakamaGrpc.getGetAccountMethod) == null) { + NakamaGrpc.getGetAccountMethod = getGetAccountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Account.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("GetAccount")) + .build(); + } + } + } + return getGetAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetUsers", + requestType = com.heroiclabs.nakama.api.GetUsersRequest.class, + responseType = com.heroiclabs.nakama.api.Users.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetUsersMethod() { + io.grpc.MethodDescriptor getGetUsersMethod; + if ((getGetUsersMethod = NakamaGrpc.getGetUsersMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getGetUsersMethod = NakamaGrpc.getGetUsersMethod) == null) { + NakamaGrpc.getGetUsersMethod = getGetUsersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.GetUsersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Users.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("GetUsers")) + .build(); + } + } + } + return getGetUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetSubscriptionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSubscription", + requestType = com.heroiclabs.nakama.api.GetSubscriptionRequest.class, + responseType = com.heroiclabs.nakama.api.ValidatedSubscription.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubscriptionMethod() { + io.grpc.MethodDescriptor getGetSubscriptionMethod; + if ((getGetSubscriptionMethod = NakamaGrpc.getGetSubscriptionMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getGetSubscriptionMethod = NakamaGrpc.getGetSubscriptionMethod) == null) { + NakamaGrpc.getGetSubscriptionMethod = getGetSubscriptionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscription")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.GetSubscriptionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("GetSubscription")) + .build(); + } + } + } + return getGetSubscriptionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetMatchmakerStatsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMatchmakerStats", + requestType = com.google.protobuf.Empty.class, + responseType = com.heroiclabs.nakama.api.MatchmakerStats.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetMatchmakerStatsMethod() { + io.grpc.MethodDescriptor getGetMatchmakerStatsMethod; + if ((getGetMatchmakerStatsMethod = NakamaGrpc.getGetMatchmakerStatsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getGetMatchmakerStatsMethod = NakamaGrpc.getGetMatchmakerStatsMethod) == null) { + NakamaGrpc.getGetMatchmakerStatsMethod = getGetMatchmakerStatsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMatchmakerStats")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.MatchmakerStats.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("GetMatchmakerStats")) + .build(); + } + } + } + return getGetMatchmakerStatsMethod; + } + + private static volatile io.grpc.MethodDescriptor getHealthcheckMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Healthcheck", + requestType = com.google.protobuf.Empty.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getHealthcheckMethod() { + io.grpc.MethodDescriptor getHealthcheckMethod; + if ((getHealthcheckMethod = NakamaGrpc.getHealthcheckMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getHealthcheckMethod = NakamaGrpc.getHealthcheckMethod) == null) { + NakamaGrpc.getHealthcheckMethod = getHealthcheckMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Healthcheck")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("Healthcheck")) + .build(); + } + } + } + return getHealthcheckMethod; + } + + private static volatile io.grpc.MethodDescriptor getImportFacebookFriendsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportFacebookFriends", + requestType = com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getImportFacebookFriendsMethod() { + io.grpc.MethodDescriptor getImportFacebookFriendsMethod; + if ((getImportFacebookFriendsMethod = NakamaGrpc.getImportFacebookFriendsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getImportFacebookFriendsMethod = NakamaGrpc.getImportFacebookFriendsMethod) == null) { + NakamaGrpc.getImportFacebookFriendsMethod = getImportFacebookFriendsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportFacebookFriends")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ImportFacebookFriends")) + .build(); + } + } + } + return getImportFacebookFriendsMethod; + } + + private static volatile io.grpc.MethodDescriptor getImportSteamFriendsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportSteamFriends", + requestType = com.heroiclabs.nakama.api.ImportSteamFriendsRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getImportSteamFriendsMethod() { + io.grpc.MethodDescriptor getImportSteamFriendsMethod; + if ((getImportSteamFriendsMethod = NakamaGrpc.getImportSteamFriendsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getImportSteamFriendsMethod = NakamaGrpc.getImportSteamFriendsMethod) == null) { + NakamaGrpc.getImportSteamFriendsMethod = getImportSteamFriendsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportSteamFriends")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ImportSteamFriendsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ImportSteamFriends")) + .build(); + } + } + } + return getImportSteamFriendsMethod; + } + + private static volatile io.grpc.MethodDescriptor getJoinGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "JoinGroup", + requestType = com.heroiclabs.nakama.api.JoinGroupRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getJoinGroupMethod() { + io.grpc.MethodDescriptor getJoinGroupMethod; + if ((getJoinGroupMethod = NakamaGrpc.getJoinGroupMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getJoinGroupMethod = NakamaGrpc.getJoinGroupMethod) == null) { + NakamaGrpc.getJoinGroupMethod = getJoinGroupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "JoinGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.JoinGroupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("JoinGroup")) + .build(); + } + } + } + return getJoinGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor getJoinTournamentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "JoinTournament", + requestType = com.heroiclabs.nakama.api.JoinTournamentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getJoinTournamentMethod() { + io.grpc.MethodDescriptor getJoinTournamentMethod; + if ((getJoinTournamentMethod = NakamaGrpc.getJoinTournamentMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getJoinTournamentMethod = NakamaGrpc.getJoinTournamentMethod) == null) { + NakamaGrpc.getJoinTournamentMethod = getJoinTournamentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "JoinTournament")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.JoinTournamentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("JoinTournament")) + .build(); + } + } + } + return getJoinTournamentMethod; + } + + private static volatile io.grpc.MethodDescriptor getKickGroupUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "KickGroupUsers", + requestType = com.heroiclabs.nakama.api.KickGroupUsersRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getKickGroupUsersMethod() { + io.grpc.MethodDescriptor getKickGroupUsersMethod; + if ((getKickGroupUsersMethod = NakamaGrpc.getKickGroupUsersMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getKickGroupUsersMethod = NakamaGrpc.getKickGroupUsersMethod) == null) { + NakamaGrpc.getKickGroupUsersMethod = getKickGroupUsersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "KickGroupUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.KickGroupUsersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("KickGroupUsers")) + .build(); + } + } + } + return getKickGroupUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor getLeaveGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LeaveGroup", + requestType = com.heroiclabs.nakama.api.LeaveGroupRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLeaveGroupMethod() { + io.grpc.MethodDescriptor getLeaveGroupMethod; + if ((getLeaveGroupMethod = NakamaGrpc.getLeaveGroupMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLeaveGroupMethod = NakamaGrpc.getLeaveGroupMethod) == null) { + NakamaGrpc.getLeaveGroupMethod = getLeaveGroupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LeaveGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.LeaveGroupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LeaveGroup")) + .build(); + } + } + } + return getLeaveGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkAppleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkApple", + requestType = com.heroiclabs.nakama.api.AccountApple.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkAppleMethod() { + io.grpc.MethodDescriptor getLinkAppleMethod; + if ((getLinkAppleMethod = NakamaGrpc.getLinkAppleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkAppleMethod = NakamaGrpc.getLinkAppleMethod) == null) { + NakamaGrpc.getLinkAppleMethod = getLinkAppleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkApple")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountApple.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkApple")) + .build(); + } + } + } + return getLinkAppleMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkCustomMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkCustom", + requestType = com.heroiclabs.nakama.api.AccountCustom.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkCustomMethod() { + io.grpc.MethodDescriptor getLinkCustomMethod; + if ((getLinkCustomMethod = NakamaGrpc.getLinkCustomMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkCustomMethod = NakamaGrpc.getLinkCustomMethod) == null) { + NakamaGrpc.getLinkCustomMethod = getLinkCustomMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkCustom")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkCustom")) + .build(); + } + } + } + return getLinkCustomMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkDevice", + requestType = com.heroiclabs.nakama.api.AccountDevice.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkDeviceMethod() { + io.grpc.MethodDescriptor getLinkDeviceMethod; + if ((getLinkDeviceMethod = NakamaGrpc.getLinkDeviceMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkDeviceMethod = NakamaGrpc.getLinkDeviceMethod) == null) { + NakamaGrpc.getLinkDeviceMethod = getLinkDeviceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkDevice")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkDevice")) + .build(); + } + } + } + return getLinkDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkEmailMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkEmail", + requestType = com.heroiclabs.nakama.api.AccountEmail.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkEmailMethod() { + io.grpc.MethodDescriptor getLinkEmailMethod; + if ((getLinkEmailMethod = NakamaGrpc.getLinkEmailMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkEmailMethod = NakamaGrpc.getLinkEmailMethod) == null) { + NakamaGrpc.getLinkEmailMethod = getLinkEmailMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkEmail")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkEmail")) + .build(); + } + } + } + return getLinkEmailMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkFacebookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkFacebook", + requestType = com.heroiclabs.nakama.api.LinkFacebookRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkFacebookMethod() { + io.grpc.MethodDescriptor getLinkFacebookMethod; + if ((getLinkFacebookMethod = NakamaGrpc.getLinkFacebookMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkFacebookMethod = NakamaGrpc.getLinkFacebookMethod) == null) { + NakamaGrpc.getLinkFacebookMethod = getLinkFacebookMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkFacebook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.LinkFacebookRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkFacebook")) + .build(); + } + } + } + return getLinkFacebookMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkFacebookInstantGameMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkFacebookInstantGame", + requestType = com.heroiclabs.nakama.api.AccountFacebookInstantGame.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkFacebookInstantGameMethod() { + io.grpc.MethodDescriptor getLinkFacebookInstantGameMethod; + if ((getLinkFacebookInstantGameMethod = NakamaGrpc.getLinkFacebookInstantGameMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkFacebookInstantGameMethod = NakamaGrpc.getLinkFacebookInstantGameMethod) == null) { + NakamaGrpc.getLinkFacebookInstantGameMethod = getLinkFacebookInstantGameMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkFacebookInstantGame")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkFacebookInstantGame")) + .build(); + } + } + } + return getLinkFacebookInstantGameMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkGameCenterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkGameCenter", + requestType = com.heroiclabs.nakama.api.AccountGameCenter.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkGameCenterMethod() { + io.grpc.MethodDescriptor getLinkGameCenterMethod; + if ((getLinkGameCenterMethod = NakamaGrpc.getLinkGameCenterMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkGameCenterMethod = NakamaGrpc.getLinkGameCenterMethod) == null) { + NakamaGrpc.getLinkGameCenterMethod = getLinkGameCenterMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkGameCenter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkGameCenter")) + .build(); + } + } + } + return getLinkGameCenterMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkGoogleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkGoogle", + requestType = com.heroiclabs.nakama.api.AccountGoogle.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkGoogleMethod() { + io.grpc.MethodDescriptor getLinkGoogleMethod; + if ((getLinkGoogleMethod = NakamaGrpc.getLinkGoogleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkGoogleMethod = NakamaGrpc.getLinkGoogleMethod) == null) { + NakamaGrpc.getLinkGoogleMethod = getLinkGoogleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkGoogle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkGoogle")) + .build(); + } + } + } + return getLinkGoogleMethod; + } + + private static volatile io.grpc.MethodDescriptor getLinkSteamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LinkSteam", + requestType = com.heroiclabs.nakama.api.LinkSteamRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLinkSteamMethod() { + io.grpc.MethodDescriptor getLinkSteamMethod; + if ((getLinkSteamMethod = NakamaGrpc.getLinkSteamMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getLinkSteamMethod = NakamaGrpc.getLinkSteamMethod) == null) { + NakamaGrpc.getLinkSteamMethod = getLinkSteamMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LinkSteam")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.LinkSteamRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("LinkSteam")) + .build(); + } + } + } + return getLinkSteamMethod; + } + + private static volatile io.grpc.MethodDescriptor getListChannelMessagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListChannelMessages", + requestType = com.heroiclabs.nakama.api.ListChannelMessagesRequest.class, + responseType = com.heroiclabs.nakama.api.ChannelMessageList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListChannelMessagesMethod() { + io.grpc.MethodDescriptor getListChannelMessagesMethod; + if ((getListChannelMessagesMethod = NakamaGrpc.getListChannelMessagesMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListChannelMessagesMethod = NakamaGrpc.getListChannelMessagesMethod) == null) { + NakamaGrpc.getListChannelMessagesMethod = getListChannelMessagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListChannelMessages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListChannelMessagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ChannelMessageList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListChannelMessages")) + .build(); + } + } + } + return getListChannelMessagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getListFriendsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFriends", + requestType = com.heroiclabs.nakama.api.ListFriendsRequest.class, + responseType = com.heroiclabs.nakama.api.FriendList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListFriendsMethod() { + io.grpc.MethodDescriptor getListFriendsMethod; + if ((getListFriendsMethod = NakamaGrpc.getListFriendsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListFriendsMethod = NakamaGrpc.getListFriendsMethod) == null) { + NakamaGrpc.getListFriendsMethod = getListFriendsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFriends")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListFriendsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.FriendList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListFriends")) + .build(); + } + } + } + return getListFriendsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListFriendsOfFriendsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFriendsOfFriends", + requestType = com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.class, + responseType = com.heroiclabs.nakama.api.FriendsOfFriendsList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListFriendsOfFriendsMethod() { + io.grpc.MethodDescriptor getListFriendsOfFriendsMethod; + if ((getListFriendsOfFriendsMethod = NakamaGrpc.getListFriendsOfFriendsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListFriendsOfFriendsMethod = NakamaGrpc.getListFriendsOfFriendsMethod) == null) { + NakamaGrpc.getListFriendsOfFriendsMethod = getListFriendsOfFriendsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListFriendsOfFriends")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.FriendsOfFriendsList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListFriendsOfFriends")) + .build(); + } + } + } + return getListFriendsOfFriendsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGroups", + requestType = com.heroiclabs.nakama.api.ListGroupsRequest.class, + responseType = com.heroiclabs.nakama.api.GroupList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListGroupsMethod() { + io.grpc.MethodDescriptor getListGroupsMethod; + if ((getListGroupsMethod = NakamaGrpc.getListGroupsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListGroupsMethod = NakamaGrpc.getListGroupsMethod) == null) { + NakamaGrpc.getListGroupsMethod = getListGroupsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListGroupsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.GroupList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListGroups")) + .build(); + } + } + } + return getListGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListGroupUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGroupUsers", + requestType = com.heroiclabs.nakama.api.ListGroupUsersRequest.class, + responseType = com.heroiclabs.nakama.api.GroupUserList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListGroupUsersMethod() { + io.grpc.MethodDescriptor getListGroupUsersMethod; + if ((getListGroupUsersMethod = NakamaGrpc.getListGroupUsersMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListGroupUsersMethod = NakamaGrpc.getListGroupUsersMethod) == null) { + NakamaGrpc.getListGroupUsersMethod = getListGroupUsersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGroupUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListGroupUsersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.GroupUserList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListGroupUsers")) + .build(); + } + } + } + return getListGroupUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor getListLeaderboardRecordsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLeaderboardRecords", + requestType = com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.class, + responseType = com.heroiclabs.nakama.api.LeaderboardRecordList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListLeaderboardRecordsMethod() { + io.grpc.MethodDescriptor getListLeaderboardRecordsMethod; + if ((getListLeaderboardRecordsMethod = NakamaGrpc.getListLeaderboardRecordsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListLeaderboardRecordsMethod = NakamaGrpc.getListLeaderboardRecordsMethod) == null) { + NakamaGrpc.getListLeaderboardRecordsMethod = getListLeaderboardRecordsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLeaderboardRecords")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.LeaderboardRecordList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListLeaderboardRecords")) + .build(); + } + } + } + return getListLeaderboardRecordsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListLeaderboardRecordsAroundOwnerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLeaderboardRecordsAroundOwner", + requestType = com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.class, + responseType = com.heroiclabs.nakama.api.LeaderboardRecordList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListLeaderboardRecordsAroundOwnerMethod() { + io.grpc.MethodDescriptor getListLeaderboardRecordsAroundOwnerMethod; + if ((getListLeaderboardRecordsAroundOwnerMethod = NakamaGrpc.getListLeaderboardRecordsAroundOwnerMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListLeaderboardRecordsAroundOwnerMethod = NakamaGrpc.getListLeaderboardRecordsAroundOwnerMethod) == null) { + NakamaGrpc.getListLeaderboardRecordsAroundOwnerMethod = getListLeaderboardRecordsAroundOwnerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLeaderboardRecordsAroundOwner")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.LeaderboardRecordList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListLeaderboardRecordsAroundOwner")) + .build(); + } + } + } + return getListLeaderboardRecordsAroundOwnerMethod; + } + + private static volatile io.grpc.MethodDescriptor getListMatchesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMatches", + requestType = com.heroiclabs.nakama.api.ListMatchesRequest.class, + responseType = com.heroiclabs.nakama.api.MatchList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListMatchesMethod() { + io.grpc.MethodDescriptor getListMatchesMethod; + if ((getListMatchesMethod = NakamaGrpc.getListMatchesMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListMatchesMethod = NakamaGrpc.getListMatchesMethod) == null) { + NakamaGrpc.getListMatchesMethod = getListMatchesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListMatches")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListMatchesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.MatchList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListMatches")) + .build(); + } + } + } + return getListMatchesMethod; + } + + private static volatile io.grpc.MethodDescriptor getListNotificationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotifications", + requestType = com.heroiclabs.nakama.api.ListNotificationsRequest.class, + responseType = com.heroiclabs.nakama.api.NotificationList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNotificationsMethod() { + io.grpc.MethodDescriptor getListNotificationsMethod; + if ((getListNotificationsMethod = NakamaGrpc.getListNotificationsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListNotificationsMethod = NakamaGrpc.getListNotificationsMethod) == null) { + NakamaGrpc.getListNotificationsMethod = getListNotificationsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotifications")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListNotificationsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.NotificationList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListNotifications")) + .build(); + } + } + } + return getListNotificationsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListStorageObjectsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListStorageObjects", + requestType = com.heroiclabs.nakama.api.ListStorageObjectsRequest.class, + responseType = com.heroiclabs.nakama.api.StorageObjectList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListStorageObjectsMethod() { + io.grpc.MethodDescriptor getListStorageObjectsMethod; + if ((getListStorageObjectsMethod = NakamaGrpc.getListStorageObjectsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListStorageObjectsMethod = NakamaGrpc.getListStorageObjectsMethod) == null) { + NakamaGrpc.getListStorageObjectsMethod = getListStorageObjectsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListStorageObjects")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListStorageObjectsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.StorageObjectList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListStorageObjects")) + .build(); + } + } + } + return getListStorageObjectsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListSubscriptionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSubscriptions", + requestType = com.heroiclabs.nakama.api.ListSubscriptionsRequest.class, + responseType = com.heroiclabs.nakama.api.SubscriptionList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSubscriptionsMethod() { + io.grpc.MethodDescriptor getListSubscriptionsMethod; + if ((getListSubscriptionsMethod = NakamaGrpc.getListSubscriptionsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListSubscriptionsMethod = NakamaGrpc.getListSubscriptionsMethod) == null) { + NakamaGrpc.getListSubscriptionsMethod = getListSubscriptionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubscriptions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListSubscriptionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.SubscriptionList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListSubscriptions")) + .build(); + } + } + } + return getListSubscriptionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTournamentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTournaments", + requestType = com.heroiclabs.nakama.api.ListTournamentsRequest.class, + responseType = com.heroiclabs.nakama.api.TournamentList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTournamentsMethod() { + io.grpc.MethodDescriptor getListTournamentsMethod; + if ((getListTournamentsMethod = NakamaGrpc.getListTournamentsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListTournamentsMethod = NakamaGrpc.getListTournamentsMethod) == null) { + NakamaGrpc.getListTournamentsMethod = getListTournamentsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTournaments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListTournamentsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.TournamentList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListTournaments")) + .build(); + } + } + } + return getListTournamentsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTournamentRecordsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTournamentRecords", + requestType = com.heroiclabs.nakama.api.ListTournamentRecordsRequest.class, + responseType = com.heroiclabs.nakama.api.TournamentRecordList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTournamentRecordsMethod() { + io.grpc.MethodDescriptor getListTournamentRecordsMethod; + if ((getListTournamentRecordsMethod = NakamaGrpc.getListTournamentRecordsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListTournamentRecordsMethod = NakamaGrpc.getListTournamentRecordsMethod) == null) { + NakamaGrpc.getListTournamentRecordsMethod = getListTournamentRecordsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTournamentRecords")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListTournamentRecordsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.TournamentRecordList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListTournamentRecords")) + .build(); + } + } + } + return getListTournamentRecordsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTournamentRecordsAroundOwnerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTournamentRecordsAroundOwner", + requestType = com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.class, + responseType = com.heroiclabs.nakama.api.TournamentRecordList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTournamentRecordsAroundOwnerMethod() { + io.grpc.MethodDescriptor getListTournamentRecordsAroundOwnerMethod; + if ((getListTournamentRecordsAroundOwnerMethod = NakamaGrpc.getListTournamentRecordsAroundOwnerMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListTournamentRecordsAroundOwnerMethod = NakamaGrpc.getListTournamentRecordsAroundOwnerMethod) == null) { + NakamaGrpc.getListTournamentRecordsAroundOwnerMethod = getListTournamentRecordsAroundOwnerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTournamentRecordsAroundOwner")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.TournamentRecordList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListTournamentRecordsAroundOwner")) + .build(); + } + } + } + return getListTournamentRecordsAroundOwnerMethod; + } + + private static volatile io.grpc.MethodDescriptor getListUserGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListUserGroups", + requestType = com.heroiclabs.nakama.api.ListUserGroupsRequest.class, + responseType = com.heroiclabs.nakama.api.UserGroupList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListUserGroupsMethod() { + io.grpc.MethodDescriptor getListUserGroupsMethod; + if ((getListUserGroupsMethod = NakamaGrpc.getListUserGroupsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getListUserGroupsMethod = NakamaGrpc.getListUserGroupsMethod) == null) { + NakamaGrpc.getListUserGroupsMethod = getListUserGroupsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListUserGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ListUserGroupsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.UserGroupList.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ListUserGroups")) + .build(); + } + } + } + return getListUserGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor getPromoteGroupUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PromoteGroupUsers", + requestType = com.heroiclabs.nakama.api.PromoteGroupUsersRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPromoteGroupUsersMethod() { + io.grpc.MethodDescriptor getPromoteGroupUsersMethod; + if ((getPromoteGroupUsersMethod = NakamaGrpc.getPromoteGroupUsersMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getPromoteGroupUsersMethod = NakamaGrpc.getPromoteGroupUsersMethod) == null) { + NakamaGrpc.getPromoteGroupUsersMethod = getPromoteGroupUsersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PromoteGroupUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.PromoteGroupUsersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("PromoteGroupUsers")) + .build(); + } + } + } + return getPromoteGroupUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor getDemoteGroupUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DemoteGroupUsers", + requestType = com.heroiclabs.nakama.api.DemoteGroupUsersRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDemoteGroupUsersMethod() { + io.grpc.MethodDescriptor getDemoteGroupUsersMethod; + if ((getDemoteGroupUsersMethod = NakamaGrpc.getDemoteGroupUsersMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getDemoteGroupUsersMethod = NakamaGrpc.getDemoteGroupUsersMethod) == null) { + NakamaGrpc.getDemoteGroupUsersMethod = getDemoteGroupUsersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DemoteGroupUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.DemoteGroupUsersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("DemoteGroupUsers")) + .build(); + } + } + } + return getDemoteGroupUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor getReadStorageObjectsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReadStorageObjects", + requestType = com.heroiclabs.nakama.api.ReadStorageObjectsRequest.class, + responseType = com.heroiclabs.nakama.api.StorageObjects.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getReadStorageObjectsMethod() { + io.grpc.MethodDescriptor getReadStorageObjectsMethod; + if ((getReadStorageObjectsMethod = NakamaGrpc.getReadStorageObjectsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getReadStorageObjectsMethod = NakamaGrpc.getReadStorageObjectsMethod) == null) { + NakamaGrpc.getReadStorageObjectsMethod = getReadStorageObjectsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReadStorageObjects")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ReadStorageObjectsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.StorageObjects.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ReadStorageObjects")) + .build(); + } + } + } + return getReadStorageObjectsMethod; + } + + private static volatile io.grpc.MethodDescriptor getRpcFuncMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RpcFunc", + requestType = com.heroiclabs.nakama.api.Rpc.class, + responseType = com.heroiclabs.nakama.api.Rpc.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRpcFuncMethod() { + io.grpc.MethodDescriptor getRpcFuncMethod; + if ((getRpcFuncMethod = NakamaGrpc.getRpcFuncMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getRpcFuncMethod = NakamaGrpc.getRpcFuncMethod) == null) { + NakamaGrpc.getRpcFuncMethod = getRpcFuncMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RpcFunc")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Rpc.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.Rpc.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("RpcFunc")) + .build(); + } + } + } + return getRpcFuncMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkAppleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkApple", + requestType = com.heroiclabs.nakama.api.AccountApple.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkAppleMethod() { + io.grpc.MethodDescriptor getUnlinkAppleMethod; + if ((getUnlinkAppleMethod = NakamaGrpc.getUnlinkAppleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkAppleMethod = NakamaGrpc.getUnlinkAppleMethod) == null) { + NakamaGrpc.getUnlinkAppleMethod = getUnlinkAppleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkApple")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountApple.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkApple")) + .build(); + } + } + } + return getUnlinkAppleMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkCustomMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkCustom", + requestType = com.heroiclabs.nakama.api.AccountCustom.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkCustomMethod() { + io.grpc.MethodDescriptor getUnlinkCustomMethod; + if ((getUnlinkCustomMethod = NakamaGrpc.getUnlinkCustomMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkCustomMethod = NakamaGrpc.getUnlinkCustomMethod) == null) { + NakamaGrpc.getUnlinkCustomMethod = getUnlinkCustomMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkCustom")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountCustom.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkCustom")) + .build(); + } + } + } + return getUnlinkCustomMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkDevice", + requestType = com.heroiclabs.nakama.api.AccountDevice.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkDeviceMethod() { + io.grpc.MethodDescriptor getUnlinkDeviceMethod; + if ((getUnlinkDeviceMethod = NakamaGrpc.getUnlinkDeviceMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkDeviceMethod = NakamaGrpc.getUnlinkDeviceMethod) == null) { + NakamaGrpc.getUnlinkDeviceMethod = getUnlinkDeviceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkDevice")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountDevice.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkDevice")) + .build(); + } + } + } + return getUnlinkDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkEmailMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkEmail", + requestType = com.heroiclabs.nakama.api.AccountEmail.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkEmailMethod() { + io.grpc.MethodDescriptor getUnlinkEmailMethod; + if ((getUnlinkEmailMethod = NakamaGrpc.getUnlinkEmailMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkEmailMethod = NakamaGrpc.getUnlinkEmailMethod) == null) { + NakamaGrpc.getUnlinkEmailMethod = getUnlinkEmailMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkEmail")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountEmail.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkEmail")) + .build(); + } + } + } + return getUnlinkEmailMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkFacebookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkFacebook", + requestType = com.heroiclabs.nakama.api.AccountFacebook.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkFacebookMethod() { + io.grpc.MethodDescriptor getUnlinkFacebookMethod; + if ((getUnlinkFacebookMethod = NakamaGrpc.getUnlinkFacebookMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkFacebookMethod = NakamaGrpc.getUnlinkFacebookMethod) == null) { + NakamaGrpc.getUnlinkFacebookMethod = getUnlinkFacebookMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkFacebook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountFacebook.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkFacebook")) + .build(); + } + } + } + return getUnlinkFacebookMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkFacebookInstantGameMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkFacebookInstantGame", + requestType = com.heroiclabs.nakama.api.AccountFacebookInstantGame.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkFacebookInstantGameMethod() { + io.grpc.MethodDescriptor getUnlinkFacebookInstantGameMethod; + if ((getUnlinkFacebookInstantGameMethod = NakamaGrpc.getUnlinkFacebookInstantGameMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkFacebookInstantGameMethod = NakamaGrpc.getUnlinkFacebookInstantGameMethod) == null) { + NakamaGrpc.getUnlinkFacebookInstantGameMethod = getUnlinkFacebookInstantGameMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkFacebookInstantGame")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountFacebookInstantGame.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkFacebookInstantGame")) + .build(); + } + } + } + return getUnlinkFacebookInstantGameMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkGameCenterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkGameCenter", + requestType = com.heroiclabs.nakama.api.AccountGameCenter.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkGameCenterMethod() { + io.grpc.MethodDescriptor getUnlinkGameCenterMethod; + if ((getUnlinkGameCenterMethod = NakamaGrpc.getUnlinkGameCenterMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkGameCenterMethod = NakamaGrpc.getUnlinkGameCenterMethod) == null) { + NakamaGrpc.getUnlinkGameCenterMethod = getUnlinkGameCenterMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkGameCenter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountGameCenter.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkGameCenter")) + .build(); + } + } + } + return getUnlinkGameCenterMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkGoogleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkGoogle", + requestType = com.heroiclabs.nakama.api.AccountGoogle.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkGoogleMethod() { + io.grpc.MethodDescriptor getUnlinkGoogleMethod; + if ((getUnlinkGoogleMethod = NakamaGrpc.getUnlinkGoogleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkGoogleMethod = NakamaGrpc.getUnlinkGoogleMethod) == null) { + NakamaGrpc.getUnlinkGoogleMethod = getUnlinkGoogleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkGoogle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountGoogle.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkGoogle")) + .build(); + } + } + } + return getUnlinkGoogleMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnlinkSteamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlinkSteam", + requestType = com.heroiclabs.nakama.api.AccountSteam.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnlinkSteamMethod() { + io.grpc.MethodDescriptor getUnlinkSteamMethod; + if ((getUnlinkSteamMethod = NakamaGrpc.getUnlinkSteamMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUnlinkSteamMethod = NakamaGrpc.getUnlinkSteamMethod) == null) { + NakamaGrpc.getUnlinkSteamMethod = getUnlinkSteamMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlinkSteam")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.AccountSteam.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UnlinkSteam")) + .build(); + } + } + } + return getUnlinkSteamMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAccount", + requestType = com.heroiclabs.nakama.api.UpdateAccountRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateAccountMethod() { + io.grpc.MethodDescriptor getUpdateAccountMethod; + if ((getUpdateAccountMethod = NakamaGrpc.getUpdateAccountMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUpdateAccountMethod = NakamaGrpc.getUpdateAccountMethod) == null) { + NakamaGrpc.getUpdateAccountMethod = getUpdateAccountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.UpdateAccountRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UpdateAccount")) + .build(); + } + } + } + return getUpdateAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGroup", + requestType = com.heroiclabs.nakama.api.UpdateGroupRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateGroupMethod() { + io.grpc.MethodDescriptor getUpdateGroupMethod; + if ((getUpdateGroupMethod = NakamaGrpc.getUpdateGroupMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getUpdateGroupMethod = NakamaGrpc.getUpdateGroupMethod) == null) { + NakamaGrpc.getUpdateGroupMethod = getUpdateGroupMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.UpdateGroupRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("UpdateGroup")) + .build(); + } + } + } + return getUpdateGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidatePurchaseAppleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidatePurchaseApple", + requestType = com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.class, + responseType = com.heroiclabs.nakama.api.ValidatePurchaseResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidatePurchaseAppleMethod() { + io.grpc.MethodDescriptor getValidatePurchaseAppleMethod; + if ((getValidatePurchaseAppleMethod = NakamaGrpc.getValidatePurchaseAppleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getValidatePurchaseAppleMethod = NakamaGrpc.getValidatePurchaseAppleMethod) == null) { + NakamaGrpc.getValidatePurchaseAppleMethod = getValidatePurchaseAppleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidatePurchaseApple")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseResponse.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ValidatePurchaseApple")) + .build(); + } + } + } + return getValidatePurchaseAppleMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidateSubscriptionAppleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateSubscriptionApple", + requestType = com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.class, + responseType = com.heroiclabs.nakama.api.ValidateSubscriptionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidateSubscriptionAppleMethod() { + io.grpc.MethodDescriptor getValidateSubscriptionAppleMethod; + if ((getValidateSubscriptionAppleMethod = NakamaGrpc.getValidateSubscriptionAppleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getValidateSubscriptionAppleMethod = NakamaGrpc.getValidateSubscriptionAppleMethod) == null) { + NakamaGrpc.getValidateSubscriptionAppleMethod = getValidateSubscriptionAppleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateSubscriptionApple")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidateSubscriptionResponse.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ValidateSubscriptionApple")) + .build(); + } + } + } + return getValidateSubscriptionAppleMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidatePurchaseGoogleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidatePurchaseGoogle", + requestType = com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.class, + responseType = com.heroiclabs.nakama.api.ValidatePurchaseResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidatePurchaseGoogleMethod() { + io.grpc.MethodDescriptor getValidatePurchaseGoogleMethod; + if ((getValidatePurchaseGoogleMethod = NakamaGrpc.getValidatePurchaseGoogleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getValidatePurchaseGoogleMethod = NakamaGrpc.getValidatePurchaseGoogleMethod) == null) { + NakamaGrpc.getValidatePurchaseGoogleMethod = getValidatePurchaseGoogleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidatePurchaseGoogle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseResponse.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ValidatePurchaseGoogle")) + .build(); + } + } + } + return getValidatePurchaseGoogleMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidateSubscriptionGoogleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateSubscriptionGoogle", + requestType = com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.class, + responseType = com.heroiclabs.nakama.api.ValidateSubscriptionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidateSubscriptionGoogleMethod() { + io.grpc.MethodDescriptor getValidateSubscriptionGoogleMethod; + if ((getValidateSubscriptionGoogleMethod = NakamaGrpc.getValidateSubscriptionGoogleMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getValidateSubscriptionGoogleMethod = NakamaGrpc.getValidateSubscriptionGoogleMethod) == null) { + NakamaGrpc.getValidateSubscriptionGoogleMethod = getValidateSubscriptionGoogleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidateSubscriptionGoogle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidateSubscriptionResponse.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ValidateSubscriptionGoogle")) + .build(); + } + } + } + return getValidateSubscriptionGoogleMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidatePurchaseHuaweiMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidatePurchaseHuawei", + requestType = com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.class, + responseType = com.heroiclabs.nakama.api.ValidatePurchaseResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidatePurchaseHuaweiMethod() { + io.grpc.MethodDescriptor getValidatePurchaseHuaweiMethod; + if ((getValidatePurchaseHuaweiMethod = NakamaGrpc.getValidatePurchaseHuaweiMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getValidatePurchaseHuaweiMethod = NakamaGrpc.getValidatePurchaseHuaweiMethod) == null) { + NakamaGrpc.getValidatePurchaseHuaweiMethod = getValidatePurchaseHuaweiMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidatePurchaseHuawei")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseResponse.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ValidatePurchaseHuawei")) + .build(); + } + } + } + return getValidatePurchaseHuaweiMethod; + } + + private static volatile io.grpc.MethodDescriptor getValidatePurchaseFacebookInstantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidatePurchaseFacebookInstant", + requestType = com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.class, + responseType = com.heroiclabs.nakama.api.ValidatePurchaseResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getValidatePurchaseFacebookInstantMethod() { + io.grpc.MethodDescriptor getValidatePurchaseFacebookInstantMethod; + if ((getValidatePurchaseFacebookInstantMethod = NakamaGrpc.getValidatePurchaseFacebookInstantMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getValidatePurchaseFacebookInstantMethod = NakamaGrpc.getValidatePurchaseFacebookInstantMethod) == null) { + NakamaGrpc.getValidatePurchaseFacebookInstantMethod = getValidatePurchaseFacebookInstantMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ValidatePurchaseFacebookInstant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.ValidatePurchaseResponse.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("ValidatePurchaseFacebookInstant")) + .build(); + } + } + } + return getValidatePurchaseFacebookInstantMethod; + } + + private static volatile io.grpc.MethodDescriptor getWriteLeaderboardRecordMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteLeaderboardRecord", + requestType = com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.class, + responseType = com.heroiclabs.nakama.api.LeaderboardRecord.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getWriteLeaderboardRecordMethod() { + io.grpc.MethodDescriptor getWriteLeaderboardRecordMethod; + if ((getWriteLeaderboardRecordMethod = NakamaGrpc.getWriteLeaderboardRecordMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getWriteLeaderboardRecordMethod = NakamaGrpc.getWriteLeaderboardRecordMethod) == null) { + NakamaGrpc.getWriteLeaderboardRecordMethod = getWriteLeaderboardRecordMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteLeaderboardRecord")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("WriteLeaderboardRecord")) + .build(); + } + } + } + return getWriteLeaderboardRecordMethod; + } + + private static volatile io.grpc.MethodDescriptor getWriteStorageObjectsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteStorageObjects", + requestType = com.heroiclabs.nakama.api.WriteStorageObjectsRequest.class, + responseType = com.heroiclabs.nakama.api.StorageObjectAcks.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getWriteStorageObjectsMethod() { + io.grpc.MethodDescriptor getWriteStorageObjectsMethod; + if ((getWriteStorageObjectsMethod = NakamaGrpc.getWriteStorageObjectsMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getWriteStorageObjectsMethod = NakamaGrpc.getWriteStorageObjectsMethod) == null) { + NakamaGrpc.getWriteStorageObjectsMethod = getWriteStorageObjectsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteStorageObjects")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.WriteStorageObjectsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.StorageObjectAcks.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("WriteStorageObjects")) + .build(); + } + } + } + return getWriteStorageObjectsMethod; + } + + private static volatile io.grpc.MethodDescriptor getWriteTournamentRecordMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteTournamentRecord", + requestType = com.heroiclabs.nakama.api.WriteTournamentRecordRequest.class, + responseType = com.heroiclabs.nakama.api.LeaderboardRecord.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getWriteTournamentRecordMethod() { + io.grpc.MethodDescriptor getWriteTournamentRecordMethod; + if ((getWriteTournamentRecordMethod = NakamaGrpc.getWriteTournamentRecordMethod) == null) { + synchronized (NakamaGrpc.class) { + if ((getWriteTournamentRecordMethod = NakamaGrpc.getWriteTournamentRecordMethod) == null) { + NakamaGrpc.getWriteTournamentRecordMethod = getWriteTournamentRecordMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteTournamentRecord")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance())) + .setSchemaDescriptor(new NakamaMethodDescriptorSupplier("WriteTournamentRecord")) + .build(); + } + } + } + return getWriteTournamentRecordMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static NakamaStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NakamaStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NakamaStub(channel, callOptions); + } + }; + return NakamaStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NakamaBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NakamaBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NakamaBlockingStub(channel, callOptions); + } + }; + return NakamaBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static NakamaFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NakamaFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NakamaFutureStub(channel, callOptions); + } + }; + return NakamaFutureStub.newStub(factory, channel); + } + + /** + *
+   **
+   * The Nakama RPC protocol service built with GRPC.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Add friends by ID or username to a user's account.
+     * 
+ */ + default void addFriends(com.heroiclabs.nakama.api.AddFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddFriendsMethod(), responseObserver); + } + + /** + *
+     * Add users to a group.
+     * 
+ */ + default void addGroupUsers(com.heroiclabs.nakama.api.AddGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddGroupUsersMethod(), responseObserver); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + default void sessionRefresh(com.heroiclabs.nakama.api.SessionRefreshRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSessionRefreshMethod(), responseObserver); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + default void sessionLogout(com.heroiclabs.nakama.api.SessionLogoutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSessionLogoutMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with an Apple ID against the server.
+     * 
+ */ + default void authenticateApple(com.heroiclabs.nakama.api.AuthenticateAppleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateAppleMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with a custom id against the server.
+     * 
+ */ + default void authenticateCustom(com.heroiclabs.nakama.api.AuthenticateCustomRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateCustomMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with a device id against the server.
+     * 
+ */ + default void authenticateDevice(com.heroiclabs.nakama.api.AuthenticateDeviceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateDeviceMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with an email+password against the server.
+     * 
+ */ + default void authenticateEmail(com.heroiclabs.nakama.api.AuthenticateEmailRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateEmailMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with a Facebook OAuth token against the server.
+     * 
+ */ + default void authenticateFacebook(com.heroiclabs.nakama.api.AuthenticateFacebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateFacebookMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with a Facebook Instant Game token against the server.
+     * 
+ */ + default void authenticateFacebookInstantGame(com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateFacebookInstantGameMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with Apple's GameCenter against the server.
+     * 
+ */ + default void authenticateGameCenter(com.heroiclabs.nakama.api.AuthenticateGameCenterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateGameCenterMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with Google against the server.
+     * 
+ */ + default void authenticateGoogle(com.heroiclabs.nakama.api.AuthenticateGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateGoogleMethod(), responseObserver); + } + + /** + *
+     * Authenticate a user with Steam against the server.
+     * 
+ */ + default void authenticateSteam(com.heroiclabs.nakama.api.AuthenticateSteamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateSteamMethod(), responseObserver); + } + + /** + *
+     * Ban a set of users from a group.
+     * 
+ */ + default void banGroupUsers(com.heroiclabs.nakama.api.BanGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBanGroupUsersMethod(), responseObserver); + } + + /** + *
+     * Block one or more users by ID or username.
+     * 
+ */ + default void blockFriends(com.heroiclabs.nakama.api.BlockFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBlockFriendsMethod(), responseObserver); + } + + /** + *
+     * Create a new group with the current user as the owner.
+     * 
+ */ + default void createGroup(com.heroiclabs.nakama.api.CreateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateGroupMethod(), responseObserver); + } + + /** + *
+     * Delete the current user's account.
+     * 
+ */ + default void deleteAccount(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAccountMethod(), responseObserver); + } + + /** + *
+     * Delete one or more users by ID or username.
+     * 
+ */ + default void deleteFriends(com.heroiclabs.nakama.api.DeleteFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFriendsMethod(), responseObserver); + } + + /** + *
+     * Delete a group by ID.
+     * 
+ */ + default void deleteGroup(com.heroiclabs.nakama.api.DeleteGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteGroupMethod(), responseObserver); + } + + /** + *
+     * Delete a leaderboard record.
+     * 
+ */ + default void deleteLeaderboardRecord(com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteLeaderboardRecordMethod(), responseObserver); + } + + /** + *
+     * Delete one or more notifications for the current user.
+     * 
+ */ + default void deleteNotifications(com.heroiclabs.nakama.api.DeleteNotificationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNotificationsMethod(), responseObserver); + } + + /** + *
+     * Delete a tournament record.
+     * 
+ */ + default void deleteTournamentRecord(com.heroiclabs.nakama.api.DeleteTournamentRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteTournamentRecordMethod(), responseObserver); + } + + /** + *
+     * Delete one or more objects by ID or username.
+     * 
+ */ + default void deleteStorageObjects(com.heroiclabs.nakama.api.DeleteStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteStorageObjectsMethod(), responseObserver); + } + + /** + *
+     * Submit an event for processing in the server's registered runtime custom events handler.
+     * 
+ */ + default void event(com.heroiclabs.nakama.api.Event request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEventMethod(), responseObserver); + } + + /** + *
+     * Fetch the current user's account.
+     * 
+ */ + default void getAccount(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountMethod(), responseObserver); + } + + /** + *
+     * Fetch zero or more users by ID and/or username.
+     * 
+ */ + default void getUsers(com.heroiclabs.nakama.api.GetUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetUsersMethod(), responseObserver); + } + + /** + *
+     * Get subscription by product id.
+     * 
+ */ + default void getSubscription(com.heroiclabs.nakama.api.GetSubscriptionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionMethod(), responseObserver); + } + + /** + *
+     * Get matchmaker stats.
+     * 
+ */ + default void getMatchmakerStats(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMatchmakerStatsMethod(), responseObserver); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + default void healthcheck(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHealthcheckMethod(), responseObserver); + } + + /** + *
+     * Import Facebook friends and add them to a user's account.
+     * 
+ */ + default void importFacebookFriends(com.heroiclabs.nakama.api.ImportFacebookFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportFacebookFriendsMethod(), responseObserver); + } + + /** + *
+     * Import Steam friends and add them to a user's account.
+     * 
+ */ + default void importSteamFriends(com.heroiclabs.nakama.api.ImportSteamFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportSteamFriendsMethod(), responseObserver); + } + + /** + *
+     * Immediately join an open group, or request to join a closed one.
+     * 
+ */ + default void joinGroup(com.heroiclabs.nakama.api.JoinGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getJoinGroupMethod(), responseObserver); + } + + /** + *
+     * Attempt to join an open and running tournament.
+     * 
+ */ + default void joinTournament(com.heroiclabs.nakama.api.JoinTournamentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getJoinTournamentMethod(), responseObserver); + } + + /** + *
+     * Kick a set of users from a group.
+     * 
+ */ + default void kickGroupUsers(com.heroiclabs.nakama.api.KickGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getKickGroupUsersMethod(), responseObserver); + } + + /** + *
+     * Leave a group the user is a member of.
+     * 
+ */ + default void leaveGroup(com.heroiclabs.nakama.api.LeaveGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLeaveGroupMethod(), responseObserver); + } + + /** + *
+     * Add an Apple ID to the social profiles on the current user's account.
+     * 
+ */ + default void linkApple(com.heroiclabs.nakama.api.AccountApple request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkAppleMethod(), responseObserver); + } + + /** + *
+     * Add a custom ID to the social profiles on the current user's account.
+     * 
+ */ + default void linkCustom(com.heroiclabs.nakama.api.AccountCustom request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkCustomMethod(), responseObserver); + } + + /** + *
+     * Add a device ID to the social profiles on the current user's account.
+     * 
+ */ + default void linkDevice(com.heroiclabs.nakama.api.AccountDevice request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkDeviceMethod(), responseObserver); + } + + /** + *
+     * Add an email+password to the social profiles on the current user's account.
+     * 
+ */ + default void linkEmail(com.heroiclabs.nakama.api.AccountEmail request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkEmailMethod(), responseObserver); + } + + /** + *
+     * Add Facebook to the social profiles on the current user's account.
+     * 
+ */ + default void linkFacebook(com.heroiclabs.nakama.api.LinkFacebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkFacebookMethod(), responseObserver); + } + + /** + *
+     * Add Facebook Instant Game to the social profiles on the current user's account.
+     * 
+ */ + default void linkFacebookInstantGame(com.heroiclabs.nakama.api.AccountFacebookInstantGame request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkFacebookInstantGameMethod(), responseObserver); + } + + /** + *
+     * Add Apple's GameCenter to the social profiles on the current user's account.
+     * 
+ */ + default void linkGameCenter(com.heroiclabs.nakama.api.AccountGameCenter request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkGameCenterMethod(), responseObserver); + } + + /** + *
+     * Add Google to the social profiles on the current user's account.
+     * 
+ */ + default void linkGoogle(com.heroiclabs.nakama.api.AccountGoogle request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkGoogleMethod(), responseObserver); + } + + /** + *
+     * Add Steam to the social profiles on the current user's account.
+     * 
+ */ + default void linkSteam(com.heroiclabs.nakama.api.LinkSteamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLinkSteamMethod(), responseObserver); + } + + /** + *
+     * List a channel's message history.
+     * 
+ */ + default void listChannelMessages(com.heroiclabs.nakama.api.ListChannelMessagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListChannelMessagesMethod(), responseObserver); + } + + /** + *
+     * List all friends for the current user.
+     * 
+ */ + default void listFriends(com.heroiclabs.nakama.api.ListFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFriendsMethod(), responseObserver); + } + + /** + *
+     * List friends of friends for the current user.
+     * 
+ */ + default void listFriendsOfFriends(com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFriendsOfFriendsMethod(), responseObserver); + } + + /** + *
+     * List groups based on given filters.
+     * 
+ */ + default void listGroups(com.heroiclabs.nakama.api.ListGroupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListGroupsMethod(), responseObserver); + } + + /** + *
+     * List all users that are part of a group.
+     * 
+ */ + default void listGroupUsers(com.heroiclabs.nakama.api.ListGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListGroupUsersMethod(), responseObserver); + } + + /** + *
+     * List leaderboard records.
+     * 
+ */ + default void listLeaderboardRecords(com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLeaderboardRecordsMethod(), responseObserver); + } + + /** + *
+     * List leaderboard records that belong to a user.
+     * 
+ */ + default void listLeaderboardRecordsAroundOwner(com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLeaderboardRecordsAroundOwnerMethod(), responseObserver); + } + + /** + *
+     * Fetch list of running matches.
+     * 
+ */ + default void listMatches(com.heroiclabs.nakama.api.ListMatchesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMatchesMethod(), responseObserver); + } + + /** + *
+     * Fetch list of notifications.
+     * 
+ */ + default void listNotifications(com.heroiclabs.nakama.api.ListNotificationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNotificationsMethod(), responseObserver); + } + + /** + *
+     * List publicly readable storage objects in a given collection.
+     * 
+ */ + default void listStorageObjects(com.heroiclabs.nakama.api.ListStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListStorageObjectsMethod(), responseObserver); + } + + /** + *
+     * List user's subscriptions.
+     * 
+ */ + default void listSubscriptions(com.heroiclabs.nakama.api.ListSubscriptionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSubscriptionsMethod(), responseObserver); + } + + /** + *
+     * List current or upcoming tournaments.
+     * 
+ */ + default void listTournaments(com.heroiclabs.nakama.api.ListTournamentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTournamentsMethod(), responseObserver); + } + + /** + *
+     * List tournament records.
+     * 
+ */ + default void listTournamentRecords(com.heroiclabs.nakama.api.ListTournamentRecordsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTournamentRecordsMethod(), responseObserver); + } + + /** + *
+     * List tournament records for a given owner.
+     * 
+ */ + default void listTournamentRecordsAroundOwner(com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTournamentRecordsAroundOwnerMethod(), responseObserver); + } + + /** + *
+     * List groups the current user belongs to.
+     * 
+ */ + default void listUserGroups(com.heroiclabs.nakama.api.ListUserGroupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListUserGroupsMethod(), responseObserver); + } + + /** + *
+     * Promote a set of users in a group to the next role up.
+     * 
+ */ + default void promoteGroupUsers(com.heroiclabs.nakama.api.PromoteGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPromoteGroupUsersMethod(), responseObserver); + } + + /** + *
+     * Demote a set of users in a group to the next role down.
+     * 
+ */ + default void demoteGroupUsers(com.heroiclabs.nakama.api.DemoteGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDemoteGroupUsersMethod(), responseObserver); + } + + /** + *
+     * Get storage objects.
+     * 
+ */ + default void readStorageObjects(com.heroiclabs.nakama.api.ReadStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReadStorageObjectsMethod(), responseObserver); + } + + /** + *
+     * Execute a Lua function on the server.
+     * 
+ */ + default void rpcFunc(com.heroiclabs.nakama.api.Rpc request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRpcFuncMethod(), responseObserver); + } + + /** + *
+     * Remove the Apple ID from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkApple(com.heroiclabs.nakama.api.AccountApple request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkAppleMethod(), responseObserver); + } + + /** + *
+     * Remove the custom ID from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkCustom(com.heroiclabs.nakama.api.AccountCustom request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkCustomMethod(), responseObserver); + } + + /** + *
+     * Remove the device ID from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkDevice(com.heroiclabs.nakama.api.AccountDevice request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkDeviceMethod(), responseObserver); + } + + /** + *
+     * Remove the email+password from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkEmail(com.heroiclabs.nakama.api.AccountEmail request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkEmailMethod(), responseObserver); + } + + /** + *
+     * Remove Facebook from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkFacebook(com.heroiclabs.nakama.api.AccountFacebook request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkFacebookMethod(), responseObserver); + } + + /** + *
+     * Remove Facebook Instant Game profile from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkFacebookInstantGame(com.heroiclabs.nakama.api.AccountFacebookInstantGame request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkFacebookInstantGameMethod(), responseObserver); + } + + /** + *
+     * Remove Apple's GameCenter from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkGameCenter(com.heroiclabs.nakama.api.AccountGameCenter request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkGameCenterMethod(), responseObserver); + } + + /** + *
+     * Remove Google from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkGoogle(com.heroiclabs.nakama.api.AccountGoogle request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkGoogleMethod(), responseObserver); + } + + /** + *
+     * Remove Steam from the social profiles on the current user's account.
+     * 
+ */ + default void unlinkSteam(com.heroiclabs.nakama.api.AccountSteam request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnlinkSteamMethod(), responseObserver); + } + + /** + *
+     * Update fields in the current user's account.
+     * 
+ */ + default void updateAccount(com.heroiclabs.nakama.api.UpdateAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateAccountMethod(), responseObserver); + } + + /** + *
+     * Update fields in a given group.
+     * 
+ */ + default void updateGroup(com.heroiclabs.nakama.api.UpdateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateGroupMethod(), responseObserver); + } + + /** + *
+     * Validate Apple IAP Receipt
+     * 
+ */ + default void validatePurchaseApple(com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getValidatePurchaseAppleMethod(), responseObserver); + } + + /** + *
+     * Validate Apple Subscription Receipt
+     * 
+ */ + default void validateSubscriptionApple(com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getValidateSubscriptionAppleMethod(), responseObserver); + } + + /** + *
+     * Validate Google IAP Receipt
+     * 
+ */ + default void validatePurchaseGoogle(com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getValidatePurchaseGoogleMethod(), responseObserver); + } + + /** + *
+     * Validate Google Subscription Receipt
+     * 
+ */ + default void validateSubscriptionGoogle(com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getValidateSubscriptionGoogleMethod(), responseObserver); + } + + /** + *
+     * Validate Huawei IAP Receipt
+     * 
+ */ + default void validatePurchaseHuawei(com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getValidatePurchaseHuaweiMethod(), responseObserver); + } + + /** + *
+     * Validate FB Instant IAP Receipt
+     * 
+ */ + default void validatePurchaseFacebookInstant(com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getValidatePurchaseFacebookInstantMethod(), responseObserver); + } + + /** + *
+     * Write a record to a leaderboard.
+     * 
+ */ + default void writeLeaderboardRecord(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWriteLeaderboardRecordMethod(), responseObserver); + } + + /** + *
+     * Write objects into the storage engine.
+     * 
+ */ + default void writeStorageObjects(com.heroiclabs.nakama.api.WriteStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWriteStorageObjectsMethod(), responseObserver); + } + + /** + *
+     * Write a record to a tournament.
+     * 
+ */ + default void writeTournamentRecord(com.heroiclabs.nakama.api.WriteTournamentRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWriteTournamentRecordMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Nakama. + *
+   **
+   * The Nakama RPC protocol service built with GRPC.
+   * 
+ */ + public static abstract class NakamaImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return NakamaGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Nakama. + *
+   **
+   * The Nakama RPC protocol service built with GRPC.
+   * 
+ */ + public static final class NakamaStub + extends io.grpc.stub.AbstractAsyncStub { + private NakamaStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NakamaStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NakamaStub(channel, callOptions); + } + + /** + *
+     * Add friends by ID or username to a user's account.
+     * 
+ */ + public void addFriends(com.heroiclabs.nakama.api.AddFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddFriendsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add users to a group.
+     * 
+ */ + public void addGroupUsers(com.heroiclabs.nakama.api.AddGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddGroupUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + public void sessionRefresh(com.heroiclabs.nakama.api.SessionRefreshRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSessionRefreshMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + public void sessionLogout(com.heroiclabs.nakama.api.SessionLogoutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSessionLogoutMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with an Apple ID against the server.
+     * 
+ */ + public void authenticateApple(com.heroiclabs.nakama.api.AuthenticateAppleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateAppleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with a custom id against the server.
+     * 
+ */ + public void authenticateCustom(com.heroiclabs.nakama.api.AuthenticateCustomRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateCustomMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with a device id against the server.
+     * 
+ */ + public void authenticateDevice(com.heroiclabs.nakama.api.AuthenticateDeviceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with an email+password against the server.
+     * 
+ */ + public void authenticateEmail(com.heroiclabs.nakama.api.AuthenticateEmailRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateEmailMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with a Facebook OAuth token against the server.
+     * 
+ */ + public void authenticateFacebook(com.heroiclabs.nakama.api.AuthenticateFacebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateFacebookMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with a Facebook Instant Game token against the server.
+     * 
+ */ + public void authenticateFacebookInstantGame(com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateFacebookInstantGameMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with Apple's GameCenter against the server.
+     * 
+ */ + public void authenticateGameCenter(com.heroiclabs.nakama.api.AuthenticateGameCenterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateGameCenterMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with Google against the server.
+     * 
+ */ + public void authenticateGoogle(com.heroiclabs.nakama.api.AuthenticateGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateGoogleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Authenticate a user with Steam against the server.
+     * 
+ */ + public void authenticateSteam(com.heroiclabs.nakama.api.AuthenticateSteamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateSteamMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Ban a set of users from a group.
+     * 
+ */ + public void banGroupUsers(com.heroiclabs.nakama.api.BanGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBanGroupUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Block one or more users by ID or username.
+     * 
+ */ + public void blockFriends(com.heroiclabs.nakama.api.BlockFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBlockFriendsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Create a new group with the current user as the owner.
+     * 
+ */ + public void createGroup(com.heroiclabs.nakama.api.CreateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateGroupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete the current user's account.
+     * 
+ */ + public void deleteAccount(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAccountMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete one or more users by ID or username.
+     * 
+ */ + public void deleteFriends(com.heroiclabs.nakama.api.DeleteFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFriendsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete a group by ID.
+     * 
+ */ + public void deleteGroup(com.heroiclabs.nakama.api.DeleteGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteGroupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete a leaderboard record.
+     * 
+ */ + public void deleteLeaderboardRecord(com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteLeaderboardRecordMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete one or more notifications for the current user.
+     * 
+ */ + public void deleteNotifications(com.heroiclabs.nakama.api.DeleteNotificationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNotificationsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete a tournament record.
+     * 
+ */ + public void deleteTournamentRecord(com.heroiclabs.nakama.api.DeleteTournamentRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteTournamentRecordMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete one or more objects by ID or username.
+     * 
+ */ + public void deleteStorageObjects(com.heroiclabs.nakama.api.DeleteStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteStorageObjectsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Submit an event for processing in the server's registered runtime custom events handler.
+     * 
+ */ + public void event(com.heroiclabs.nakama.api.Event request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getEventMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Fetch the current user's account.
+     * 
+ */ + public void getAccount(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Fetch zero or more users by ID and/or username.
+     * 
+ */ + public void getUsers(com.heroiclabs.nakama.api.GetUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Get subscription by product id.
+     * 
+ */ + public void getSubscription(com.heroiclabs.nakama.api.GetSubscriptionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSubscriptionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Get matchmaker stats.
+     * 
+ */ + public void getMatchmakerStats(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMatchmakerStatsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + public void healthcheck(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getHealthcheckMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Import Facebook friends and add them to a user's account.
+     * 
+ */ + public void importFacebookFriends(com.heroiclabs.nakama.api.ImportFacebookFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportFacebookFriendsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Import Steam friends and add them to a user's account.
+     * 
+ */ + public void importSteamFriends(com.heroiclabs.nakama.api.ImportSteamFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportSteamFriendsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Immediately join an open group, or request to join a closed one.
+     * 
+ */ + public void joinGroup(com.heroiclabs.nakama.api.JoinGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getJoinGroupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Attempt to join an open and running tournament.
+     * 
+ */ + public void joinTournament(com.heroiclabs.nakama.api.JoinTournamentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getJoinTournamentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Kick a set of users from a group.
+     * 
+ */ + public void kickGroupUsers(com.heroiclabs.nakama.api.KickGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getKickGroupUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Leave a group the user is a member of.
+     * 
+ */ + public void leaveGroup(com.heroiclabs.nakama.api.LeaveGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLeaveGroupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add an Apple ID to the social profiles on the current user's account.
+     * 
+ */ + public void linkApple(com.heroiclabs.nakama.api.AccountApple request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkAppleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add a custom ID to the social profiles on the current user's account.
+     * 
+ */ + public void linkCustom(com.heroiclabs.nakama.api.AccountCustom request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkCustomMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add a device ID to the social profiles on the current user's account.
+     * 
+ */ + public void linkDevice(com.heroiclabs.nakama.api.AccountDevice request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add an email+password to the social profiles on the current user's account.
+     * 
+ */ + public void linkEmail(com.heroiclabs.nakama.api.AccountEmail request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkEmailMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add Facebook to the social profiles on the current user's account.
+     * 
+ */ + public void linkFacebook(com.heroiclabs.nakama.api.LinkFacebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkFacebookMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add Facebook Instant Game to the social profiles on the current user's account.
+     * 
+ */ + public void linkFacebookInstantGame(com.heroiclabs.nakama.api.AccountFacebookInstantGame request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkFacebookInstantGameMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add Apple's GameCenter to the social profiles on the current user's account.
+     * 
+ */ + public void linkGameCenter(com.heroiclabs.nakama.api.AccountGameCenter request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkGameCenterMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add Google to the social profiles on the current user's account.
+     * 
+ */ + public void linkGoogle(com.heroiclabs.nakama.api.AccountGoogle request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkGoogleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Add Steam to the social profiles on the current user's account.
+     * 
+ */ + public void linkSteam(com.heroiclabs.nakama.api.LinkSteamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLinkSteamMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List a channel's message history.
+     * 
+ */ + public void listChannelMessages(com.heroiclabs.nakama.api.ListChannelMessagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListChannelMessagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List all friends for the current user.
+     * 
+ */ + public void listFriends(com.heroiclabs.nakama.api.ListFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFriendsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List friends of friends for the current user.
+     * 
+ */ + public void listFriendsOfFriends(com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFriendsOfFriendsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List groups based on given filters.
+     * 
+ */ + public void listGroups(com.heroiclabs.nakama.api.ListGroupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List all users that are part of a group.
+     * 
+ */ + public void listGroupUsers(com.heroiclabs.nakama.api.ListGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListGroupUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List leaderboard records.
+     * 
+ */ + public void listLeaderboardRecords(com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLeaderboardRecordsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List leaderboard records that belong to a user.
+     * 
+ */ + public void listLeaderboardRecordsAroundOwner(com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLeaderboardRecordsAroundOwnerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Fetch list of running matches.
+     * 
+ */ + public void listMatches(com.heroiclabs.nakama.api.ListMatchesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMatchesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Fetch list of notifications.
+     * 
+ */ + public void listNotifications(com.heroiclabs.nakama.api.ListNotificationsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotificationsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List publicly readable storage objects in a given collection.
+     * 
+ */ + public void listStorageObjects(com.heroiclabs.nakama.api.ListStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListStorageObjectsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List user's subscriptions.
+     * 
+ */ + public void listSubscriptions(com.heroiclabs.nakama.api.ListSubscriptionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSubscriptionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List current or upcoming tournaments.
+     * 
+ */ + public void listTournaments(com.heroiclabs.nakama.api.ListTournamentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTournamentsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List tournament records.
+     * 
+ */ + public void listTournamentRecords(com.heroiclabs.nakama.api.ListTournamentRecordsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTournamentRecordsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List tournament records for a given owner.
+     * 
+ */ + public void listTournamentRecordsAroundOwner(com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTournamentRecordsAroundOwnerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List groups the current user belongs to.
+     * 
+ */ + public void listUserGroups(com.heroiclabs.nakama.api.ListUserGroupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListUserGroupsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Promote a set of users in a group to the next role up.
+     * 
+ */ + public void promoteGroupUsers(com.heroiclabs.nakama.api.PromoteGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPromoteGroupUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Demote a set of users in a group to the next role down.
+     * 
+ */ + public void demoteGroupUsers(com.heroiclabs.nakama.api.DemoteGroupUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDemoteGroupUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Get storage objects.
+     * 
+ */ + public void readStorageObjects(com.heroiclabs.nakama.api.ReadStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReadStorageObjectsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Execute a Lua function on the server.
+     * 
+ */ + public void rpcFunc(com.heroiclabs.nakama.api.Rpc request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRpcFuncMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove the Apple ID from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkApple(com.heroiclabs.nakama.api.AccountApple request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkAppleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove the custom ID from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkCustom(com.heroiclabs.nakama.api.AccountCustom request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkCustomMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove the device ID from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkDevice(com.heroiclabs.nakama.api.AccountDevice request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove the email+password from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkEmail(com.heroiclabs.nakama.api.AccountEmail request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkEmailMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove Facebook from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkFacebook(com.heroiclabs.nakama.api.AccountFacebook request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkFacebookMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove Facebook Instant Game profile from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkFacebookInstantGame(com.heroiclabs.nakama.api.AccountFacebookInstantGame request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkFacebookInstantGameMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove Apple's GameCenter from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkGameCenter(com.heroiclabs.nakama.api.AccountGameCenter request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkGameCenterMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove Google from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkGoogle(com.heroiclabs.nakama.api.AccountGoogle request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkGoogleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Remove Steam from the social profiles on the current user's account.
+     * 
+ */ + public void unlinkSteam(com.heroiclabs.nakama.api.AccountSteam request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlinkSteamMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Update fields in the current user's account.
+     * 
+ */ + public void updateAccount(com.heroiclabs.nakama.api.UpdateAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAccountMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Update fields in a given group.
+     * 
+ */ + public void updateGroup(com.heroiclabs.nakama.api.UpdateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGroupMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Validate Apple IAP Receipt
+     * 
+ */ + public void validatePurchaseApple(com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidatePurchaseAppleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Validate Apple Subscription Receipt
+     * 
+ */ + public void validateSubscriptionApple(com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidateSubscriptionAppleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Validate Google IAP Receipt
+     * 
+ */ + public void validatePurchaseGoogle(com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidatePurchaseGoogleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Validate Google Subscription Receipt
+     * 
+ */ + public void validateSubscriptionGoogle(com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidateSubscriptionGoogleMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Validate Huawei IAP Receipt
+     * 
+ */ + public void validatePurchaseHuawei(com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidatePurchaseHuaweiMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Validate FB Instant IAP Receipt
+     * 
+ */ + public void validatePurchaseFacebookInstant(com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidatePurchaseFacebookInstantMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Write a record to a leaderboard.
+     * 
+ */ + public void writeLeaderboardRecord(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getWriteLeaderboardRecordMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Write objects into the storage engine.
+     * 
+ */ + public void writeStorageObjects(com.heroiclabs.nakama.api.WriteStorageObjectsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getWriteStorageObjectsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Write a record to a tournament.
+     * 
+ */ + public void writeTournamentRecord(com.heroiclabs.nakama.api.WriteTournamentRecordRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getWriteTournamentRecordMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Nakama. + *
+   **
+   * The Nakama RPC protocol service built with GRPC.
+   * 
+ */ + public static final class NakamaBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private NakamaBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NakamaBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NakamaBlockingStub(channel, callOptions); + } + + /** + *
+     * Add friends by ID or username to a user's account.
+     * 
+ */ + public com.google.protobuf.Empty addFriends(com.heroiclabs.nakama.api.AddFriendsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddFriendsMethod(), getCallOptions(), request); + } + + /** + *
+     * Add users to a group.
+     * 
+ */ + public com.google.protobuf.Empty addGroupUsers(com.heroiclabs.nakama.api.AddGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddGroupUsersMethod(), getCallOptions(), request); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session sessionRefresh(com.heroiclabs.nakama.api.SessionRefreshRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSessionRefreshMethod(), getCallOptions(), request); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + public com.google.protobuf.Empty sessionLogout(com.heroiclabs.nakama.api.SessionLogoutRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSessionLogoutMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with an Apple ID against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateApple(com.heroiclabs.nakama.api.AuthenticateAppleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateAppleMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with a custom id against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateCustom(com.heroiclabs.nakama.api.AuthenticateCustomRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateCustomMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with a device id against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateDevice(com.heroiclabs.nakama.api.AuthenticateDeviceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateDeviceMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with an email+password against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateEmail(com.heroiclabs.nakama.api.AuthenticateEmailRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateEmailMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with a Facebook OAuth token against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateFacebook(com.heroiclabs.nakama.api.AuthenticateFacebookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateFacebookMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with a Facebook Instant Game token against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateFacebookInstantGame(com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateFacebookInstantGameMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with Apple's GameCenter against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateGameCenter(com.heroiclabs.nakama.api.AuthenticateGameCenterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateGameCenterMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with Google against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateGoogle(com.heroiclabs.nakama.api.AuthenticateGoogleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateGoogleMethod(), getCallOptions(), request); + } + + /** + *
+     * Authenticate a user with Steam against the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Session authenticateSteam(com.heroiclabs.nakama.api.AuthenticateSteamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateSteamMethod(), getCallOptions(), request); + } + + /** + *
+     * Ban a set of users from a group.
+     * 
+ */ + public com.google.protobuf.Empty banGroupUsers(com.heroiclabs.nakama.api.BanGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBanGroupUsersMethod(), getCallOptions(), request); + } + + /** + *
+     * Block one or more users by ID or username.
+     * 
+ */ + public com.google.protobuf.Empty blockFriends(com.heroiclabs.nakama.api.BlockFriendsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBlockFriendsMethod(), getCallOptions(), request); + } + + /** + *
+     * Create a new group with the current user as the owner.
+     * 
+ */ + public com.heroiclabs.nakama.api.Group createGroup(com.heroiclabs.nakama.api.CreateGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateGroupMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty deleteAccount(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAccountMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete one or more users by ID or username.
+     * 
+ */ + public com.google.protobuf.Empty deleteFriends(com.heroiclabs.nakama.api.DeleteFriendsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFriendsMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete a group by ID.
+     * 
+ */ + public com.google.protobuf.Empty deleteGroup(com.heroiclabs.nakama.api.DeleteGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteGroupMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete a leaderboard record.
+     * 
+ */ + public com.google.protobuf.Empty deleteLeaderboardRecord(com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteLeaderboardRecordMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete one or more notifications for the current user.
+     * 
+ */ + public com.google.protobuf.Empty deleteNotifications(com.heroiclabs.nakama.api.DeleteNotificationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNotificationsMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete a tournament record.
+     * 
+ */ + public com.google.protobuf.Empty deleteTournamentRecord(com.heroiclabs.nakama.api.DeleteTournamentRecordRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteTournamentRecordMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete one or more objects by ID or username.
+     * 
+ */ + public com.google.protobuf.Empty deleteStorageObjects(com.heroiclabs.nakama.api.DeleteStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteStorageObjectsMethod(), getCallOptions(), request); + } + + /** + *
+     * Submit an event for processing in the server's registered runtime custom events handler.
+     * 
+ */ + public com.google.protobuf.Empty event(com.heroiclabs.nakama.api.Event request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEventMethod(), getCallOptions(), request); + } + + /** + *
+     * Fetch the current user's account.
+     * 
+ */ + public com.heroiclabs.nakama.api.Account getAccount(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAccountMethod(), getCallOptions(), request); + } + + /** + *
+     * Fetch zero or more users by ID and/or username.
+     * 
+ */ + public com.heroiclabs.nakama.api.Users getUsers(com.heroiclabs.nakama.api.GetUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetUsersMethod(), getCallOptions(), request); + } + + /** + *
+     * Get subscription by product id.
+     * 
+ */ + public com.heroiclabs.nakama.api.ValidatedSubscription getSubscription(com.heroiclabs.nakama.api.GetSubscriptionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSubscriptionMethod(), getCallOptions(), request); + } + + /** + *
+     * Get matchmaker stats.
+     * 
+ */ + public com.heroiclabs.nakama.api.MatchmakerStats getMatchmakerStats(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMatchmakerStatsMethod(), getCallOptions(), request); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + public com.google.protobuf.Empty healthcheck(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getHealthcheckMethod(), getCallOptions(), request); + } + + /** + *
+     * Import Facebook friends and add them to a user's account.
+     * 
+ */ + public com.google.protobuf.Empty importFacebookFriends(com.heroiclabs.nakama.api.ImportFacebookFriendsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportFacebookFriendsMethod(), getCallOptions(), request); + } + + /** + *
+     * Import Steam friends and add them to a user's account.
+     * 
+ */ + public com.google.protobuf.Empty importSteamFriends(com.heroiclabs.nakama.api.ImportSteamFriendsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportSteamFriendsMethod(), getCallOptions(), request); + } + + /** + *
+     * Immediately join an open group, or request to join a closed one.
+     * 
+ */ + public com.google.protobuf.Empty joinGroup(com.heroiclabs.nakama.api.JoinGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getJoinGroupMethod(), getCallOptions(), request); + } + + /** + *
+     * Attempt to join an open and running tournament.
+     * 
+ */ + public com.google.protobuf.Empty joinTournament(com.heroiclabs.nakama.api.JoinTournamentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getJoinTournamentMethod(), getCallOptions(), request); + } + + /** + *
+     * Kick a set of users from a group.
+     * 
+ */ + public com.google.protobuf.Empty kickGroupUsers(com.heroiclabs.nakama.api.KickGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getKickGroupUsersMethod(), getCallOptions(), request); + } + + /** + *
+     * Leave a group the user is a member of.
+     * 
+ */ + public com.google.protobuf.Empty leaveGroup(com.heroiclabs.nakama.api.LeaveGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLeaveGroupMethod(), getCallOptions(), request); + } + + /** + *
+     * Add an Apple ID to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkApple(com.heroiclabs.nakama.api.AccountApple request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkAppleMethod(), getCallOptions(), request); + } + + /** + *
+     * Add a custom ID to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkCustom(com.heroiclabs.nakama.api.AccountCustom request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkCustomMethod(), getCallOptions(), request); + } + + /** + *
+     * Add a device ID to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkDevice(com.heroiclabs.nakama.api.AccountDevice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkDeviceMethod(), getCallOptions(), request); + } + + /** + *
+     * Add an email+password to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkEmail(com.heroiclabs.nakama.api.AccountEmail request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkEmailMethod(), getCallOptions(), request); + } + + /** + *
+     * Add Facebook to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkFacebook(com.heroiclabs.nakama.api.LinkFacebookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkFacebookMethod(), getCallOptions(), request); + } + + /** + *
+     * Add Facebook Instant Game to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkFacebookInstantGame(com.heroiclabs.nakama.api.AccountFacebookInstantGame request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkFacebookInstantGameMethod(), getCallOptions(), request); + } + + /** + *
+     * Add Apple's GameCenter to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkGameCenter(com.heroiclabs.nakama.api.AccountGameCenter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkGameCenterMethod(), getCallOptions(), request); + } + + /** + *
+     * Add Google to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkGoogle(com.heroiclabs.nakama.api.AccountGoogle request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkGoogleMethod(), getCallOptions(), request); + } + + /** + *
+     * Add Steam to the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty linkSteam(com.heroiclabs.nakama.api.LinkSteamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLinkSteamMethod(), getCallOptions(), request); + } + + /** + *
+     * List a channel's message history.
+     * 
+ */ + public com.heroiclabs.nakama.api.ChannelMessageList listChannelMessages(com.heroiclabs.nakama.api.ListChannelMessagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListChannelMessagesMethod(), getCallOptions(), request); + } + + /** + *
+     * List all friends for the current user.
+     * 
+ */ + public com.heroiclabs.nakama.api.FriendList listFriends(com.heroiclabs.nakama.api.ListFriendsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFriendsMethod(), getCallOptions(), request); + } + + /** + *
+     * List friends of friends for the current user.
+     * 
+ */ + public com.heroiclabs.nakama.api.FriendsOfFriendsList listFriendsOfFriends(com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFriendsOfFriendsMethod(), getCallOptions(), request); + } + + /** + *
+     * List groups based on given filters.
+     * 
+ */ + public com.heroiclabs.nakama.api.GroupList listGroups(com.heroiclabs.nakama.api.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGroupsMethod(), getCallOptions(), request); + } + + /** + *
+     * List all users that are part of a group.
+     * 
+ */ + public com.heroiclabs.nakama.api.GroupUserList listGroupUsers(com.heroiclabs.nakama.api.ListGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGroupUsersMethod(), getCallOptions(), request); + } + + /** + *
+     * List leaderboard records.
+     * 
+ */ + public com.heroiclabs.nakama.api.LeaderboardRecordList listLeaderboardRecords(com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLeaderboardRecordsMethod(), getCallOptions(), request); + } + + /** + *
+     * List leaderboard records that belong to a user.
+     * 
+ */ + public com.heroiclabs.nakama.api.LeaderboardRecordList listLeaderboardRecordsAroundOwner(com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLeaderboardRecordsAroundOwnerMethod(), getCallOptions(), request); + } + + /** + *
+     * Fetch list of running matches.
+     * 
+ */ + public com.heroiclabs.nakama.api.MatchList listMatches(com.heroiclabs.nakama.api.ListMatchesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMatchesMethod(), getCallOptions(), request); + } + + /** + *
+     * Fetch list of notifications.
+     * 
+ */ + public com.heroiclabs.nakama.api.NotificationList listNotifications(com.heroiclabs.nakama.api.ListNotificationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotificationsMethod(), getCallOptions(), request); + } + + /** + *
+     * List publicly readable storage objects in a given collection.
+     * 
+ */ + public com.heroiclabs.nakama.api.StorageObjectList listStorageObjects(com.heroiclabs.nakama.api.ListStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListStorageObjectsMethod(), getCallOptions(), request); + } + + /** + *
+     * List user's subscriptions.
+     * 
+ */ + public com.heroiclabs.nakama.api.SubscriptionList listSubscriptions(com.heroiclabs.nakama.api.ListSubscriptionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSubscriptionsMethod(), getCallOptions(), request); + } + + /** + *
+     * List current or upcoming tournaments.
+     * 
+ */ + public com.heroiclabs.nakama.api.TournamentList listTournaments(com.heroiclabs.nakama.api.ListTournamentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTournamentsMethod(), getCallOptions(), request); + } + + /** + *
+     * List tournament records.
+     * 
+ */ + public com.heroiclabs.nakama.api.TournamentRecordList listTournamentRecords(com.heroiclabs.nakama.api.ListTournamentRecordsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTournamentRecordsMethod(), getCallOptions(), request); + } + + /** + *
+     * List tournament records for a given owner.
+     * 
+ */ + public com.heroiclabs.nakama.api.TournamentRecordList listTournamentRecordsAroundOwner(com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTournamentRecordsAroundOwnerMethod(), getCallOptions(), request); + } + + /** + *
+     * List groups the current user belongs to.
+     * 
+ */ + public com.heroiclabs.nakama.api.UserGroupList listUserGroups(com.heroiclabs.nakama.api.ListUserGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUserGroupsMethod(), getCallOptions(), request); + } + + /** + *
+     * Promote a set of users in a group to the next role up.
+     * 
+ */ + public com.google.protobuf.Empty promoteGroupUsers(com.heroiclabs.nakama.api.PromoteGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPromoteGroupUsersMethod(), getCallOptions(), request); + } + + /** + *
+     * Demote a set of users in a group to the next role down.
+     * 
+ */ + public com.google.protobuf.Empty demoteGroupUsers(com.heroiclabs.nakama.api.DemoteGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDemoteGroupUsersMethod(), getCallOptions(), request); + } + + /** + *
+     * Get storage objects.
+     * 
+ */ + public com.heroiclabs.nakama.api.StorageObjects readStorageObjects(com.heroiclabs.nakama.api.ReadStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReadStorageObjectsMethod(), getCallOptions(), request); + } + + /** + *
+     * Execute a Lua function on the server.
+     * 
+ */ + public com.heroiclabs.nakama.api.Rpc rpcFunc(com.heroiclabs.nakama.api.Rpc request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRpcFuncMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove the Apple ID from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkApple(com.heroiclabs.nakama.api.AccountApple request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkAppleMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove the custom ID from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkCustom(com.heroiclabs.nakama.api.AccountCustom request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkCustomMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove the device ID from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkDevice(com.heroiclabs.nakama.api.AccountDevice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkDeviceMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove the email+password from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkEmail(com.heroiclabs.nakama.api.AccountEmail request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkEmailMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove Facebook from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkFacebook(com.heroiclabs.nakama.api.AccountFacebook request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkFacebookMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove Facebook Instant Game profile from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkFacebookInstantGame(com.heroiclabs.nakama.api.AccountFacebookInstantGame request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkFacebookInstantGameMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove Apple's GameCenter from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkGameCenter(com.heroiclabs.nakama.api.AccountGameCenter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkGameCenterMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove Google from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkGoogle(com.heroiclabs.nakama.api.AccountGoogle request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkGoogleMethod(), getCallOptions(), request); + } + + /** + *
+     * Remove Steam from the social profiles on the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty unlinkSteam(com.heroiclabs.nakama.api.AccountSteam request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlinkSteamMethod(), getCallOptions(), request); + } + + /** + *
+     * Update fields in the current user's account.
+     * 
+ */ + public com.google.protobuf.Empty updateAccount(com.heroiclabs.nakama.api.UpdateAccountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAccountMethod(), getCallOptions(), request); + } + + /** + *
+     * Update fields in a given group.
+     * 
+ */ + public com.google.protobuf.Empty updateGroup(com.heroiclabs.nakama.api.UpdateGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGroupMethod(), getCallOptions(), request); + } + + /** + *
+     * Validate Apple IAP Receipt
+     * 
+ */ + public com.heroiclabs.nakama.api.ValidatePurchaseResponse validatePurchaseApple(com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidatePurchaseAppleMethod(), getCallOptions(), request); + } + + /** + *
+     * Validate Apple Subscription Receipt
+     * 
+ */ + public com.heroiclabs.nakama.api.ValidateSubscriptionResponse validateSubscriptionApple(com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidateSubscriptionAppleMethod(), getCallOptions(), request); + } + + /** + *
+     * Validate Google IAP Receipt
+     * 
+ */ + public com.heroiclabs.nakama.api.ValidatePurchaseResponse validatePurchaseGoogle(com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidatePurchaseGoogleMethod(), getCallOptions(), request); + } + + /** + *
+     * Validate Google Subscription Receipt
+     * 
+ */ + public com.heroiclabs.nakama.api.ValidateSubscriptionResponse validateSubscriptionGoogle(com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidateSubscriptionGoogleMethod(), getCallOptions(), request); + } + + /** + *
+     * Validate Huawei IAP Receipt
+     * 
+ */ + public com.heroiclabs.nakama.api.ValidatePurchaseResponse validatePurchaseHuawei(com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidatePurchaseHuaweiMethod(), getCallOptions(), request); + } + + /** + *
+     * Validate FB Instant IAP Receipt
+     * 
+ */ + public com.heroiclabs.nakama.api.ValidatePurchaseResponse validatePurchaseFacebookInstant(com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidatePurchaseFacebookInstantMethod(), getCallOptions(), request); + } + + /** + *
+     * Write a record to a leaderboard.
+     * 
+ */ + public com.heroiclabs.nakama.api.LeaderboardRecord writeLeaderboardRecord(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getWriteLeaderboardRecordMethod(), getCallOptions(), request); + } + + /** + *
+     * Write objects into the storage engine.
+     * 
+ */ + public com.heroiclabs.nakama.api.StorageObjectAcks writeStorageObjects(com.heroiclabs.nakama.api.WriteStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getWriteStorageObjectsMethod(), getCallOptions(), request); + } + + /** + *
+     * Write a record to a tournament.
+     * 
+ */ + public com.heroiclabs.nakama.api.LeaderboardRecord writeTournamentRecord(com.heroiclabs.nakama.api.WriteTournamentRecordRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getWriteTournamentRecordMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Nakama. + *
+   **
+   * The Nakama RPC protocol service built with GRPC.
+   * 
+ */ + public static final class NakamaFutureStub + extends io.grpc.stub.AbstractFutureStub { + private NakamaFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NakamaFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NakamaFutureStub(channel, callOptions); + } + + /** + *
+     * Add friends by ID or username to a user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture addFriends( + com.heroiclabs.nakama.api.AddFriendsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddFriendsMethod(), getCallOptions()), request); + } + + /** + *
+     * Add users to a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture addGroupUsers( + com.heroiclabs.nakama.api.AddGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddGroupUsersMethod(), getCallOptions()), request); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture sessionRefresh( + com.heroiclabs.nakama.api.SessionRefreshRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSessionRefreshMethod(), getCallOptions()), request); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture sessionLogout( + com.heroiclabs.nakama.api.SessionLogoutRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSessionLogoutMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with an Apple ID against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateApple( + com.heroiclabs.nakama.api.AuthenticateAppleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateAppleMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with a custom id against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateCustom( + com.heroiclabs.nakama.api.AuthenticateCustomRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateCustomMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with a device id against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateDevice( + com.heroiclabs.nakama.api.AuthenticateDeviceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateDeviceMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with an email+password against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateEmail( + com.heroiclabs.nakama.api.AuthenticateEmailRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateEmailMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with a Facebook OAuth token against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateFacebook( + com.heroiclabs.nakama.api.AuthenticateFacebookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateFacebookMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with a Facebook Instant Game token against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateFacebookInstantGame( + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateFacebookInstantGameMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with Apple's GameCenter against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateGameCenter( + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateGameCenterMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with Google against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateGoogle( + com.heroiclabs.nakama.api.AuthenticateGoogleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateGoogleMethod(), getCallOptions()), request); + } + + /** + *
+     * Authenticate a user with Steam against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateSteam( + com.heroiclabs.nakama.api.AuthenticateSteamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateSteamMethod(), getCallOptions()), request); + } + + /** + *
+     * Ban a set of users from a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture banGroupUsers( + com.heroiclabs.nakama.api.BanGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBanGroupUsersMethod(), getCallOptions()), request); + } + + /** + *
+     * Block one or more users by ID or username.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture blockFriends( + com.heroiclabs.nakama.api.BlockFriendsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBlockFriendsMethod(), getCallOptions()), request); + } + + /** + *
+     * Create a new group with the current user as the owner.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createGroup( + com.heroiclabs.nakama.api.CreateGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateGroupMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteAccount( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAccountMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete one or more users by ID or username.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteFriends( + com.heroiclabs.nakama.api.DeleteFriendsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFriendsMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete a group by ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteGroup( + com.heroiclabs.nakama.api.DeleteGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteGroupMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete a leaderboard record.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteLeaderboardRecord( + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteLeaderboardRecordMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete one or more notifications for the current user.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteNotifications( + com.heroiclabs.nakama.api.DeleteNotificationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNotificationsMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete a tournament record.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteTournamentRecord( + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteTournamentRecordMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete one or more objects by ID or username.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteStorageObjects( + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteStorageObjectsMethod(), getCallOptions()), request); + } + + /** + *
+     * Submit an event for processing in the server's registered runtime custom events handler.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture event( + com.heroiclabs.nakama.api.Event request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getEventMethod(), getCallOptions()), request); + } + + /** + *
+     * Fetch the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAccount( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request); + } + + /** + *
+     * Fetch zero or more users by ID and/or username.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getUsers( + com.heroiclabs.nakama.api.GetUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetUsersMethod(), getCallOptions()), request); + } + + /** + *
+     * Get subscription by product id.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getSubscription( + com.heroiclabs.nakama.api.GetSubscriptionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSubscriptionMethod(), getCallOptions()), request); + } + + /** + *
+     * Get matchmaker stats.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getMatchmakerStats( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMatchmakerStatsMethod(), getCallOptions()), request); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture healthcheck( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getHealthcheckMethod(), getCallOptions()), request); + } + + /** + *
+     * Import Facebook friends and add them to a user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture importFacebookFriends( + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportFacebookFriendsMethod(), getCallOptions()), request); + } + + /** + *
+     * Import Steam friends and add them to a user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture importSteamFriends( + com.heroiclabs.nakama.api.ImportSteamFriendsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportSteamFriendsMethod(), getCallOptions()), request); + } + + /** + *
+     * Immediately join an open group, or request to join a closed one.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture joinGroup( + com.heroiclabs.nakama.api.JoinGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getJoinGroupMethod(), getCallOptions()), request); + } + + /** + *
+     * Attempt to join an open and running tournament.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture joinTournament( + com.heroiclabs.nakama.api.JoinTournamentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getJoinTournamentMethod(), getCallOptions()), request); + } + + /** + *
+     * Kick a set of users from a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture kickGroupUsers( + com.heroiclabs.nakama.api.KickGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getKickGroupUsersMethod(), getCallOptions()), request); + } + + /** + *
+     * Leave a group the user is a member of.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture leaveGroup( + com.heroiclabs.nakama.api.LeaveGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLeaveGroupMethod(), getCallOptions()), request); + } + + /** + *
+     * Add an Apple ID to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkApple( + com.heroiclabs.nakama.api.AccountApple request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkAppleMethod(), getCallOptions()), request); + } + + /** + *
+     * Add a custom ID to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkCustom( + com.heroiclabs.nakama.api.AccountCustom request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkCustomMethod(), getCallOptions()), request); + } + + /** + *
+     * Add a device ID to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkDevice( + com.heroiclabs.nakama.api.AccountDevice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkDeviceMethod(), getCallOptions()), request); + } + + /** + *
+     * Add an email+password to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkEmail( + com.heroiclabs.nakama.api.AccountEmail request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkEmailMethod(), getCallOptions()), request); + } + + /** + *
+     * Add Facebook to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkFacebook( + com.heroiclabs.nakama.api.LinkFacebookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkFacebookMethod(), getCallOptions()), request); + } + + /** + *
+     * Add Facebook Instant Game to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkFacebookInstantGame( + com.heroiclabs.nakama.api.AccountFacebookInstantGame request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkFacebookInstantGameMethod(), getCallOptions()), request); + } + + /** + *
+     * Add Apple's GameCenter to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkGameCenter( + com.heroiclabs.nakama.api.AccountGameCenter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkGameCenterMethod(), getCallOptions()), request); + } + + /** + *
+     * Add Google to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkGoogle( + com.heroiclabs.nakama.api.AccountGoogle request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkGoogleMethod(), getCallOptions()), request); + } + + /** + *
+     * Add Steam to the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture linkSteam( + com.heroiclabs.nakama.api.LinkSteamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLinkSteamMethod(), getCallOptions()), request); + } + + /** + *
+     * List a channel's message history.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listChannelMessages( + com.heroiclabs.nakama.api.ListChannelMessagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListChannelMessagesMethod(), getCallOptions()), request); + } + + /** + *
+     * List all friends for the current user.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listFriends( + com.heroiclabs.nakama.api.ListFriendsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFriendsMethod(), getCallOptions()), request); + } + + /** + *
+     * List friends of friends for the current user.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listFriendsOfFriends( + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListFriendsOfFriendsMethod(), getCallOptions()), request); + } + + /** + *
+     * List groups based on given filters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listGroups( + com.heroiclabs.nakama.api.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request); + } + + /** + *
+     * List all users that are part of a group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listGroupUsers( + com.heroiclabs.nakama.api.ListGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGroupUsersMethod(), getCallOptions()), request); + } + + /** + *
+     * List leaderboard records.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listLeaderboardRecords( + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLeaderboardRecordsMethod(), getCallOptions()), request); + } + + /** + *
+     * List leaderboard records that belong to a user.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listLeaderboardRecordsAroundOwner( + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLeaderboardRecordsAroundOwnerMethod(), getCallOptions()), request); + } + + /** + *
+     * Fetch list of running matches.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listMatches( + com.heroiclabs.nakama.api.ListMatchesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMatchesMethod(), getCallOptions()), request); + } + + /** + *
+     * Fetch list of notifications.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listNotifications( + com.heroiclabs.nakama.api.ListNotificationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotificationsMethod(), getCallOptions()), request); + } + + /** + *
+     * List publicly readable storage objects in a given collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listStorageObjects( + com.heroiclabs.nakama.api.ListStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListStorageObjectsMethod(), getCallOptions()), request); + } + + /** + *
+     * List user's subscriptions.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listSubscriptions( + com.heroiclabs.nakama.api.ListSubscriptionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSubscriptionsMethod(), getCallOptions()), request); + } + + /** + *
+     * List current or upcoming tournaments.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listTournaments( + com.heroiclabs.nakama.api.ListTournamentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTournamentsMethod(), getCallOptions()), request); + } + + /** + *
+     * List tournament records.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listTournamentRecords( + com.heroiclabs.nakama.api.ListTournamentRecordsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTournamentRecordsMethod(), getCallOptions()), request); + } + + /** + *
+     * List tournament records for a given owner.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listTournamentRecordsAroundOwner( + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTournamentRecordsAroundOwnerMethod(), getCallOptions()), request); + } + + /** + *
+     * List groups the current user belongs to.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listUserGroups( + com.heroiclabs.nakama.api.ListUserGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListUserGroupsMethod(), getCallOptions()), request); + } + + /** + *
+     * Promote a set of users in a group to the next role up.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture promoteGroupUsers( + com.heroiclabs.nakama.api.PromoteGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPromoteGroupUsersMethod(), getCallOptions()), request); + } + + /** + *
+     * Demote a set of users in a group to the next role down.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture demoteGroupUsers( + com.heroiclabs.nakama.api.DemoteGroupUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDemoteGroupUsersMethod(), getCallOptions()), request); + } + + /** + *
+     * Get storage objects.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture readStorageObjects( + com.heroiclabs.nakama.api.ReadStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReadStorageObjectsMethod(), getCallOptions()), request); + } + + /** + *
+     * Execute a Lua function on the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture rpcFunc( + com.heroiclabs.nakama.api.Rpc request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRpcFuncMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove the Apple ID from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkApple( + com.heroiclabs.nakama.api.AccountApple request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkAppleMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove the custom ID from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkCustom( + com.heroiclabs.nakama.api.AccountCustom request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkCustomMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove the device ID from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkDevice( + com.heroiclabs.nakama.api.AccountDevice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkDeviceMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove the email+password from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkEmail( + com.heroiclabs.nakama.api.AccountEmail request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkEmailMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove Facebook from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkFacebook( + com.heroiclabs.nakama.api.AccountFacebook request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkFacebookMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove Facebook Instant Game profile from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkFacebookInstantGame( + com.heroiclabs.nakama.api.AccountFacebookInstantGame request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkFacebookInstantGameMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove Apple's GameCenter from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkGameCenter( + com.heroiclabs.nakama.api.AccountGameCenter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkGameCenterMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove Google from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkGoogle( + com.heroiclabs.nakama.api.AccountGoogle request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkGoogleMethod(), getCallOptions()), request); + } + + /** + *
+     * Remove Steam from the social profiles on the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unlinkSteam( + com.heroiclabs.nakama.api.AccountSteam request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlinkSteamMethod(), getCallOptions()), request); + } + + /** + *
+     * Update fields in the current user's account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateAccount( + com.heroiclabs.nakama.api.UpdateAccountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAccountMethod(), getCallOptions()), request); + } + + /** + *
+     * Update fields in a given group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateGroup( + com.heroiclabs.nakama.api.UpdateGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGroupMethod(), getCallOptions()), request); + } + + /** + *
+     * Validate Apple IAP Receipt
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture validatePurchaseApple( + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidatePurchaseAppleMethod(), getCallOptions()), request); + } + + /** + *
+     * Validate Apple Subscription Receipt
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture validateSubscriptionApple( + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidateSubscriptionAppleMethod(), getCallOptions()), request); + } + + /** + *
+     * Validate Google IAP Receipt
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture validatePurchaseGoogle( + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidatePurchaseGoogleMethod(), getCallOptions()), request); + } + + /** + *
+     * Validate Google Subscription Receipt
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture validateSubscriptionGoogle( + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidateSubscriptionGoogleMethod(), getCallOptions()), request); + } + + /** + *
+     * Validate Huawei IAP Receipt
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture validatePurchaseHuawei( + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidatePurchaseHuaweiMethod(), getCallOptions()), request); + } + + /** + *
+     * Validate FB Instant IAP Receipt
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture validatePurchaseFacebookInstant( + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidatePurchaseFacebookInstantMethod(), getCallOptions()), request); + } + + /** + *
+     * Write a record to a leaderboard.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture writeLeaderboardRecord( + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getWriteLeaderboardRecordMethod(), getCallOptions()), request); + } + + /** + *
+     * Write objects into the storage engine.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture writeStorageObjects( + com.heroiclabs.nakama.api.WriteStorageObjectsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getWriteStorageObjectsMethod(), getCallOptions()), request); + } + + /** + *
+     * Write a record to a tournament.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture writeTournamentRecord( + com.heroiclabs.nakama.api.WriteTournamentRecordRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getWriteTournamentRecordMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_ADD_FRIENDS = 0; + private static final int METHODID_ADD_GROUP_USERS = 1; + private static final int METHODID_SESSION_REFRESH = 2; + private static final int METHODID_SESSION_LOGOUT = 3; + private static final int METHODID_AUTHENTICATE_APPLE = 4; + private static final int METHODID_AUTHENTICATE_CUSTOM = 5; + private static final int METHODID_AUTHENTICATE_DEVICE = 6; + private static final int METHODID_AUTHENTICATE_EMAIL = 7; + private static final int METHODID_AUTHENTICATE_FACEBOOK = 8; + private static final int METHODID_AUTHENTICATE_FACEBOOK_INSTANT_GAME = 9; + private static final int METHODID_AUTHENTICATE_GAME_CENTER = 10; + private static final int METHODID_AUTHENTICATE_GOOGLE = 11; + private static final int METHODID_AUTHENTICATE_STEAM = 12; + private static final int METHODID_BAN_GROUP_USERS = 13; + private static final int METHODID_BLOCK_FRIENDS = 14; + private static final int METHODID_CREATE_GROUP = 15; + private static final int METHODID_DELETE_ACCOUNT = 16; + private static final int METHODID_DELETE_FRIENDS = 17; + private static final int METHODID_DELETE_GROUP = 18; + private static final int METHODID_DELETE_LEADERBOARD_RECORD = 19; + private static final int METHODID_DELETE_NOTIFICATIONS = 20; + private static final int METHODID_DELETE_TOURNAMENT_RECORD = 21; + private static final int METHODID_DELETE_STORAGE_OBJECTS = 22; + private static final int METHODID_EVENT = 23; + private static final int METHODID_GET_ACCOUNT = 24; + private static final int METHODID_GET_USERS = 25; + private static final int METHODID_GET_SUBSCRIPTION = 26; + private static final int METHODID_GET_MATCHMAKER_STATS = 27; + private static final int METHODID_HEALTHCHECK = 28; + private static final int METHODID_IMPORT_FACEBOOK_FRIENDS = 29; + private static final int METHODID_IMPORT_STEAM_FRIENDS = 30; + private static final int METHODID_JOIN_GROUP = 31; + private static final int METHODID_JOIN_TOURNAMENT = 32; + private static final int METHODID_KICK_GROUP_USERS = 33; + private static final int METHODID_LEAVE_GROUP = 34; + private static final int METHODID_LINK_APPLE = 35; + private static final int METHODID_LINK_CUSTOM = 36; + private static final int METHODID_LINK_DEVICE = 37; + private static final int METHODID_LINK_EMAIL = 38; + private static final int METHODID_LINK_FACEBOOK = 39; + private static final int METHODID_LINK_FACEBOOK_INSTANT_GAME = 40; + private static final int METHODID_LINK_GAME_CENTER = 41; + private static final int METHODID_LINK_GOOGLE = 42; + private static final int METHODID_LINK_STEAM = 43; + private static final int METHODID_LIST_CHANNEL_MESSAGES = 44; + private static final int METHODID_LIST_FRIENDS = 45; + private static final int METHODID_LIST_FRIENDS_OF_FRIENDS = 46; + private static final int METHODID_LIST_GROUPS = 47; + private static final int METHODID_LIST_GROUP_USERS = 48; + private static final int METHODID_LIST_LEADERBOARD_RECORDS = 49; + private static final int METHODID_LIST_LEADERBOARD_RECORDS_AROUND_OWNER = 50; + private static final int METHODID_LIST_MATCHES = 51; + private static final int METHODID_LIST_NOTIFICATIONS = 52; + private static final int METHODID_LIST_STORAGE_OBJECTS = 53; + private static final int METHODID_LIST_SUBSCRIPTIONS = 54; + private static final int METHODID_LIST_TOURNAMENTS = 55; + private static final int METHODID_LIST_TOURNAMENT_RECORDS = 56; + private static final int METHODID_LIST_TOURNAMENT_RECORDS_AROUND_OWNER = 57; + private static final int METHODID_LIST_USER_GROUPS = 58; + private static final int METHODID_PROMOTE_GROUP_USERS = 59; + private static final int METHODID_DEMOTE_GROUP_USERS = 60; + private static final int METHODID_READ_STORAGE_OBJECTS = 61; + private static final int METHODID_RPC_FUNC = 62; + private static final int METHODID_UNLINK_APPLE = 63; + private static final int METHODID_UNLINK_CUSTOM = 64; + private static final int METHODID_UNLINK_DEVICE = 65; + private static final int METHODID_UNLINK_EMAIL = 66; + private static final int METHODID_UNLINK_FACEBOOK = 67; + private static final int METHODID_UNLINK_FACEBOOK_INSTANT_GAME = 68; + private static final int METHODID_UNLINK_GAME_CENTER = 69; + private static final int METHODID_UNLINK_GOOGLE = 70; + private static final int METHODID_UNLINK_STEAM = 71; + private static final int METHODID_UPDATE_ACCOUNT = 72; + private static final int METHODID_UPDATE_GROUP = 73; + private static final int METHODID_VALIDATE_PURCHASE_APPLE = 74; + private static final int METHODID_VALIDATE_SUBSCRIPTION_APPLE = 75; + private static final int METHODID_VALIDATE_PURCHASE_GOOGLE = 76; + private static final int METHODID_VALIDATE_SUBSCRIPTION_GOOGLE = 77; + private static final int METHODID_VALIDATE_PURCHASE_HUAWEI = 78; + private static final int METHODID_VALIDATE_PURCHASE_FACEBOOK_INSTANT = 79; + private static final int METHODID_WRITE_LEADERBOARD_RECORD = 80; + private static final int METHODID_WRITE_STORAGE_OBJECTS = 81; + private static final int METHODID_WRITE_TOURNAMENT_RECORD = 82; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_ADD_FRIENDS: + serviceImpl.addFriends((com.heroiclabs.nakama.api.AddFriendsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ADD_GROUP_USERS: + serviceImpl.addGroupUsers((com.heroiclabs.nakama.api.AddGroupUsersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SESSION_REFRESH: + serviceImpl.sessionRefresh((com.heroiclabs.nakama.api.SessionRefreshRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SESSION_LOGOUT: + serviceImpl.sessionLogout((com.heroiclabs.nakama.api.SessionLogoutRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_APPLE: + serviceImpl.authenticateApple((com.heroiclabs.nakama.api.AuthenticateAppleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_CUSTOM: + serviceImpl.authenticateCustom((com.heroiclabs.nakama.api.AuthenticateCustomRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_DEVICE: + serviceImpl.authenticateDevice((com.heroiclabs.nakama.api.AuthenticateDeviceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_EMAIL: + serviceImpl.authenticateEmail((com.heroiclabs.nakama.api.AuthenticateEmailRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_FACEBOOK: + serviceImpl.authenticateFacebook((com.heroiclabs.nakama.api.AuthenticateFacebookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_FACEBOOK_INSTANT_GAME: + serviceImpl.authenticateFacebookInstantGame((com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_GAME_CENTER: + serviceImpl.authenticateGameCenter((com.heroiclabs.nakama.api.AuthenticateGameCenterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_GOOGLE: + serviceImpl.authenticateGoogle((com.heroiclabs.nakama.api.AuthenticateGoogleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_STEAM: + serviceImpl.authenticateSteam((com.heroiclabs.nakama.api.AuthenticateSteamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BAN_GROUP_USERS: + serviceImpl.banGroupUsers((com.heroiclabs.nakama.api.BanGroupUsersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BLOCK_FRIENDS: + serviceImpl.blockFriends((com.heroiclabs.nakama.api.BlockFriendsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_GROUP: + serviceImpl.createGroup((com.heroiclabs.nakama.api.CreateGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ACCOUNT: + serviceImpl.deleteAccount((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FRIENDS: + serviceImpl.deleteFriends((com.heroiclabs.nakama.api.DeleteFriendsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_GROUP: + serviceImpl.deleteGroup((com.heroiclabs.nakama.api.DeleteGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_LEADERBOARD_RECORD: + serviceImpl.deleteLeaderboardRecord((com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NOTIFICATIONS: + serviceImpl.deleteNotifications((com.heroiclabs.nakama.api.DeleteNotificationsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_TOURNAMENT_RECORD: + serviceImpl.deleteTournamentRecord((com.heroiclabs.nakama.api.DeleteTournamentRecordRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_STORAGE_OBJECTS: + serviceImpl.deleteStorageObjects((com.heroiclabs.nakama.api.DeleteStorageObjectsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EVENT: + serviceImpl.event((com.heroiclabs.nakama.api.Event) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ACCOUNT: + serviceImpl.getAccount((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_USERS: + serviceImpl.getUsers((com.heroiclabs.nakama.api.GetUsersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBSCRIPTION: + serviceImpl.getSubscription((com.heroiclabs.nakama.api.GetSubscriptionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MATCHMAKER_STATS: + serviceImpl.getMatchmakerStats((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_HEALTHCHECK: + serviceImpl.healthcheck((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_FACEBOOK_FRIENDS: + serviceImpl.importFacebookFriends((com.heroiclabs.nakama.api.ImportFacebookFriendsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_STEAM_FRIENDS: + serviceImpl.importSteamFriends((com.heroiclabs.nakama.api.ImportSteamFriendsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_JOIN_GROUP: + serviceImpl.joinGroup((com.heroiclabs.nakama.api.JoinGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_JOIN_TOURNAMENT: + serviceImpl.joinTournament((com.heroiclabs.nakama.api.JoinTournamentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_KICK_GROUP_USERS: + serviceImpl.kickGroupUsers((com.heroiclabs.nakama.api.KickGroupUsersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LEAVE_GROUP: + serviceImpl.leaveGroup((com.heroiclabs.nakama.api.LeaveGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_APPLE: + serviceImpl.linkApple((com.heroiclabs.nakama.api.AccountApple) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_CUSTOM: + serviceImpl.linkCustom((com.heroiclabs.nakama.api.AccountCustom) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_DEVICE: + serviceImpl.linkDevice((com.heroiclabs.nakama.api.AccountDevice) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_EMAIL: + serviceImpl.linkEmail((com.heroiclabs.nakama.api.AccountEmail) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_FACEBOOK: + serviceImpl.linkFacebook((com.heroiclabs.nakama.api.LinkFacebookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_FACEBOOK_INSTANT_GAME: + serviceImpl.linkFacebookInstantGame((com.heroiclabs.nakama.api.AccountFacebookInstantGame) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_GAME_CENTER: + serviceImpl.linkGameCenter((com.heroiclabs.nakama.api.AccountGameCenter) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_GOOGLE: + serviceImpl.linkGoogle((com.heroiclabs.nakama.api.AccountGoogle) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LINK_STEAM: + serviceImpl.linkSteam((com.heroiclabs.nakama.api.LinkSteamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CHANNEL_MESSAGES: + serviceImpl.listChannelMessages((com.heroiclabs.nakama.api.ListChannelMessagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_FRIENDS: + serviceImpl.listFriends((com.heroiclabs.nakama.api.ListFriendsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_FRIENDS_OF_FRIENDS: + serviceImpl.listFriendsOfFriends((com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_GROUPS: + serviceImpl.listGroups((com.heroiclabs.nakama.api.ListGroupsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_GROUP_USERS: + serviceImpl.listGroupUsers((com.heroiclabs.nakama.api.ListGroupUsersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_LEADERBOARD_RECORDS: + serviceImpl.listLeaderboardRecords((com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_LEADERBOARD_RECORDS_AROUND_OWNER: + serviceImpl.listLeaderboardRecordsAroundOwner((com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_MATCHES: + serviceImpl.listMatches((com.heroiclabs.nakama.api.ListMatchesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NOTIFICATIONS: + serviceImpl.listNotifications((com.heroiclabs.nakama.api.ListNotificationsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_STORAGE_OBJECTS: + serviceImpl.listStorageObjects((com.heroiclabs.nakama.api.ListStorageObjectsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SUBSCRIPTIONS: + serviceImpl.listSubscriptions((com.heroiclabs.nakama.api.ListSubscriptionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOURNAMENTS: + serviceImpl.listTournaments((com.heroiclabs.nakama.api.ListTournamentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOURNAMENT_RECORDS: + serviceImpl.listTournamentRecords((com.heroiclabs.nakama.api.ListTournamentRecordsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOURNAMENT_RECORDS_AROUND_OWNER: + serviceImpl.listTournamentRecordsAroundOwner((com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_USER_GROUPS: + serviceImpl.listUserGroups((com.heroiclabs.nakama.api.ListUserGroupsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PROMOTE_GROUP_USERS: + serviceImpl.promoteGroupUsers((com.heroiclabs.nakama.api.PromoteGroupUsersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEMOTE_GROUP_USERS: + serviceImpl.demoteGroupUsers((com.heroiclabs.nakama.api.DemoteGroupUsersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_READ_STORAGE_OBJECTS: + serviceImpl.readStorageObjects((com.heroiclabs.nakama.api.ReadStorageObjectsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RPC_FUNC: + serviceImpl.rpcFunc((com.heroiclabs.nakama.api.Rpc) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_APPLE: + serviceImpl.unlinkApple((com.heroiclabs.nakama.api.AccountApple) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_CUSTOM: + serviceImpl.unlinkCustom((com.heroiclabs.nakama.api.AccountCustom) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_DEVICE: + serviceImpl.unlinkDevice((com.heroiclabs.nakama.api.AccountDevice) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_EMAIL: + serviceImpl.unlinkEmail((com.heroiclabs.nakama.api.AccountEmail) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_FACEBOOK: + serviceImpl.unlinkFacebook((com.heroiclabs.nakama.api.AccountFacebook) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_FACEBOOK_INSTANT_GAME: + serviceImpl.unlinkFacebookInstantGame((com.heroiclabs.nakama.api.AccountFacebookInstantGame) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_GAME_CENTER: + serviceImpl.unlinkGameCenter((com.heroiclabs.nakama.api.AccountGameCenter) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_GOOGLE: + serviceImpl.unlinkGoogle((com.heroiclabs.nakama.api.AccountGoogle) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLINK_STEAM: + serviceImpl.unlinkSteam((com.heroiclabs.nakama.api.AccountSteam) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ACCOUNT: + serviceImpl.updateAccount((com.heroiclabs.nakama.api.UpdateAccountRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_GROUP: + serviceImpl.updateGroup((com.heroiclabs.nakama.api.UpdateGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE_PURCHASE_APPLE: + serviceImpl.validatePurchaseApple((com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE_SUBSCRIPTION_APPLE: + serviceImpl.validateSubscriptionApple((com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE_PURCHASE_GOOGLE: + serviceImpl.validatePurchaseGoogle((com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE_SUBSCRIPTION_GOOGLE: + serviceImpl.validateSubscriptionGoogle((com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE_PURCHASE_HUAWEI: + serviceImpl.validatePurchaseHuawei((com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VALIDATE_PURCHASE_FACEBOOK_INSTANT: + serviceImpl.validatePurchaseFacebookInstant((com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_WRITE_LEADERBOARD_RECORD: + serviceImpl.writeLeaderboardRecord((com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_WRITE_STORAGE_OBJECTS: + serviceImpl.writeStorageObjects((com.heroiclabs.nakama.api.WriteStorageObjectsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_WRITE_TOURNAMENT_RECORD: + serviceImpl.writeTournamentRecord((com.heroiclabs.nakama.api.WriteTournamentRecordRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getAddFriendsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AddFriendsRequest, + com.google.protobuf.Empty>( + service, METHODID_ADD_FRIENDS))) + .addMethod( + getAddGroupUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AddGroupUsersRequest, + com.google.protobuf.Empty>( + service, METHODID_ADD_GROUP_USERS))) + .addMethod( + getSessionRefreshMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.SessionRefreshRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_SESSION_REFRESH))) + .addMethod( + getSessionLogoutMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.SessionLogoutRequest, + com.google.protobuf.Empty>( + service, METHODID_SESSION_LOGOUT))) + .addMethod( + getAuthenticateAppleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateAppleRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_APPLE))) + .addMethod( + getAuthenticateCustomMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateCustomRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_CUSTOM))) + .addMethod( + getAuthenticateDeviceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateDeviceRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_DEVICE))) + .addMethod( + getAuthenticateEmailMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateEmailRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_EMAIL))) + .addMethod( + getAuthenticateFacebookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateFacebookRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_FACEBOOK))) + .addMethod( + getAuthenticateFacebookInstantGameMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateFacebookInstantGameRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_FACEBOOK_INSTANT_GAME))) + .addMethod( + getAuthenticateGameCenterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateGameCenterRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_GAME_CENTER))) + .addMethod( + getAuthenticateGoogleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateGoogleRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_GOOGLE))) + .addMethod( + getAuthenticateSteamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AuthenticateSteamRequest, + com.heroiclabs.nakama.api.Session>( + service, METHODID_AUTHENTICATE_STEAM))) + .addMethod( + getBanGroupUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.BanGroupUsersRequest, + com.google.protobuf.Empty>( + service, METHODID_BAN_GROUP_USERS))) + .addMethod( + getBlockFriendsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.BlockFriendsRequest, + com.google.protobuf.Empty>( + service, METHODID_BLOCK_FRIENDS))) + .addMethod( + getCreateGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.CreateGroupRequest, + com.heroiclabs.nakama.api.Group>( + service, METHODID_CREATE_GROUP))) + .addMethod( + getDeleteAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.google.protobuf.Empty>( + service, METHODID_DELETE_ACCOUNT))) + .addMethod( + getDeleteFriendsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.DeleteFriendsRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_FRIENDS))) + .addMethod( + getDeleteGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.DeleteGroupRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_GROUP))) + .addMethod( + getDeleteLeaderboardRecordMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.DeleteLeaderboardRecordRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_LEADERBOARD_RECORD))) + .addMethod( + getDeleteNotificationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.DeleteNotificationsRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_NOTIFICATIONS))) + .addMethod( + getDeleteTournamentRecordMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.DeleteTournamentRecordRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_TOURNAMENT_RECORD))) + .addMethod( + getDeleteStorageObjectsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.DeleteStorageObjectsRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_STORAGE_OBJECTS))) + .addMethod( + getEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.Event, + com.google.protobuf.Empty>( + service, METHODID_EVENT))) + .addMethod( + getGetAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.heroiclabs.nakama.api.Account>( + service, METHODID_GET_ACCOUNT))) + .addMethod( + getGetUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.GetUsersRequest, + com.heroiclabs.nakama.api.Users>( + service, METHODID_GET_USERS))) + .addMethod( + getGetSubscriptionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.GetSubscriptionRequest, + com.heroiclabs.nakama.api.ValidatedSubscription>( + service, METHODID_GET_SUBSCRIPTION))) + .addMethod( + getGetMatchmakerStatsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.heroiclabs.nakama.api.MatchmakerStats>( + service, METHODID_GET_MATCHMAKER_STATS))) + .addMethod( + getHealthcheckMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.google.protobuf.Empty>( + service, METHODID_HEALTHCHECK))) + .addMethod( + getImportFacebookFriendsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ImportFacebookFriendsRequest, + com.google.protobuf.Empty>( + service, METHODID_IMPORT_FACEBOOK_FRIENDS))) + .addMethod( + getImportSteamFriendsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ImportSteamFriendsRequest, + com.google.protobuf.Empty>( + service, METHODID_IMPORT_STEAM_FRIENDS))) + .addMethod( + getJoinGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.JoinGroupRequest, + com.google.protobuf.Empty>( + service, METHODID_JOIN_GROUP))) + .addMethod( + getJoinTournamentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.JoinTournamentRequest, + com.google.protobuf.Empty>( + service, METHODID_JOIN_TOURNAMENT))) + .addMethod( + getKickGroupUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.KickGroupUsersRequest, + com.google.protobuf.Empty>( + service, METHODID_KICK_GROUP_USERS))) + .addMethod( + getLeaveGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.LeaveGroupRequest, + com.google.protobuf.Empty>( + service, METHODID_LEAVE_GROUP))) + .addMethod( + getLinkAppleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountApple, + com.google.protobuf.Empty>( + service, METHODID_LINK_APPLE))) + .addMethod( + getLinkCustomMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountCustom, + com.google.protobuf.Empty>( + service, METHODID_LINK_CUSTOM))) + .addMethod( + getLinkDeviceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountDevice, + com.google.protobuf.Empty>( + service, METHODID_LINK_DEVICE))) + .addMethod( + getLinkEmailMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountEmail, + com.google.protobuf.Empty>( + service, METHODID_LINK_EMAIL))) + .addMethod( + getLinkFacebookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.LinkFacebookRequest, + com.google.protobuf.Empty>( + service, METHODID_LINK_FACEBOOK))) + .addMethod( + getLinkFacebookInstantGameMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountFacebookInstantGame, + com.google.protobuf.Empty>( + service, METHODID_LINK_FACEBOOK_INSTANT_GAME))) + .addMethod( + getLinkGameCenterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountGameCenter, + com.google.protobuf.Empty>( + service, METHODID_LINK_GAME_CENTER))) + .addMethod( + getLinkGoogleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountGoogle, + com.google.protobuf.Empty>( + service, METHODID_LINK_GOOGLE))) + .addMethod( + getLinkSteamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.LinkSteamRequest, + com.google.protobuf.Empty>( + service, METHODID_LINK_STEAM))) + .addMethod( + getListChannelMessagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListChannelMessagesRequest, + com.heroiclabs.nakama.api.ChannelMessageList>( + service, METHODID_LIST_CHANNEL_MESSAGES))) + .addMethod( + getListFriendsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListFriendsRequest, + com.heroiclabs.nakama.api.FriendList>( + service, METHODID_LIST_FRIENDS))) + .addMethod( + getListFriendsOfFriendsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListFriendsOfFriendsRequest, + com.heroiclabs.nakama.api.FriendsOfFriendsList>( + service, METHODID_LIST_FRIENDS_OF_FRIENDS))) + .addMethod( + getListGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListGroupsRequest, + com.heroiclabs.nakama.api.GroupList>( + service, METHODID_LIST_GROUPS))) + .addMethod( + getListGroupUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListGroupUsersRequest, + com.heroiclabs.nakama.api.GroupUserList>( + service, METHODID_LIST_GROUP_USERS))) + .addMethod( + getListLeaderboardRecordsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListLeaderboardRecordsRequest, + com.heroiclabs.nakama.api.LeaderboardRecordList>( + service, METHODID_LIST_LEADERBOARD_RECORDS))) + .addMethod( + getListLeaderboardRecordsAroundOwnerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListLeaderboardRecordsAroundOwnerRequest, + com.heroiclabs.nakama.api.LeaderboardRecordList>( + service, METHODID_LIST_LEADERBOARD_RECORDS_AROUND_OWNER))) + .addMethod( + getListMatchesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListMatchesRequest, + com.heroiclabs.nakama.api.MatchList>( + service, METHODID_LIST_MATCHES))) + .addMethod( + getListNotificationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListNotificationsRequest, + com.heroiclabs.nakama.api.NotificationList>( + service, METHODID_LIST_NOTIFICATIONS))) + .addMethod( + getListStorageObjectsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListStorageObjectsRequest, + com.heroiclabs.nakama.api.StorageObjectList>( + service, METHODID_LIST_STORAGE_OBJECTS))) + .addMethod( + getListSubscriptionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListSubscriptionsRequest, + com.heroiclabs.nakama.api.SubscriptionList>( + service, METHODID_LIST_SUBSCRIPTIONS))) + .addMethod( + getListTournamentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListTournamentsRequest, + com.heroiclabs.nakama.api.TournamentList>( + service, METHODID_LIST_TOURNAMENTS))) + .addMethod( + getListTournamentRecordsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListTournamentRecordsRequest, + com.heroiclabs.nakama.api.TournamentRecordList>( + service, METHODID_LIST_TOURNAMENT_RECORDS))) + .addMethod( + getListTournamentRecordsAroundOwnerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListTournamentRecordsAroundOwnerRequest, + com.heroiclabs.nakama.api.TournamentRecordList>( + service, METHODID_LIST_TOURNAMENT_RECORDS_AROUND_OWNER))) + .addMethod( + getListUserGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ListUserGroupsRequest, + com.heroiclabs.nakama.api.UserGroupList>( + service, METHODID_LIST_USER_GROUPS))) + .addMethod( + getPromoteGroupUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.PromoteGroupUsersRequest, + com.google.protobuf.Empty>( + service, METHODID_PROMOTE_GROUP_USERS))) + .addMethod( + getDemoteGroupUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.DemoteGroupUsersRequest, + com.google.protobuf.Empty>( + service, METHODID_DEMOTE_GROUP_USERS))) + .addMethod( + getReadStorageObjectsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ReadStorageObjectsRequest, + com.heroiclabs.nakama.api.StorageObjects>( + service, METHODID_READ_STORAGE_OBJECTS))) + .addMethod( + getRpcFuncMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.Rpc, + com.heroiclabs.nakama.api.Rpc>( + service, METHODID_RPC_FUNC))) + .addMethod( + getUnlinkAppleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountApple, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_APPLE))) + .addMethod( + getUnlinkCustomMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountCustom, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_CUSTOM))) + .addMethod( + getUnlinkDeviceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountDevice, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_DEVICE))) + .addMethod( + getUnlinkEmailMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountEmail, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_EMAIL))) + .addMethod( + getUnlinkFacebookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountFacebook, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_FACEBOOK))) + .addMethod( + getUnlinkFacebookInstantGameMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountFacebookInstantGame, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_FACEBOOK_INSTANT_GAME))) + .addMethod( + getUnlinkGameCenterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountGameCenter, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_GAME_CENTER))) + .addMethod( + getUnlinkGoogleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountGoogle, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_GOOGLE))) + .addMethod( + getUnlinkSteamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.AccountSteam, + com.google.protobuf.Empty>( + service, METHODID_UNLINK_STEAM))) + .addMethod( + getUpdateAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.UpdateAccountRequest, + com.google.protobuf.Empty>( + service, METHODID_UPDATE_ACCOUNT))) + .addMethod( + getUpdateGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.UpdateGroupRequest, + com.google.protobuf.Empty>( + service, METHODID_UPDATE_GROUP))) + .addMethod( + getValidatePurchaseAppleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest, + com.heroiclabs.nakama.api.ValidatePurchaseResponse>( + service, METHODID_VALIDATE_PURCHASE_APPLE))) + .addMethod( + getValidateSubscriptionAppleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest, + com.heroiclabs.nakama.api.ValidateSubscriptionResponse>( + service, METHODID_VALIDATE_SUBSCRIPTION_APPLE))) + .addMethod( + getValidatePurchaseGoogleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest, + com.heroiclabs.nakama.api.ValidatePurchaseResponse>( + service, METHODID_VALIDATE_PURCHASE_GOOGLE))) + .addMethod( + getValidateSubscriptionGoogleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest, + com.heroiclabs.nakama.api.ValidateSubscriptionResponse>( + service, METHODID_VALIDATE_SUBSCRIPTION_GOOGLE))) + .addMethod( + getValidatePurchaseHuaweiMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest, + com.heroiclabs.nakama.api.ValidatePurchaseResponse>( + service, METHODID_VALIDATE_PURCHASE_HUAWEI))) + .addMethod( + getValidatePurchaseFacebookInstantMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest, + com.heroiclabs.nakama.api.ValidatePurchaseResponse>( + service, METHODID_VALIDATE_PURCHASE_FACEBOOK_INSTANT))) + .addMethod( + getWriteLeaderboardRecordMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest, + com.heroiclabs.nakama.api.LeaderboardRecord>( + service, METHODID_WRITE_LEADERBOARD_RECORD))) + .addMethod( + getWriteStorageObjectsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.WriteStorageObjectsRequest, + com.heroiclabs.nakama.api.StorageObjectAcks>( + service, METHODID_WRITE_STORAGE_OBJECTS))) + .addMethod( + getWriteTournamentRecordMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.nakama.api.WriteTournamentRecordRequest, + com.heroiclabs.nakama.api.LeaderboardRecord>( + service, METHODID_WRITE_TOURNAMENT_RECORD))) + .build(); + } + + private static abstract class NakamaBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NakamaBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.heroiclabs.nakama.api.ApigrpcProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Nakama"); + } + } + + private static final class NakamaFileDescriptorSupplier + extends NakamaBaseDescriptorSupplier { + NakamaFileDescriptorSupplier() {} + } + + private static final class NakamaMethodDescriptorSupplier + extends NakamaBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + NakamaMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (NakamaGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NakamaFileDescriptorSupplier()) + .addMethod(getAddFriendsMethod()) + .addMethod(getAddGroupUsersMethod()) + .addMethod(getSessionRefreshMethod()) + .addMethod(getSessionLogoutMethod()) + .addMethod(getAuthenticateAppleMethod()) + .addMethod(getAuthenticateCustomMethod()) + .addMethod(getAuthenticateDeviceMethod()) + .addMethod(getAuthenticateEmailMethod()) + .addMethod(getAuthenticateFacebookMethod()) + .addMethod(getAuthenticateFacebookInstantGameMethod()) + .addMethod(getAuthenticateGameCenterMethod()) + .addMethod(getAuthenticateGoogleMethod()) + .addMethod(getAuthenticateSteamMethod()) + .addMethod(getBanGroupUsersMethod()) + .addMethod(getBlockFriendsMethod()) + .addMethod(getCreateGroupMethod()) + .addMethod(getDeleteAccountMethod()) + .addMethod(getDeleteFriendsMethod()) + .addMethod(getDeleteGroupMethod()) + .addMethod(getDeleteLeaderboardRecordMethod()) + .addMethod(getDeleteNotificationsMethod()) + .addMethod(getDeleteTournamentRecordMethod()) + .addMethod(getDeleteStorageObjectsMethod()) + .addMethod(getEventMethod()) + .addMethod(getGetAccountMethod()) + .addMethod(getGetUsersMethod()) + .addMethod(getGetSubscriptionMethod()) + .addMethod(getGetMatchmakerStatsMethod()) + .addMethod(getHealthcheckMethod()) + .addMethod(getImportFacebookFriendsMethod()) + .addMethod(getImportSteamFriendsMethod()) + .addMethod(getJoinGroupMethod()) + .addMethod(getJoinTournamentMethod()) + .addMethod(getKickGroupUsersMethod()) + .addMethod(getLeaveGroupMethod()) + .addMethod(getLinkAppleMethod()) + .addMethod(getLinkCustomMethod()) + .addMethod(getLinkDeviceMethod()) + .addMethod(getLinkEmailMethod()) + .addMethod(getLinkFacebookMethod()) + .addMethod(getLinkFacebookInstantGameMethod()) + .addMethod(getLinkGameCenterMethod()) + .addMethod(getLinkGoogleMethod()) + .addMethod(getLinkSteamMethod()) + .addMethod(getListChannelMessagesMethod()) + .addMethod(getListFriendsMethod()) + .addMethod(getListFriendsOfFriendsMethod()) + .addMethod(getListGroupsMethod()) + .addMethod(getListGroupUsersMethod()) + .addMethod(getListLeaderboardRecordsMethod()) + .addMethod(getListLeaderboardRecordsAroundOwnerMethod()) + .addMethod(getListMatchesMethod()) + .addMethod(getListNotificationsMethod()) + .addMethod(getListStorageObjectsMethod()) + .addMethod(getListSubscriptionsMethod()) + .addMethod(getListTournamentsMethod()) + .addMethod(getListTournamentRecordsMethod()) + .addMethod(getListTournamentRecordsAroundOwnerMethod()) + .addMethod(getListUserGroupsMethod()) + .addMethod(getPromoteGroupUsersMethod()) + .addMethod(getDemoteGroupUsersMethod()) + .addMethod(getReadStorageObjectsMethod()) + .addMethod(getRpcFuncMethod()) + .addMethod(getUnlinkAppleMethod()) + .addMethod(getUnlinkCustomMethod()) + .addMethod(getUnlinkDeviceMethod()) + .addMethod(getUnlinkEmailMethod()) + .addMethod(getUnlinkFacebookMethod()) + .addMethod(getUnlinkFacebookInstantGameMethod()) + .addMethod(getUnlinkGameCenterMethod()) + .addMethod(getUnlinkGoogleMethod()) + .addMethod(getUnlinkSteamMethod()) + .addMethod(getUpdateAccountMethod()) + .addMethod(getUpdateGroupMethod()) + .addMethod(getValidatePurchaseAppleMethod()) + .addMethod(getValidateSubscriptionAppleMethod()) + .addMethod(getValidatePurchaseGoogleMethod()) + .addMethod(getValidateSubscriptionGoogleMethod()) + .addMethod(getValidatePurchaseHuaweiMethod()) + .addMethod(getValidatePurchaseFacebookInstantMethod()) + .addMethod(getWriteLeaderboardRecordMethod()) + .addMethod(getWriteStorageObjectsMethod()) + .addMethod(getWriteTournamentRecordMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Notification.java b/src/main/java/com/heroiclabs/nakama/api/Notification.java new file mode 100644 index 00000000..b1413977 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Notification.java @@ -0,0 +1,1435 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A notification in the server.
+ * 
+ * + * Protobuf type {@code nakama.api.Notification} + */ +public final class Notification extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Notification) + NotificationOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Notification.class.getName()); + } + // Use Notification.newBuilder() to construct. + private Notification(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Notification() { + id_ = ""; + subject_ = ""; + content_ = ""; + senderId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Notification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Notification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Notification.class, com.heroiclabs.nakama.api.Notification.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * ID of the Notification.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * ID of the Notification.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object subject_ = ""; + /** + *
+   * Subject of the notification.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The subject. + */ + @java.lang.Override + public java.lang.String getSubject() { + java.lang.Object ref = subject_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subject_ = s; + return s; + } + } + /** + *
+   * Subject of the notification.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The bytes for subject. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectBytes() { + java.lang.Object ref = subject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + *
+   * Content of the notification in JSON.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + *
+   * Content of the notification in JSON.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 4; + private int code_ = 0; + /** + *
+   * Category code for this notification.
+   * 
+ * + * int32 code = 4 [json_name = "code"]; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int SENDER_ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object senderId_ = ""; + /** + *
+   * ID of the sender, if a user. Otherwise 'null'.
+   * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @return The senderId. + */ + @java.lang.Override + public java.lang.String getSenderId() { + java.lang.Object ref = senderId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + senderId_ = s; + return s; + } + } + /** + *
+   * ID of the sender, if a user. Otherwise 'null'.
+   * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @return The bytes for senderId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderIdBytes() { + java.lang.Object ref = senderId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + senderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int PERSISTENT_FIELD_NUMBER = 7; + private boolean persistent_ = false; + /** + *
+   * True if this notification was persisted to the database.
+   * 
+ * + * bool persistent = 7 [json_name = "persistent"]; + * @return The persistent. + */ + @java.lang.Override + public boolean getPersistent() { + return persistent_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subject_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, subject_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, content_); + } + if (code_ != 0) { + output.writeInt32(4, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(senderId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, senderId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (persistent_ != false) { + output.writeBool(7, persistent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subject_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, subject_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, content_); + } + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(senderId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, senderId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (persistent_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, persistent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Notification)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Notification other = (com.heroiclabs.nakama.api.Notification) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getSubject() + .equals(other.getSubject())) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (getCode() + != other.getCode()) return false; + if (!getSenderId() + .equals(other.getSenderId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (getPersistent() + != other.getPersistent()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + SENDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSenderId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + PERSISTENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPersistent()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Notification parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Notification parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Notification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Notification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Notification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Notification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Notification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Notification parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Notification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Notification parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Notification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Notification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Notification prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A notification in the server.
+   * 
+ * + * Protobuf type {@code nakama.api.Notification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Notification) + com.heroiclabs.nakama.api.NotificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Notification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Notification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Notification.class, com.heroiclabs.nakama.api.Notification.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Notification.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + subject_ = ""; + content_ = ""; + code_ = 0; + senderId_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + persistent_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Notification_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Notification getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Notification.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Notification build() { + com.heroiclabs.nakama.api.Notification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Notification buildPartial() { + com.heroiclabs.nakama.api.Notification result = new com.heroiclabs.nakama.api.Notification(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Notification result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subject_ = subject_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.senderId_ = senderId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.persistent_ = persistent_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Notification) { + return mergeFrom((com.heroiclabs.nakama.api.Notification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Notification other) { + if (other == com.heroiclabs.nakama.api.Notification.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSubject().isEmpty()) { + subject_ = other.subject_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getSenderId().isEmpty()) { + senderId_ = other.senderId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.getPersistent() != false) { + setPersistent(other.getPersistent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + subject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + code_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + senderId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + persistent_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * ID of the Notification.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ID of the Notification.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ID of the Notification.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * ID of the Notification.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * ID of the Notification.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object subject_ = ""; + /** + *
+     * Subject of the notification.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The subject. + */ + public java.lang.String getSubject() { + java.lang.Object ref = subject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Subject of the notification.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The bytes for subject. + */ + public com.google.protobuf.ByteString + getSubjectBytes() { + java.lang.Object ref = subject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Subject of the notification.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @param value The subject to set. + * @return This builder for chaining. + */ + public Builder setSubject( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Subject of the notification.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return This builder for chaining. + */ + public Builder clearSubject() { + subject_ = getDefaultInstance().getSubject(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Subject of the notification.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @param value The bytes for subject to set. + * @return This builder for chaining. + */ + public Builder setSubjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + *
+     * Content of the notification in JSON.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Content of the notification in JSON.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Content of the notification in JSON.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Content of the notification in JSON.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Content of the notification in JSON.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int code_ ; + /** + *
+     * Category code for this notification.
+     * 
+ * + * int32 code = 4 [json_name = "code"]; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + *
+     * Category code for this notification.
+     * 
+ * + * int32 code = 4 [json_name = "code"]; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Category code for this notification.
+     * 
+ * + * int32 code = 4 [json_name = "code"]; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000008); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object senderId_ = ""; + /** + *
+     * ID of the sender, if a user. Otherwise 'null'.
+     * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @return The senderId. + */ + public java.lang.String getSenderId() { + java.lang.Object ref = senderId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + senderId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * ID of the sender, if a user. Otherwise 'null'.
+     * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @return The bytes for senderId. + */ + public com.google.protobuf.ByteString + getSenderIdBytes() { + java.lang.Object ref = senderId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + senderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * ID of the sender, if a user. Otherwise 'null'.
+     * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @param value The senderId to set. + * @return This builder for chaining. + */ + public Builder setSenderId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + senderId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * ID of the sender, if a user. Otherwise 'null'.
+     * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @return This builder for chaining. + */ + public Builder clearSenderId() { + senderId_ = getDefaultInstance().getSenderId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * ID of the sender, if a user. Otherwise 'null'.
+     * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @param value The bytes for senderId to set. + * @return This builder for chaining. + */ + public Builder setSenderIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + senderId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private boolean persistent_ ; + /** + *
+     * True if this notification was persisted to the database.
+     * 
+ * + * bool persistent = 7 [json_name = "persistent"]; + * @return The persistent. + */ + @java.lang.Override + public boolean getPersistent() { + return persistent_; + } + /** + *
+     * True if this notification was persisted to the database.
+     * 
+ * + * bool persistent = 7 [json_name = "persistent"]; + * @param value The persistent to set. + * @return This builder for chaining. + */ + public Builder setPersistent(boolean value) { + + persistent_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * True if this notification was persisted to the database.
+     * 
+ * + * bool persistent = 7 [json_name = "persistent"]; + * @return This builder for chaining. + */ + public Builder clearPersistent() { + bitField0_ = (bitField0_ & ~0x00000040); + persistent_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Notification) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Notification) + private static final com.heroiclabs.nakama.api.Notification DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Notification(); + } + + public static com.heroiclabs.nakama.api.Notification getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Notification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Notification getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/NotificationList.java b/src/main/java/com/heroiclabs/nakama/api/NotificationList.java new file mode 100644 index 00000000..822d8ebd --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/NotificationList.java @@ -0,0 +1,983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A collection of zero or more notifications.
+ * 
+ * + * Protobuf type {@code nakama.api.NotificationList} + */ +public final class NotificationList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.NotificationList) + NotificationListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + NotificationList.class.getName()); + } + // Use NotificationList.newBuilder() to construct. + private NotificationList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private NotificationList() { + notifications_ = java.util.Collections.emptyList(); + cacheableCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_NotificationList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_NotificationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.NotificationList.class, com.heroiclabs.nakama.api.NotificationList.Builder.class); + } + + public static final int NOTIFICATIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List notifications_; + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public java.util.List getNotificationsList() { + return notifications_; + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public java.util.List + getNotificationsOrBuilderList() { + return notifications_; + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public int getNotificationsCount() { + return notifications_.size(); + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Notification getNotifications(int index) { + return notifications_.get(index); + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.NotificationOrBuilder getNotificationsOrBuilder( + int index) { + return notifications_.get(index); + } + + public static final int CACHEABLE_CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cacheableCursor_ = ""; + /** + *
+   * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + @java.lang.Override + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } + } + /** + *
+   * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < notifications_.size(); i++) { + output.writeMessage(1, notifications_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cacheableCursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notifications_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, notifications_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cacheableCursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.NotificationList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.NotificationList other = (com.heroiclabs.nakama.api.NotificationList) obj; + + if (!getNotificationsList() + .equals(other.getNotificationsList())) return false; + if (!getCacheableCursor() + .equals(other.getCacheableCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotificationsCount() > 0) { + hash = (37 * hash) + NOTIFICATIONS_FIELD_NUMBER; + hash = (53 * hash) + getNotificationsList().hashCode(); + } + hash = (37 * hash) + CACHEABLE_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCacheableCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.NotificationList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.NotificationList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.NotificationList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.NotificationList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of zero or more notifications.
+   * 
+ * + * Protobuf type {@code nakama.api.NotificationList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.NotificationList) + com.heroiclabs.nakama.api.NotificationListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_NotificationList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_NotificationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.NotificationList.class, com.heroiclabs.nakama.api.NotificationList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.NotificationList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notificationsBuilder_ == null) { + notifications_ = java.util.Collections.emptyList(); + } else { + notifications_ = null; + notificationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cacheableCursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_NotificationList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.NotificationList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.NotificationList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.NotificationList build() { + com.heroiclabs.nakama.api.NotificationList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.NotificationList buildPartial() { + com.heroiclabs.nakama.api.NotificationList result = new com.heroiclabs.nakama.api.NotificationList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.NotificationList result) { + if (notificationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notifications_ = java.util.Collections.unmodifiableList(notifications_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notifications_ = notifications_; + } else { + result.notifications_ = notificationsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.NotificationList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cacheableCursor_ = cacheableCursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.NotificationList) { + return mergeFrom((com.heroiclabs.nakama.api.NotificationList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.NotificationList other) { + if (other == com.heroiclabs.nakama.api.NotificationList.getDefaultInstance()) return this; + if (notificationsBuilder_ == null) { + if (!other.notifications_.isEmpty()) { + if (notifications_.isEmpty()) { + notifications_ = other.notifications_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotificationsIsMutable(); + notifications_.addAll(other.notifications_); + } + onChanged(); + } + } else { + if (!other.notifications_.isEmpty()) { + if (notificationsBuilder_.isEmpty()) { + notificationsBuilder_.dispose(); + notificationsBuilder_ = null; + notifications_ = other.notifications_; + bitField0_ = (bitField0_ & ~0x00000001); + notificationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getNotificationsFieldBuilder() : null; + } else { + notificationsBuilder_.addAllMessages(other.notifications_); + } + } + } + if (!other.getCacheableCursor().isEmpty()) { + cacheableCursor_ = other.cacheableCursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.Notification m = + input.readMessage( + com.heroiclabs.nakama.api.Notification.parser(), + extensionRegistry); + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.add(m); + } else { + notificationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cacheableCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List notifications_ = + java.util.Collections.emptyList(); + private void ensureNotificationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notifications_ = new java.util.ArrayList(notifications_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Notification, com.heroiclabs.nakama.api.Notification.Builder, com.heroiclabs.nakama.api.NotificationOrBuilder> notificationsBuilder_; + + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public java.util.List getNotificationsList() { + if (notificationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(notifications_); + } else { + return notificationsBuilder_.getMessageList(); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public int getNotificationsCount() { + if (notificationsBuilder_ == null) { + return notifications_.size(); + } else { + return notificationsBuilder_.getCount(); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification getNotifications(int index) { + if (notificationsBuilder_ == null) { + return notifications_.get(index); + } else { + return notificationsBuilder_.getMessage(index); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder setNotifications( + int index, com.heroiclabs.nakama.api.Notification value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotificationsIsMutable(); + notifications_.set(index, value); + onChanged(); + } else { + notificationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder setNotifications( + int index, com.heroiclabs.nakama.api.Notification.Builder builderForValue) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.set(index, builderForValue.build()); + onChanged(); + } else { + notificationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications(com.heroiclabs.nakama.api.Notification value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotificationsIsMutable(); + notifications_.add(value); + onChanged(); + } else { + notificationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications( + int index, com.heroiclabs.nakama.api.Notification value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotificationsIsMutable(); + notifications_.add(index, value); + onChanged(); + } else { + notificationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications( + com.heroiclabs.nakama.api.Notification.Builder builderForValue) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.add(builderForValue.build()); + onChanged(); + } else { + notificationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications( + int index, com.heroiclabs.nakama.api.Notification.Builder builderForValue) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.add(index, builderForValue.build()); + onChanged(); + } else { + notificationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addAllNotifications( + java.lang.Iterable values) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, notifications_); + onChanged(); + } else { + notificationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder clearNotifications() { + if (notificationsBuilder_ == null) { + notifications_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notificationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder removeNotifications(int index) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.remove(index); + onChanged(); + } else { + notificationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification.Builder getNotificationsBuilder( + int index) { + return getNotificationsFieldBuilder().getBuilder(index); + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.NotificationOrBuilder getNotificationsOrBuilder( + int index) { + if (notificationsBuilder_ == null) { + return notifications_.get(index); } else { + return notificationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public java.util.List + getNotificationsOrBuilderList() { + if (notificationsBuilder_ != null) { + return notificationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notifications_); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification.Builder addNotificationsBuilder() { + return getNotificationsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.Notification.getDefaultInstance()); + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification.Builder addNotificationsBuilder( + int index) { + return getNotificationsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.Notification.getDefaultInstance()); + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public java.util.List + getNotificationsBuilderList() { + return getNotificationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Notification, com.heroiclabs.nakama.api.Notification.Builder, com.heroiclabs.nakama.api.NotificationOrBuilder> + getNotificationsFieldBuilder() { + if (notificationsBuilder_ == null) { + notificationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Notification, com.heroiclabs.nakama.api.Notification.Builder, com.heroiclabs.nakama.api.NotificationOrBuilder>( + notifications_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notifications_ = null; + } + return notificationsBuilder_; + } + + private java.lang.Object cacheableCursor_ = ""; + /** + *
+     * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @param value The cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cacheableCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return This builder for chaining. + */ + public Builder clearCacheableCursor() { + cacheableCursor_ = getDefaultInstance().getCacheableCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+     * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @param value The bytes for cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cacheableCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.NotificationList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.NotificationList) + private static final com.heroiclabs.nakama.api.NotificationList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.NotificationList(); + } + + public static com.heroiclabs.nakama.api.NotificationList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotificationList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.NotificationList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/NotificationListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/NotificationListOrBuilder.java new file mode 100644 index 00000000..43d127d3 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/NotificationListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface NotificationListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.NotificationList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + java.util.List + getNotificationsList(); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + com.heroiclabs.nakama.api.Notification getNotifications(int index); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + int getNotificationsCount(); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + java.util.List + getNotificationsOrBuilderList(); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + com.heroiclabs.nakama.api.NotificationOrBuilder getNotificationsOrBuilder( + int index); + + /** + *
+   * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + java.lang.String getCacheableCursor(); + /** + *
+   * Use this cursor to paginate notifications. Cache this to catch up to new notifications.
+   * 
+ * + * string cacheable_cursor = 2 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + com.google.protobuf.ByteString + getCacheableCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/NotificationOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/NotificationOrBuilder.java new file mode 100644 index 00000000..b4a26cd2 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/NotificationOrBuilder.java @@ -0,0 +1,138 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface NotificationOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Notification) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * ID of the Notification.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * ID of the Notification.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Subject of the notification.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The subject. + */ + java.lang.String getSubject(); + /** + *
+   * Subject of the notification.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The bytes for subject. + */ + com.google.protobuf.ByteString + getSubjectBytes(); + + /** + *
+   * Content of the notification in JSON.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The content. + */ + java.lang.String getContent(); + /** + *
+   * Content of the notification in JSON.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + *
+   * Category code for this notification.
+   * 
+ * + * int32 code = 4 [json_name = "code"]; + * @return The code. + */ + int getCode(); + + /** + *
+   * ID of the sender, if a user. Otherwise 'null'.
+   * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @return The senderId. + */ + java.lang.String getSenderId(); + /** + *
+   * ID of the sender, if a user. Otherwise 'null'.
+   * 
+ * + * string sender_id = 5 [json_name = "senderId"]; + * @return The bytes for senderId. + */ + com.google.protobuf.ByteString + getSenderIdBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the notification was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * True if this notification was persisted to the database.
+   * 
+ * + * bool persistent = 7 [json_name = "persistent"]; + * @return The persistent. + */ + boolean getPersistent(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Operator.java b/src/main/java/com/heroiclabs/nakama/api/Operator.java new file mode 100644 index 00000000..89463e53 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Operator.java @@ -0,0 +1,195 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Operator that can be used to override the one set in the leaderboard.
+ * 
+ * + * Protobuf enum {@code nakama.api.Operator} + */ +public enum Operator + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Do not override the leaderboard operator.
+   * 
+ * + * NO_OVERRIDE = 0; + */ + NO_OVERRIDE(0), + /** + *
+   * Override the leaderboard operator with BEST.
+   * 
+ * + * BEST = 1; + */ + BEST(1), + /** + *
+   * Override the leaderboard operator with SET.
+   * 
+ * + * SET = 2; + */ + SET(2), + /** + *
+   * Override the leaderboard operator with INCREMENT.
+   * 
+ * + * INCREMENT = 3; + */ + INCREMENT(3), + /** + *
+   * Override the leaderboard operator with DECREMENT.
+   * 
+ * + * DECREMENT = 4; + */ + DECREMENT(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Operator.class.getName()); + } + /** + *
+   * Do not override the leaderboard operator.
+   * 
+ * + * NO_OVERRIDE = 0; + */ + public static final int NO_OVERRIDE_VALUE = 0; + /** + *
+   * Override the leaderboard operator with BEST.
+   * 
+ * + * BEST = 1; + */ + public static final int BEST_VALUE = 1; + /** + *
+   * Override the leaderboard operator with SET.
+   * 
+ * + * SET = 2; + */ + public static final int SET_VALUE = 2; + /** + *
+   * Override the leaderboard operator with INCREMENT.
+   * 
+ * + * INCREMENT = 3; + */ + public static final int INCREMENT_VALUE = 3; + /** + *
+   * Override the leaderboard operator with DECREMENT.
+   * 
+ * + * DECREMENT = 4; + */ + public static final int DECREMENT_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Operator valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Operator forNumber(int value) { + switch (value) { + case 0: return NO_OVERRIDE; + case 1: return BEST; + case 2: return SET; + case 3: return INCREMENT; + case 4: return DECREMENT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Operator> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Operator findValueByNumber(int number) { + return Operator.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.getDescriptor().getEnumTypes().get(2); + } + + private static final Operator[] VALUES = values(); + + public static Operator valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Operator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.api.Operator) +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequest.java b/src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequest.java new file mode 100644 index 00000000..74d7ef7e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Promote a set of users in a group to the next role up.
+ * 
+ * + * Protobuf type {@code nakama.api.PromoteGroupUsersRequest} + */ +public final class PromoteGroupUsersRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.PromoteGroupUsersRequest) + PromoteGroupUsersRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PromoteGroupUsersRequest.class.getName()); + } + // Use PromoteGroupUsersRequest.newBuilder() to construct. + private PromoteGroupUsersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PromoteGroupUsersRequest() { + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PromoteGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PromoteGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.PromoteGroupUsersRequest.class, com.heroiclabs.nakama.api.PromoteGroupUsersRequest.Builder.class); + } + + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The group ID to promote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The group ID to promote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + return userIds_; + } + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + for (int i = 0; i < userIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, userIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + { + int dataSize = 0; + for (int i = 0; i < userIds_.size(); i++) { + dataSize += computeStringSizeNoTag(userIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.PromoteGroupUsersRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.PromoteGroupUsersRequest other = (com.heroiclabs.nakama.api.PromoteGroupUsersRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdsList() + .equals(other.getUserIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (getUserIdsCount() > 0) { + hash = (37 * hash) + USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUserIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.PromoteGroupUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Promote a set of users in a group to the next role up.
+   * 
+ * + * Protobuf type {@code nakama.api.PromoteGroupUsersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.PromoteGroupUsersRequest) + com.heroiclabs.nakama.api.PromoteGroupUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PromoteGroupUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PromoteGroupUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.PromoteGroupUsersRequest.class, com.heroiclabs.nakama.api.PromoteGroupUsersRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.PromoteGroupUsersRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PromoteGroupUsersRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PromoteGroupUsersRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.PromoteGroupUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PromoteGroupUsersRequest build() { + com.heroiclabs.nakama.api.PromoteGroupUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PromoteGroupUsersRequest buildPartial() { + com.heroiclabs.nakama.api.PromoteGroupUsersRequest result = new com.heroiclabs.nakama.api.PromoteGroupUsersRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.PromoteGroupUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + userIds_.makeImmutable(); + result.userIds_ = userIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.PromoteGroupUsersRequest) { + return mergeFrom((com.heroiclabs.nakama.api.PromoteGroupUsersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.PromoteGroupUsersRequest other) { + if (other == com.heroiclabs.nakama.api.PromoteGroupUsersRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.userIds_.isEmpty()) { + if (userIds_.isEmpty()) { + userIds_ = other.userIds_; + bitField0_ |= 0x00000002; + } else { + ensureUserIdsIsMutable(); + userIds_.addAll(other.userIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserIdsIsMutable(); + userIds_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The group ID to promote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The group ID to promote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The group ID to promote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The group ID to promote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The group ID to promote in.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUserIdsIsMutable() { + if (!userIds_.isModifiable()) { + userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + userIds_.makeImmutable(); + return userIds_; + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index to set the value at. + * @param value The userIds to set. + * @return This builder for chaining. + */ + public Builder setUserIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param values The userIds to add. + * @return This builder for chaining. + */ + public Builder addAllUserIds( + java.lang.Iterable values) { + ensureUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return This builder for chaining. + */ + public Builder clearUserIds() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * The users to promote.
+     * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param value The bytes of the userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.PromoteGroupUsersRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.PromoteGroupUsersRequest) + private static final com.heroiclabs.nakama.api.PromoteGroupUsersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.PromoteGroupUsersRequest(); + } + + public static com.heroiclabs.nakama.api.PromoteGroupUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromoteGroupUsersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PromoteGroupUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequestOrBuilder.java new file mode 100644 index 00000000..1a42b640 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/PromoteGroupUsersRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface PromoteGroupUsersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.PromoteGroupUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The group ID to promote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The group ID to promote in.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + java.util.List + getUserIdsList(); + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @return The count of userIds. + */ + int getUserIdsCount(); + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + java.lang.String getUserIds(int index); + /** + *
+   * The users to promote.
+   * 
+ * + * repeated string user_ids = 2 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + com.google.protobuf.ByteString + getUserIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/PurchaseList.java b/src/main/java/com/heroiclabs/nakama/api/PurchaseList.java new file mode 100644 index 00000000..de4ede97 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/PurchaseList.java @@ -0,0 +1,1147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of validated purchases stored by Nakama.
+ * 
+ * + * Protobuf type {@code nakama.api.PurchaseList} + */ +public final class PurchaseList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.PurchaseList) + PurchaseListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PurchaseList.class.getName()); + } + // Use PurchaseList.newBuilder() to construct. + private PurchaseList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PurchaseList() { + validatedPurchases_ = java.util.Collections.emptyList(); + cursor_ = ""; + prevCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PurchaseList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PurchaseList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.PurchaseList.class, com.heroiclabs.nakama.api.PurchaseList.Builder.class); + } + + public static final int VALIDATED_PURCHASES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List validatedPurchases_; + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public java.util.List getValidatedPurchasesList() { + return validatedPurchases_; + } + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public java.util.List + getValidatedPurchasesOrBuilderList() { + return validatedPurchases_; + } + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public int getValidatedPurchasesCount() { + return validatedPurchases_.size(); + } + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchase getValidatedPurchases(int index) { + return validatedPurchases_.get(index); + } + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder getValidatedPurchasesOrBuilder( + int index) { + return validatedPurchases_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREV_CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object prevCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + @java.lang.Override + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < validatedPurchases_.size(); i++) { + output.writeMessage(1, validatedPurchases_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, prevCursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < validatedPurchases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, validatedPurchases_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, prevCursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.PurchaseList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.PurchaseList other = (com.heroiclabs.nakama.api.PurchaseList) obj; + + if (!getValidatedPurchasesList() + .equals(other.getValidatedPurchasesList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getPrevCursor() + .equals(other.getPrevCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValidatedPurchasesCount() > 0) { + hash = (37 * hash) + VALIDATED_PURCHASES_FIELD_NUMBER; + hash = (53 * hash) + getValidatedPurchasesList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (37 * hash) + PREV_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getPrevCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.PurchaseList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.PurchaseList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.PurchaseList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.PurchaseList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of validated purchases stored by Nakama.
+   * 
+ * + * Protobuf type {@code nakama.api.PurchaseList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.PurchaseList) + com.heroiclabs.nakama.api.PurchaseListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PurchaseList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PurchaseList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.PurchaseList.class, com.heroiclabs.nakama.api.PurchaseList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.PurchaseList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (validatedPurchasesBuilder_ == null) { + validatedPurchases_ = java.util.Collections.emptyList(); + } else { + validatedPurchases_ = null; + validatedPurchasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + prevCursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_PurchaseList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PurchaseList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.PurchaseList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PurchaseList build() { + com.heroiclabs.nakama.api.PurchaseList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PurchaseList buildPartial() { + com.heroiclabs.nakama.api.PurchaseList result = new com.heroiclabs.nakama.api.PurchaseList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.PurchaseList result) { + if (validatedPurchasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + validatedPurchases_ = java.util.Collections.unmodifiableList(validatedPurchases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.validatedPurchases_ = validatedPurchases_; + } else { + result.validatedPurchases_ = validatedPurchasesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.PurchaseList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.prevCursor_ = prevCursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.PurchaseList) { + return mergeFrom((com.heroiclabs.nakama.api.PurchaseList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.PurchaseList other) { + if (other == com.heroiclabs.nakama.api.PurchaseList.getDefaultInstance()) return this; + if (validatedPurchasesBuilder_ == null) { + if (!other.validatedPurchases_.isEmpty()) { + if (validatedPurchases_.isEmpty()) { + validatedPurchases_ = other.validatedPurchases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.addAll(other.validatedPurchases_); + } + onChanged(); + } + } else { + if (!other.validatedPurchases_.isEmpty()) { + if (validatedPurchasesBuilder_.isEmpty()) { + validatedPurchasesBuilder_.dispose(); + validatedPurchasesBuilder_ = null; + validatedPurchases_ = other.validatedPurchases_; + bitField0_ = (bitField0_ & ~0x00000001); + validatedPurchasesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValidatedPurchasesFieldBuilder() : null; + } else { + validatedPurchasesBuilder_.addAllMessages(other.validatedPurchases_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPrevCursor().isEmpty()) { + prevCursor_ = other.prevCursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.ValidatedPurchase m = + input.readMessage( + com.heroiclabs.nakama.api.ValidatedPurchase.parser(), + extensionRegistry); + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(m); + } else { + validatedPurchasesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + prevCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List validatedPurchases_ = + java.util.Collections.emptyList(); + private void ensureValidatedPurchasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + validatedPurchases_ = new java.util.ArrayList(validatedPurchases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedPurchase, com.heroiclabs.nakama.api.ValidatedPurchase.Builder, com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder> validatedPurchasesBuilder_; + + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public java.util.List getValidatedPurchasesList() { + if (validatedPurchasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(validatedPurchases_); + } else { + return validatedPurchasesBuilder_.getMessageList(); + } + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public int getValidatedPurchasesCount() { + if (validatedPurchasesBuilder_ == null) { + return validatedPurchases_.size(); + } else { + return validatedPurchasesBuilder_.getCount(); + } + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase getValidatedPurchases(int index) { + if (validatedPurchasesBuilder_ == null) { + return validatedPurchases_.get(index); + } else { + return validatedPurchasesBuilder_.getMessage(index); + } + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder setValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase value) { + if (validatedPurchasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.set(index, value); + onChanged(); + } else { + validatedPurchasesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder setValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase.Builder builderForValue) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.set(index, builderForValue.build()); + onChanged(); + } else { + validatedPurchasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases(com.heroiclabs.nakama.api.ValidatedPurchase value) { + if (validatedPurchasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(value); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase value) { + if (validatedPurchasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(index, value); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases( + com.heroiclabs.nakama.api.ValidatedPurchase.Builder builderForValue) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(builderForValue.build()); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase.Builder builderForValue) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(index, builderForValue.build()); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addAllValidatedPurchases( + java.lang.Iterable values) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, validatedPurchases_); + onChanged(); + } else { + validatedPurchasesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder clearValidatedPurchases() { + if (validatedPurchasesBuilder_ == null) { + validatedPurchases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + validatedPurchasesBuilder_.clear(); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder removeValidatedPurchases(int index) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.remove(index); + onChanged(); + } else { + validatedPurchasesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase.Builder getValidatedPurchasesBuilder( + int index) { + return getValidatedPurchasesFieldBuilder().getBuilder(index); + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder getValidatedPurchasesOrBuilder( + int index) { + if (validatedPurchasesBuilder_ == null) { + return validatedPurchases_.get(index); } else { + return validatedPurchasesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public java.util.List + getValidatedPurchasesOrBuilderList() { + if (validatedPurchasesBuilder_ != null) { + return validatedPurchasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validatedPurchases_); + } + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase.Builder addValidatedPurchasesBuilder() { + return getValidatedPurchasesFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.ValidatedPurchase.getDefaultInstance()); + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase.Builder addValidatedPurchasesBuilder( + int index) { + return getValidatedPurchasesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.ValidatedPurchase.getDefaultInstance()); + } + /** + *
+     * Stored validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public java.util.List + getValidatedPurchasesBuilderList() { + return getValidatedPurchasesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedPurchase, com.heroiclabs.nakama.api.ValidatedPurchase.Builder, com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder> + getValidatedPurchasesFieldBuilder() { + if (validatedPurchasesBuilder_ == null) { + validatedPurchasesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedPurchase, com.heroiclabs.nakama.api.ValidatedPurchase.Builder, com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder>( + validatedPurchases_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + validatedPurchases_ = null; + } + return validatedPurchasesBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object prevCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return This builder for chaining. + */ + public Builder clearPrevCursor() { + prevCursor_ = getDefaultInstance().getPrevCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The bytes for prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.PurchaseList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.PurchaseList) + private static final com.heroiclabs.nakama.api.PurchaseList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.PurchaseList(); + } + + public static com.heroiclabs.nakama.api.PurchaseList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurchaseList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.PurchaseList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/PurchaseListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/PurchaseListOrBuilder.java new file mode 100644 index 00000000..cd86037c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/PurchaseListOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface PurchaseListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.PurchaseList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + java.util.List + getValidatedPurchasesList(); + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + com.heroiclabs.nakama.api.ValidatedPurchase getValidatedPurchases(int index); + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + int getValidatedPurchasesCount(); + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + java.util.List + getValidatedPurchasesOrBuilderList(); + /** + *
+   * Stored validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder getValidatedPurchasesOrBuilder( + int index); + + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); + + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + java.lang.String getPrevCursor(); + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + com.google.protobuf.ByteString + getPrevCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectId.java b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectId.java new file mode 100644 index 00000000..2101b271 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectId.java @@ -0,0 +1,865 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Storage objects to get.
+ * 
+ * + * Protobuf type {@code nakama.api.ReadStorageObjectId} + */ +public final class ReadStorageObjectId extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ReadStorageObjectId) + ReadStorageObjectIdOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ReadStorageObjectId.class.getName()); + } + // Use ReadStorageObjectId.newBuilder() to construct. + private ReadStorageObjectId(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ReadStorageObjectId() { + collection_ = ""; + key_ = ""; + userId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ReadStorageObjectId.class, com.heroiclabs.nakama.api.ReadStorageObjectId.Builder.class); + } + + public static final int COLLECTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, userId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, userId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ReadStorageObjectId)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ReadStorageObjectId other = (com.heroiclabs.nakama.api.ReadStorageObjectId) obj; + + if (!getCollection() + .equals(other.getCollection())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getUserId() + .equals(other.getUserId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ReadStorageObjectId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Storage objects to get.
+   * 
+ * + * Protobuf type {@code nakama.api.ReadStorageObjectId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ReadStorageObjectId) + com.heroiclabs.nakama.api.ReadStorageObjectIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ReadStorageObjectId.class, com.heroiclabs.nakama.api.ReadStorageObjectId.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ReadStorageObjectId.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + collection_ = ""; + key_ = ""; + userId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectId_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectId getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ReadStorageObjectId.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectId build() { + com.heroiclabs.nakama.api.ReadStorageObjectId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectId buildPartial() { + com.heroiclabs.nakama.api.ReadStorageObjectId result = new com.heroiclabs.nakama.api.ReadStorageObjectId(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ReadStorageObjectId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userId_ = userId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ReadStorageObjectId) { + return mergeFrom((com.heroiclabs.nakama.api.ReadStorageObjectId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ReadStorageObjectId other) { + if (other == com.heroiclabs.nakama.api.ReadStorageObjectId.getDefaultInstance()) return this; + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object collection_ = ""; + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userId_ = ""; + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ReadStorageObjectId) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ReadStorageObjectId) + private static final com.heroiclabs.nakama.api.ReadStorageObjectId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ReadStorageObjectId(); + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadStorageObjectId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectIdOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectIdOrBuilder.java new file mode 100644 index 00000000..2d61b01b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectIdOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ReadStorageObjectIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ReadStorageObjectId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + java.lang.String getCollection(); + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequest.java b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequest.java new file mode 100644 index 00000000..01811397 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequest.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Batch get storage objects.
+ * 
+ * + * Protobuf type {@code nakama.api.ReadStorageObjectsRequest} + */ +public final class ReadStorageObjectsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ReadStorageObjectsRequest) + ReadStorageObjectsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ReadStorageObjectsRequest.class.getName()); + } + // Use ReadStorageObjectsRequest.newBuilder() to construct. + private ReadStorageObjectsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ReadStorageObjectsRequest() { + objectIds_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ReadStorageObjectsRequest.class, com.heroiclabs.nakama.api.ReadStorageObjectsRequest.Builder.class); + } + + public static final int OBJECT_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List objectIds_; + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public java.util.List getObjectIdsList() { + return objectIds_; + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public java.util.List + getObjectIdsOrBuilderList() { + return objectIds_; + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public int getObjectIdsCount() { + return objectIds_.size(); + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectId getObjectIds(int index) { + return objectIds_.get(index); + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectIdOrBuilder getObjectIdsOrBuilder( + int index) { + return objectIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < objectIds_.size(); i++) { + output.writeMessage(1, objectIds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < objectIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, objectIds_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ReadStorageObjectsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ReadStorageObjectsRequest other = (com.heroiclabs.nakama.api.ReadStorageObjectsRequest) obj; + + if (!getObjectIdsList() + .equals(other.getObjectIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getObjectIdsCount() > 0) { + hash = (37 * hash) + OBJECT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getObjectIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ReadStorageObjectsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Batch get storage objects.
+   * 
+ * + * Protobuf type {@code nakama.api.ReadStorageObjectsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ReadStorageObjectsRequest) + com.heroiclabs.nakama.api.ReadStorageObjectsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ReadStorageObjectsRequest.class, com.heroiclabs.nakama.api.ReadStorageObjectsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ReadStorageObjectsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (objectIdsBuilder_ == null) { + objectIds_ = java.util.Collections.emptyList(); + } else { + objectIds_ = null; + objectIdsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ReadStorageObjectsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ReadStorageObjectsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectsRequest build() { + com.heroiclabs.nakama.api.ReadStorageObjectsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectsRequest buildPartial() { + com.heroiclabs.nakama.api.ReadStorageObjectsRequest result = new com.heroiclabs.nakama.api.ReadStorageObjectsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.ReadStorageObjectsRequest result) { + if (objectIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + objectIds_ = java.util.Collections.unmodifiableList(objectIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objectIds_ = objectIds_; + } else { + result.objectIds_ = objectIdsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.ReadStorageObjectsRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ReadStorageObjectsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ReadStorageObjectsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ReadStorageObjectsRequest other) { + if (other == com.heroiclabs.nakama.api.ReadStorageObjectsRequest.getDefaultInstance()) return this; + if (objectIdsBuilder_ == null) { + if (!other.objectIds_.isEmpty()) { + if (objectIds_.isEmpty()) { + objectIds_ = other.objectIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectIdsIsMutable(); + objectIds_.addAll(other.objectIds_); + } + onChanged(); + } + } else { + if (!other.objectIds_.isEmpty()) { + if (objectIdsBuilder_.isEmpty()) { + objectIdsBuilder_.dispose(); + objectIdsBuilder_ = null; + objectIds_ = other.objectIds_; + bitField0_ = (bitField0_ & ~0x00000001); + objectIdsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getObjectIdsFieldBuilder() : null; + } else { + objectIdsBuilder_.addAllMessages(other.objectIds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.ReadStorageObjectId m = + input.readMessage( + com.heroiclabs.nakama.api.ReadStorageObjectId.parser(), + extensionRegistry); + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.add(m); + } else { + objectIdsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List objectIds_ = + java.util.Collections.emptyList(); + private void ensureObjectIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objectIds_ = new java.util.ArrayList(objectIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ReadStorageObjectId, com.heroiclabs.nakama.api.ReadStorageObjectId.Builder, com.heroiclabs.nakama.api.ReadStorageObjectIdOrBuilder> objectIdsBuilder_; + + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public java.util.List getObjectIdsList() { + if (objectIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectIds_); + } else { + return objectIdsBuilder_.getMessageList(); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public int getObjectIdsCount() { + if (objectIdsBuilder_ == null) { + return objectIds_.size(); + } else { + return objectIdsBuilder_.getCount(); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.ReadStorageObjectId getObjectIds(int index) { + if (objectIdsBuilder_ == null) { + return objectIds_.get(index); + } else { + return objectIdsBuilder_.getMessage(index); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder setObjectIds( + int index, com.heroiclabs.nakama.api.ReadStorageObjectId value) { + if (objectIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectIdsIsMutable(); + objectIds_.set(index, value); + onChanged(); + } else { + objectIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder setObjectIds( + int index, com.heroiclabs.nakama.api.ReadStorageObjectId.Builder builderForValue) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.set(index, builderForValue.build()); + onChanged(); + } else { + objectIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds(com.heroiclabs.nakama.api.ReadStorageObjectId value) { + if (objectIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectIdsIsMutable(); + objectIds_.add(value); + onChanged(); + } else { + objectIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds( + int index, com.heroiclabs.nakama.api.ReadStorageObjectId value) { + if (objectIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectIdsIsMutable(); + objectIds_.add(index, value); + onChanged(); + } else { + objectIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds( + com.heroiclabs.nakama.api.ReadStorageObjectId.Builder builderForValue) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.add(builderForValue.build()); + onChanged(); + } else { + objectIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addObjectIds( + int index, com.heroiclabs.nakama.api.ReadStorageObjectId.Builder builderForValue) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.add(index, builderForValue.build()); + onChanged(); + } else { + objectIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder addAllObjectIds( + java.lang.Iterable values) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectIds_); + onChanged(); + } else { + objectIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder clearObjectIds() { + if (objectIdsBuilder_ == null) { + objectIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + objectIdsBuilder_.clear(); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public Builder removeObjectIds(int index) { + if (objectIdsBuilder_ == null) { + ensureObjectIdsIsMutable(); + objectIds_.remove(index); + onChanged(); + } else { + objectIdsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.ReadStorageObjectId.Builder getObjectIdsBuilder( + int index) { + return getObjectIdsFieldBuilder().getBuilder(index); + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.ReadStorageObjectIdOrBuilder getObjectIdsOrBuilder( + int index) { + if (objectIdsBuilder_ == null) { + return objectIds_.get(index); } else { + return objectIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public java.util.List + getObjectIdsOrBuilderList() { + if (objectIdsBuilder_ != null) { + return objectIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectIds_); + } + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.ReadStorageObjectId.Builder addObjectIdsBuilder() { + return getObjectIdsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.ReadStorageObjectId.getDefaultInstance()); + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public com.heroiclabs.nakama.api.ReadStorageObjectId.Builder addObjectIdsBuilder( + int index) { + return getObjectIdsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.ReadStorageObjectId.getDefaultInstance()); + } + /** + *
+     * Batch of storage objects.
+     * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + public java.util.List + getObjectIdsBuilderList() { + return getObjectIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ReadStorageObjectId, com.heroiclabs.nakama.api.ReadStorageObjectId.Builder, com.heroiclabs.nakama.api.ReadStorageObjectIdOrBuilder> + getObjectIdsFieldBuilder() { + if (objectIdsBuilder_ == null) { + objectIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ReadStorageObjectId, com.heroiclabs.nakama.api.ReadStorageObjectId.Builder, com.heroiclabs.nakama.api.ReadStorageObjectIdOrBuilder>( + objectIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + objectIds_ = null; + } + return objectIdsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ReadStorageObjectsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ReadStorageObjectsRequest) + private static final com.heroiclabs.nakama.api.ReadStorageObjectsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ReadStorageObjectsRequest(); + } + + public static com.heroiclabs.nakama.api.ReadStorageObjectsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadStorageObjectsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ReadStorageObjectsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequestOrBuilder.java new file mode 100644 index 00000000..8652be3c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ReadStorageObjectsRequestOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ReadStorageObjectsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ReadStorageObjectsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + java.util.List + getObjectIdsList(); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + com.heroiclabs.nakama.api.ReadStorageObjectId getObjectIds(int index); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + int getObjectIdsCount(); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + java.util.List + getObjectIdsOrBuilderList(); + /** + *
+   * Batch of storage objects.
+   * 
+ * + * repeated .nakama.api.ReadStorageObjectId object_ids = 1 [json_name = "objectIds"]; + */ + com.heroiclabs.nakama.api.ReadStorageObjectIdOrBuilder getObjectIdsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Rpc.java b/src/main/java/com/heroiclabs/nakama/api/Rpc.java new file mode 100644 index 00000000..ea94fc15 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Rpc.java @@ -0,0 +1,865 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Execute an Lua function on the server.
+ * 
+ * + * Protobuf type {@code nakama.api.Rpc} + */ +public final class Rpc extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Rpc) + RpcOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Rpc.class.getName()); + } + // Use Rpc.newBuilder() to construct. + private Rpc(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Rpc() { + id_ = ""; + payload_ = ""; + httpKey_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Rpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Rpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Rpc.class, com.heroiclabs.nakama.api.Rpc.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The identifier of the function.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The identifier of the function.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object payload_ = ""; + /** + *
+   * The payload of the function which must be a JSON object.
+   * 
+ * + * string payload = 2 [json_name = "payload"]; + * @return The payload. + */ + @java.lang.Override + public java.lang.String getPayload() { + java.lang.Object ref = payload_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payload_ = s; + return s; + } + } + /** + *
+   * The payload of the function which must be a JSON object.
+   * 
+ * + * string payload = 2 [json_name = "payload"]; + * @return The bytes for payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadBytes() { + java.lang.Object ref = payload_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payload_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTP_KEY_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object httpKey_ = ""; + /** + *
+   * The authentication key used when executed as a non-client HTTP request.
+   * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @return The httpKey. + */ + @java.lang.Override + public java.lang.String getHttpKey() { + java.lang.Object ref = httpKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + httpKey_ = s; + return s; + } + } + /** + *
+   * The authentication key used when executed as a non-client HTTP request.
+   * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @return The bytes for httpKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHttpKeyBytes() { + java.lang.Object ref = httpKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + httpKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(payload_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, payload_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(httpKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, httpKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(payload_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, payload_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(httpKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, httpKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Rpc)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Rpc other = (com.heroiclabs.nakama.api.Rpc) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (!getHttpKey() + .equals(other.getHttpKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (37 * hash) + HTTP_KEY_FIELD_NUMBER; + hash = (53 * hash) + getHttpKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Rpc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Rpc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Rpc parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Rpc parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Rpc prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Execute an Lua function on the server.
+   * 
+ * + * Protobuf type {@code nakama.api.Rpc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Rpc) + com.heroiclabs.nakama.api.RpcOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Rpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Rpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Rpc.class, com.heroiclabs.nakama.api.Rpc.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Rpc.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + payload_ = ""; + httpKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Rpc_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Rpc getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Rpc.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Rpc build() { + com.heroiclabs.nakama.api.Rpc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Rpc buildPartial() { + com.heroiclabs.nakama.api.Rpc result = new com.heroiclabs.nakama.api.Rpc(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Rpc result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payload_ = payload_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.httpKey_ = httpKey_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Rpc) { + return mergeFrom((com.heroiclabs.nakama.api.Rpc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Rpc other) { + if (other == com.heroiclabs.nakama.api.Rpc.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPayload().isEmpty()) { + payload_ = other.payload_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getHttpKey().isEmpty()) { + httpKey_ = other.httpKey_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + payload_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + httpKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The identifier of the function.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifier of the function.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifier of the function.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The identifier of the function.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The identifier of the function.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object payload_ = ""; + /** + *
+     * The payload of the function which must be a JSON object.
+     * 
+ * + * string payload = 2 [json_name = "payload"]; + * @return The payload. + */ + public java.lang.String getPayload() { + java.lang.Object ref = payload_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payload_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The payload of the function which must be a JSON object.
+     * 
+ * + * string payload = 2 [json_name = "payload"]; + * @return The bytes for payload. + */ + public com.google.protobuf.ByteString + getPayloadBytes() { + java.lang.Object ref = payload_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payload_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The payload of the function which must be a JSON object.
+     * 
+ * + * string payload = 2 [json_name = "payload"]; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The payload of the function which must be a JSON object.
+     * 
+ * + * string payload = 2 [json_name = "payload"]; + * @return This builder for chaining. + */ + public Builder clearPayload() { + payload_ = getDefaultInstance().getPayload(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The payload of the function which must be a JSON object.
+     * 
+ * + * string payload = 2 [json_name = "payload"]; + * @param value The bytes for payload to set. + * @return This builder for chaining. + */ + public Builder setPayloadBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + payload_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object httpKey_ = ""; + /** + *
+     * The authentication key used when executed as a non-client HTTP request.
+     * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @return The httpKey. + */ + public java.lang.String getHttpKey() { + java.lang.Object ref = httpKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + httpKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The authentication key used when executed as a non-client HTTP request.
+     * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @return The bytes for httpKey. + */ + public com.google.protobuf.ByteString + getHttpKeyBytes() { + java.lang.Object ref = httpKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + httpKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The authentication key used when executed as a non-client HTTP request.
+     * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @param value The httpKey to set. + * @return This builder for chaining. + */ + public Builder setHttpKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + httpKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The authentication key used when executed as a non-client HTTP request.
+     * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @return This builder for chaining. + */ + public Builder clearHttpKey() { + httpKey_ = getDefaultInstance().getHttpKey(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The authentication key used when executed as a non-client HTTP request.
+     * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @param value The bytes for httpKey to set. + * @return This builder for chaining. + */ + public Builder setHttpKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + httpKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Rpc) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Rpc) + private static final com.heroiclabs.nakama.api.Rpc DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Rpc(); + } + + public static com.heroiclabs.nakama.api.Rpc getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Rpc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Rpc getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/RpcOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/RpcOrBuilder.java new file mode 100644 index 00000000..f9b936d7 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/RpcOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface RpcOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Rpc) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The identifier of the function.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The identifier of the function.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The payload of the function which must be a JSON object.
+   * 
+ * + * string payload = 2 [json_name = "payload"]; + * @return The payload. + */ + java.lang.String getPayload(); + /** + *
+   * The payload of the function which must be a JSON object.
+   * 
+ * + * string payload = 2 [json_name = "payload"]; + * @return The bytes for payload. + */ + com.google.protobuf.ByteString + getPayloadBytes(); + + /** + *
+   * The authentication key used when executed as a non-client HTTP request.
+   * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @return The httpKey. + */ + java.lang.String getHttpKey(); + /** + *
+   * The authentication key used when executed as a non-client HTTP request.
+   * 
+ * + * string http_key = 3 [json_name = "httpKey"]; + * @return The bytes for httpKey. + */ + com.google.protobuf.ByteString + getHttpKeyBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Session.java b/src/main/java/com/heroiclabs/nakama/api/Session.java new file mode 100644 index 00000000..0245b813 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Session.java @@ -0,0 +1,784 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A user's session used to authenticate messages.
+ * 
+ * + * Protobuf type {@code nakama.api.Session} + */ +public final class Session extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Session) + SessionOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Session.class.getName()); + } + // Use Session.newBuilder() to construct. + private Session(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Session() { + token_ = ""; + refreshToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Session_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Session_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Session.class, com.heroiclabs.nakama.api.Session.Builder.class); + } + + public static final int CREATED_FIELD_NUMBER = 1; + private boolean created_ = false; + /** + *
+   * True if the corresponding account was just created, false otherwise.
+   * 
+ * + * bool created = 1 [json_name = "created"]; + * @return The created. + */ + @java.lang.Override + public boolean getCreated() { + return created_; + } + + public static final int TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * Authentication credentials.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * Authentication credentials.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFRESH_TOKEN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object refreshToken_ = ""; + /** + *
+   * Refresh token that can be used for session token renewal.
+   * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + @java.lang.Override + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } + } + /** + *
+   * Refresh token that can be used for session token renewal.
+   * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (created_ != false) { + output.writeBool(1, created_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, refreshToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (created_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, created_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, refreshToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Session)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Session other = (com.heroiclabs.nakama.api.Session) obj; + + if (getCreated() + != other.getCreated()) return false; + if (!getToken() + .equals(other.getToken())) return false; + if (!getRefreshToken() + .equals(other.getRefreshToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CREATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCreated()); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (37 * hash) + REFRESH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRefreshToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Session parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Session parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Session parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Session parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Session parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Session parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Session parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Session parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Session parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Session parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Session parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Session parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Session prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A user's session used to authenticate messages.
+   * 
+ * + * Protobuf type {@code nakama.api.Session} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Session) + com.heroiclabs.nakama.api.SessionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Session_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Session_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Session.class, com.heroiclabs.nakama.api.Session.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Session.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + created_ = false; + token_ = ""; + refreshToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Session_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Session getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Session.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Session build() { + com.heroiclabs.nakama.api.Session result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Session buildPartial() { + com.heroiclabs.nakama.api.Session result = new com.heroiclabs.nakama.api.Session(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Session result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.created_ = created_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.refreshToken_ = refreshToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Session) { + return mergeFrom((com.heroiclabs.nakama.api.Session)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Session other) { + if (other == com.heroiclabs.nakama.api.Session.getDefaultInstance()) return this; + if (other.getCreated() != false) { + setCreated(other.getCreated()); + } + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRefreshToken().isEmpty()) { + refreshToken_ = other.refreshToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + created_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + refreshToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean created_ ; + /** + *
+     * True if the corresponding account was just created, false otherwise.
+     * 
+ * + * bool created = 1 [json_name = "created"]; + * @return The created. + */ + @java.lang.Override + public boolean getCreated() { + return created_; + } + /** + *
+     * True if the corresponding account was just created, false otherwise.
+     * 
+ * + * bool created = 1 [json_name = "created"]; + * @param value The created to set. + * @return This builder for chaining. + */ + public Builder setCreated(boolean value) { + + created_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * True if the corresponding account was just created, false otherwise.
+     * 
+ * + * bool created = 1 [json_name = "created"]; + * @return This builder for chaining. + */ + public Builder clearCreated() { + bitField0_ = (bitField0_ & ~0x00000001); + created_ = false; + onChanged(); + return this; + } + + private java.lang.Object token_ = ""; + /** + *
+     * Authentication credentials.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Authentication credentials.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Authentication credentials.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Authentication credentials.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Authentication credentials.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object refreshToken_ = ""; + /** + *
+     * Refresh token that can be used for session token renewal.
+     * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Refresh token that can be used for session token renewal.
+     * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Refresh token that can be used for session token renewal.
+     * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @param value The refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refreshToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Refresh token that can be used for session token renewal.
+     * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @return This builder for chaining. + */ + public Builder clearRefreshToken() { + refreshToken_ = getDefaultInstance().getRefreshToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Refresh token that can be used for session token renewal.
+     * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @param value The bytes for refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refreshToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Session) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Session) + private static final com.heroiclabs.nakama.api.Session DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Session(); + } + + public static com.heroiclabs.nakama.api.Session getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Session parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Session getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequest.java b/src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequest.java new file mode 100644 index 00000000..d35de6d4 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequest.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+ * 
+ * + * Protobuf type {@code nakama.api.SessionLogoutRequest} + */ +public final class SessionLogoutRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.SessionLogoutRequest) + SessionLogoutRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SessionLogoutRequest.class.getName()); + } + // Use SessionLogoutRequest.newBuilder() to construct. + private SessionLogoutRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SessionLogoutRequest() { + token_ = ""; + refreshToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionLogoutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionLogoutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.SessionLogoutRequest.class, com.heroiclabs.nakama.api.SessionLogoutRequest.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFRESH_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object refreshToken_ = ""; + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + @java.lang.Override + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } + } + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, refreshToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, refreshToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.SessionLogoutRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.SessionLogoutRequest other = (com.heroiclabs.nakama.api.SessionLogoutRequest) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!getRefreshToken() + .equals(other.getRefreshToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (37 * hash) + REFRESH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRefreshToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.SessionLogoutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.SessionLogoutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+   * 
+ * + * Protobuf type {@code nakama.api.SessionLogoutRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.SessionLogoutRequest) + com.heroiclabs.nakama.api.SessionLogoutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionLogoutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionLogoutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.SessionLogoutRequest.class, com.heroiclabs.nakama.api.SessionLogoutRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.SessionLogoutRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + refreshToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionLogoutRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionLogoutRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.SessionLogoutRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionLogoutRequest build() { + com.heroiclabs.nakama.api.SessionLogoutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionLogoutRequest buildPartial() { + com.heroiclabs.nakama.api.SessionLogoutRequest result = new com.heroiclabs.nakama.api.SessionLogoutRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.SessionLogoutRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.refreshToken_ = refreshToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.SessionLogoutRequest) { + return mergeFrom((com.heroiclabs.nakama.api.SessionLogoutRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.SessionLogoutRequest other) { + if (other == com.heroiclabs.nakama.api.SessionLogoutRequest.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRefreshToken().isEmpty()) { + refreshToken_ = other.refreshToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + refreshToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object refreshToken_ = ""; + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @param value The refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refreshToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return This builder for chaining. + */ + public Builder clearRefreshToken() { + refreshToken_ = getDefaultInstance().getRefreshToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @param value The bytes for refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refreshToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.SessionLogoutRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.SessionLogoutRequest) + private static final com.heroiclabs.nakama.api.SessionLogoutRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.SessionLogoutRequest(); + } + + public static com.heroiclabs.nakama.api.SessionLogoutRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionLogoutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionLogoutRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequestOrBuilder.java new file mode 100644 index 00000000..c211ecef --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/SessionLogoutRequestOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface SessionLogoutRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.SessionLogoutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + java.lang.String getRefreshToken(); + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + com.google.protobuf.ByteString + getRefreshTokenBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/SessionOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/SessionOrBuilder.java new file mode 100644 index 00000000..9787dbf8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/SessionOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface SessionOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Session) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * True if the corresponding account was just created, false otherwise.
+   * 
+ * + * bool created = 1 [json_name = "created"]; + * @return The created. + */ + boolean getCreated(); + + /** + *
+   * Authentication credentials.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * Authentication credentials.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Refresh token that can be used for session token renewal.
+   * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + java.lang.String getRefreshToken(); + /** + *
+   * Refresh token that can be used for session token renewal.
+   * 
+ * + * string refresh_token = 3 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + com.google.protobuf.ByteString + getRefreshTokenBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequest.java b/src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequest.java new file mode 100644 index 00000000..614dba12 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequest.java @@ -0,0 +1,860 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Authenticate against the server with a refresh token.
+ * 
+ * + * Protobuf type {@code nakama.api.SessionRefreshRequest} + */ +public final class SessionRefreshRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.SessionRefreshRequest) + SessionRefreshRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SessionRefreshRequest.class.getName()); + } + // Use SessionRefreshRequest.newBuilder() to construct. + private SessionRefreshRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SessionRefreshRequest() { + token_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionRefreshRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionRefreshRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.SessionRefreshRequest.class, com.heroiclabs.nakama.api.SessionRefreshRequest.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARS_FIELD_NUMBER = 2; + private static final class VarsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionRefreshRequest_VarsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetVars(), + VarsDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + for (java.util.Map.Entry entry + : internalGetVars().getMap().entrySet()) { + com.google.protobuf.MapEntry + vars__ = VarsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, vars__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.SessionRefreshRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.SessionRefreshRequest other = (com.heroiclabs.nakama.api.SessionRefreshRequest) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!internalGetVars().equals( + other.internalGetVars())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (!internalGetVars().getMap().isEmpty()) { + hash = (37 * hash) + VARS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVars().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.SessionRefreshRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.SessionRefreshRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with a refresh token.
+   * 
+ * + * Protobuf type {@code nakama.api.SessionRefreshRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.SessionRefreshRequest) + com.heroiclabs.nakama.api.SessionRefreshRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionRefreshRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableVars(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionRefreshRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.SessionRefreshRequest.class, com.heroiclabs.nakama.api.SessionRefreshRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.SessionRefreshRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + internalGetMutableVars().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SessionRefreshRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionRefreshRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.SessionRefreshRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionRefreshRequest build() { + com.heroiclabs.nakama.api.SessionRefreshRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionRefreshRequest buildPartial() { + com.heroiclabs.nakama.api.SessionRefreshRequest result = new com.heroiclabs.nakama.api.SessionRefreshRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.SessionRefreshRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vars_ = internalGetVars(); + result.vars_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.SessionRefreshRequest) { + return mergeFrom((com.heroiclabs.nakama.api.SessionRefreshRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.SessionRefreshRequest other) { + if (other == com.heroiclabs.nakama.api.SessionRefreshRequest.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableVars().mergeFrom( + other.internalGetVars()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + vars__ = input.readMessage( + VarsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVars().getMutableMap().put( + vars__.getKey(), vars__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> vars_; + private com.google.protobuf.MapField + internalGetVars() { + if (vars_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VarsDefaultEntryHolder.defaultEntry); + } + return vars_; + } + private com.google.protobuf.MapField + internalGetMutableVars() { + if (vars_ == null) { + vars_ = com.google.protobuf.MapField.newMapField( + VarsDefaultEntryHolder.defaultEntry); + } + if (!vars_.isMutable()) { + vars_ = vars_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return vars_; + } + public int getVarsCount() { + return internalGetVars().getMap().size(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public boolean containsVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVars().getMap().containsKey(key); + } + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVars() { + return getVarsMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.util.Map getVarsMap() { + return internalGetVars().getMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + @java.lang.Override + public java.lang.String getVarsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVars().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearVars() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableVars().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder removeVars( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVars().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVars() { + bitField0_ |= 0x00000002; + return internalGetMutableVars().getMutableMap(); + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putVars( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVars().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Extra information that will be bundled in the session token.
+     * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + public Builder putAllVars( + java.util.Map values) { + internalGetMutableVars().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.SessionRefreshRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.SessionRefreshRequest) + private static final com.heroiclabs.nakama.api.SessionRefreshRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.SessionRefreshRequest(); + } + + public static com.heroiclabs.nakama.api.SessionRefreshRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionRefreshRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SessionRefreshRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequestOrBuilder.java new file mode 100644 index 00000000..06d5d469 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/SessionRefreshRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface SessionRefreshRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.SessionRefreshRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * Refresh token.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + int getVarsCount(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + boolean containsVars( + java.lang.String key); + /** + * Use {@link #getVarsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVars(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.util.Map + getVarsMap(); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + /* nullable */ +java.lang.String getVarsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Extra information that will be bundled in the session token.
+   * 
+ * + * map<string, string> vars = 2 [json_name = "vars"]; + */ + java.lang.String getVarsOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObject.java b/src/main/java/com/heroiclabs/nakama/api/StorageObject.java new file mode 100644 index 00000000..4d10374f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObject.java @@ -0,0 +1,1831 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * An object within the storage engine.
+ * 
+ * + * Protobuf type {@code nakama.api.StorageObject} + */ +public final class StorageObject extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.StorageObject) + StorageObjectOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StorageObject.class.getName()); + } + // Use StorageObject.newBuilder() to construct. + private StorageObject(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StorageObject() { + collection_ = ""; + key_ = ""; + userId_ = ""; + value_ = ""; + version_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObject.class, com.heroiclabs.nakama.api.StorageObject.Builder.class); + } + + private int bitField0_; + public static final int COLLECTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_READ_FIELD_NUMBER = 6; + private int permissionRead_ = 0; + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * int32 permission_read = 6 [json_name = "permissionRead"]; + * @return The permissionRead. + */ + @java.lang.Override + public int getPermissionRead() { + return permissionRead_; + } + + public static final int PERMISSION_WRITE_FIELD_NUMBER = 7; + private int permissionWrite_ = 0; + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * int32 permission_write = 7 [json_name = "permissionWrite"]; + * @return The permissionWrite. + */ + @java.lang.Override + public int getPermissionWrite() { + return permissionWrite_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, value_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, version_); + } + if (permissionRead_ != 0) { + output.writeInt32(6, permissionRead_); + } + if (permissionWrite_ != 0) { + output.writeInt32(7, permissionWrite_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, value_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, version_); + } + if (permissionRead_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, permissionRead_); + } + if (permissionWrite_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, permissionWrite_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.StorageObject)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.StorageObject other = (com.heroiclabs.nakama.api.StorageObject) obj; + + if (!getCollection() + .equals(other.getCollection())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getUserId() + .equals(other.getUserId())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (getPermissionRead() + != other.getPermissionRead()) return false; + if (getPermissionWrite() + != other.getPermissionWrite()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + PERMISSION_READ_FIELD_NUMBER; + hash = (53 * hash) + getPermissionRead(); + hash = (37 * hash) + PERMISSION_WRITE_FIELD_NUMBER; + hash = (53 * hash) + getPermissionWrite(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.StorageObject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.StorageObject parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.StorageObject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An object within the storage engine.
+   * 
+ * + * Protobuf type {@code nakama.api.StorageObject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.StorageObject) + com.heroiclabs.nakama.api.StorageObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObject.class, com.heroiclabs.nakama.api.StorageObject.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.StorageObject.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + collection_ = ""; + key_ = ""; + userId_ = ""; + value_ = ""; + version_ = ""; + permissionRead_ = 0; + permissionWrite_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObject_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObject getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.StorageObject.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObject build() { + com.heroiclabs.nakama.api.StorageObject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObject buildPartial() { + com.heroiclabs.nakama.api.StorageObject result = new com.heroiclabs.nakama.api.StorageObject(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.StorageObject result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.permissionRead_ = permissionRead_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.permissionWrite_ = permissionWrite_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.StorageObject) { + return mergeFrom((com.heroiclabs.nakama.api.StorageObject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.StorageObject other) { + if (other == com.heroiclabs.nakama.api.StorageObject.getDefaultInstance()) return this; + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getPermissionRead() != 0) { + setPermissionRead(other.getPermissionRead()); + } + if (other.getPermissionWrite() != 0) { + setPermissionWrite(other.getPermissionWrite()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + permissionRead_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + permissionWrite_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object collection_ = ""; + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userId_ = ""; + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The user owner of the object.
+     * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int permissionRead_ ; + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * int32 permission_read = 6 [json_name = "permissionRead"]; + * @return The permissionRead. + */ + @java.lang.Override + public int getPermissionRead() { + return permissionRead_; + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * int32 permission_read = 6 [json_name = "permissionRead"]; + * @param value The permissionRead to set. + * @return This builder for chaining. + */ + public Builder setPermissionRead(int value) { + + permissionRead_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * int32 permission_read = 6 [json_name = "permissionRead"]; + * @return This builder for chaining. + */ + public Builder clearPermissionRead() { + bitField0_ = (bitField0_ & ~0x00000020); + permissionRead_ = 0; + onChanged(); + return this; + } + + private int permissionWrite_ ; + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * int32 permission_write = 7 [json_name = "permissionWrite"]; + * @return The permissionWrite. + */ + @java.lang.Override + public int getPermissionWrite() { + return permissionWrite_; + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * int32 permission_write = 7 [json_name = "permissionWrite"]; + * @param value The permissionWrite to set. + * @return This builder for chaining. + */ + public Builder setPermissionWrite(int value) { + + permissionWrite_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * int32 permission_write = 7 [json_name = "permissionWrite"]; + * @return This builder for chaining. + */ + public Builder clearPermissionWrite() { + bitField0_ = (bitField0_ & ~0x00000040); + permissionWrite_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.StorageObject) + } + + // @@protoc_insertion_point(class_scope:nakama.api.StorageObject) + private static final com.heroiclabs.nakama.api.StorageObject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.StorageObject(); + } + + public static com.heroiclabs.nakama.api.StorageObject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageObject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectAck.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAck.java new file mode 100644 index 00000000..981863a5 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAck.java @@ -0,0 +1,1503 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A storage acknowledgement.
+ * 
+ * + * Protobuf type {@code nakama.api.StorageObjectAck} + */ +public final class StorageObjectAck extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.StorageObjectAck) + StorageObjectAckOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StorageObjectAck.class.getName()); + } + // Use StorageObjectAck.newBuilder() to construct. + private StorageObjectAck(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StorageObjectAck() { + collection_ = ""; + key_ = ""; + version_ = ""; + userId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjectAck.class, com.heroiclabs.nakama.api.StorageObjectAck.Builder.class); + } + + private int bitField0_; + public static final int COLLECTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * The owner of the object.
+   * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * The owner of the object.
+   * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, version_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, userId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, version_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, userId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.StorageObjectAck)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.StorageObjectAck other = (com.heroiclabs.nakama.api.StorageObjectAck) obj; + + if (!getCollection() + .equals(other.getCollection())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getUserId() + .equals(other.getUserId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.StorageObjectAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.StorageObjectAck parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjectAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.StorageObjectAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A storage acknowledgement.
+   * 
+ * + * Protobuf type {@code nakama.api.StorageObjectAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.StorageObjectAck) + com.heroiclabs.nakama.api.StorageObjectAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjectAck.class, com.heroiclabs.nakama.api.StorageObjectAck.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.StorageObjectAck.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + collection_ = ""; + key_ = ""; + version_ = ""; + userId_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAck_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAck getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.StorageObjectAck.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAck build() { + com.heroiclabs.nakama.api.StorageObjectAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAck buildPartial() { + com.heroiclabs.nakama.api.StorageObjectAck result = new com.heroiclabs.nakama.api.StorageObjectAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.StorageObjectAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userId_ = userId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.StorageObjectAck) { + return mergeFrom((com.heroiclabs.nakama.api.StorageObjectAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.StorageObjectAck other) { + if (other == com.heroiclabs.nakama.api.StorageObjectAck.getDefaultInstance()) return this; + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object collection_ = ""; + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The collection which stores the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The key of the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The version hash of the object.
+     * 
+ * + * string version = 3 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object userId_ = ""; + /** + *
+     * The owner of the object.
+     * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The owner of the object.
+     * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The owner of the object.
+     * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The owner of the object.
+     * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The owner of the object.
+     * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.StorageObjectAck) + } + + // @@protoc_insertion_point(class_scope:nakama.api.StorageObjectAck) + private static final com.heroiclabs.nakama.api.StorageObjectAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.StorageObjectAck(); + } + + public static com.heroiclabs.nakama.api.StorageObjectAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageObjectAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectAckOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAckOrBuilder.java new file mode 100644 index 00000000..f0cad259 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAckOrBuilder.java @@ -0,0 +1,145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface StorageObjectAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.StorageObjectAck) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + java.lang.String getCollection(); + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 3 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * The owner of the object.
+   * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * The owner of the object.
+   * 
+ * + * string user_id = 4 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectAcks.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAcks.java new file mode 100644 index 00000000..5c933a23 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAcks.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Batch of acknowledgements for the storage object write.
+ * 
+ * + * Protobuf type {@code nakama.api.StorageObjectAcks} + */ +public final class StorageObjectAcks extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.StorageObjectAcks) + StorageObjectAcksOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StorageObjectAcks.class.getName()); + } + // Use StorageObjectAcks.newBuilder() to construct. + private StorageObjectAcks(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StorageObjectAcks() { + acks_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAcks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAcks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjectAcks.class, com.heroiclabs.nakama.api.StorageObjectAcks.Builder.class); + } + + public static final int ACKS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List acks_; + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + @java.lang.Override + public java.util.List getAcksList() { + return acks_; + } + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + @java.lang.Override + public java.util.List + getAcksOrBuilderList() { + return acks_; + } + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + @java.lang.Override + public int getAcksCount() { + return acks_.size(); + } + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAck getAcks(int index) { + return acks_.get(index); + } + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAckOrBuilder getAcksOrBuilder( + int index) { + return acks_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < acks_.size(); i++) { + output.writeMessage(1, acks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < acks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, acks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.StorageObjectAcks)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.StorageObjectAcks other = (com.heroiclabs.nakama.api.StorageObjectAcks) obj; + + if (!getAcksList() + .equals(other.getAcksList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAcksCount() > 0) { + hash = (37 * hash) + ACKS_FIELD_NUMBER; + hash = (53 * hash) + getAcksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.StorageObjectAcks parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.StorageObjectAcks parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjectAcks parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.StorageObjectAcks prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Batch of acknowledgements for the storage object write.
+   * 
+ * + * Protobuf type {@code nakama.api.StorageObjectAcks} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.StorageObjectAcks) + com.heroiclabs.nakama.api.StorageObjectAcksOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAcks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAcks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjectAcks.class, com.heroiclabs.nakama.api.StorageObjectAcks.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.StorageObjectAcks.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (acksBuilder_ == null) { + acks_ = java.util.Collections.emptyList(); + } else { + acks_ = null; + acksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectAcks_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAcks getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.StorageObjectAcks.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAcks build() { + com.heroiclabs.nakama.api.StorageObjectAcks result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAcks buildPartial() { + com.heroiclabs.nakama.api.StorageObjectAcks result = new com.heroiclabs.nakama.api.StorageObjectAcks(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.StorageObjectAcks result) { + if (acksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + acks_ = java.util.Collections.unmodifiableList(acks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.acks_ = acks_; + } else { + result.acks_ = acksBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.StorageObjectAcks result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.StorageObjectAcks) { + return mergeFrom((com.heroiclabs.nakama.api.StorageObjectAcks)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.StorageObjectAcks other) { + if (other == com.heroiclabs.nakama.api.StorageObjectAcks.getDefaultInstance()) return this; + if (acksBuilder_ == null) { + if (!other.acks_.isEmpty()) { + if (acks_.isEmpty()) { + acks_ = other.acks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAcksIsMutable(); + acks_.addAll(other.acks_); + } + onChanged(); + } + } else { + if (!other.acks_.isEmpty()) { + if (acksBuilder_.isEmpty()) { + acksBuilder_.dispose(); + acksBuilder_ = null; + acks_ = other.acks_; + bitField0_ = (bitField0_ & ~0x00000001); + acksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAcksFieldBuilder() : null; + } else { + acksBuilder_.addAllMessages(other.acks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.StorageObjectAck m = + input.readMessage( + com.heroiclabs.nakama.api.StorageObjectAck.parser(), + extensionRegistry); + if (acksBuilder_ == null) { + ensureAcksIsMutable(); + acks_.add(m); + } else { + acksBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List acks_ = + java.util.Collections.emptyList(); + private void ensureAcksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + acks_ = new java.util.ArrayList(acks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObjectAck, com.heroiclabs.nakama.api.StorageObjectAck.Builder, com.heroiclabs.nakama.api.StorageObjectAckOrBuilder> acksBuilder_; + + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public java.util.List getAcksList() { + if (acksBuilder_ == null) { + return java.util.Collections.unmodifiableList(acks_); + } else { + return acksBuilder_.getMessageList(); + } + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public int getAcksCount() { + if (acksBuilder_ == null) { + return acks_.size(); + } else { + return acksBuilder_.getCount(); + } + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public com.heroiclabs.nakama.api.StorageObjectAck getAcks(int index) { + if (acksBuilder_ == null) { + return acks_.get(index); + } else { + return acksBuilder_.getMessage(index); + } + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder setAcks( + int index, com.heroiclabs.nakama.api.StorageObjectAck value) { + if (acksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcksIsMutable(); + acks_.set(index, value); + onChanged(); + } else { + acksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder setAcks( + int index, com.heroiclabs.nakama.api.StorageObjectAck.Builder builderForValue) { + if (acksBuilder_ == null) { + ensureAcksIsMutable(); + acks_.set(index, builderForValue.build()); + onChanged(); + } else { + acksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder addAcks(com.heroiclabs.nakama.api.StorageObjectAck value) { + if (acksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcksIsMutable(); + acks_.add(value); + onChanged(); + } else { + acksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder addAcks( + int index, com.heroiclabs.nakama.api.StorageObjectAck value) { + if (acksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcksIsMutable(); + acks_.add(index, value); + onChanged(); + } else { + acksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder addAcks( + com.heroiclabs.nakama.api.StorageObjectAck.Builder builderForValue) { + if (acksBuilder_ == null) { + ensureAcksIsMutable(); + acks_.add(builderForValue.build()); + onChanged(); + } else { + acksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder addAcks( + int index, com.heroiclabs.nakama.api.StorageObjectAck.Builder builderForValue) { + if (acksBuilder_ == null) { + ensureAcksIsMutable(); + acks_.add(index, builderForValue.build()); + onChanged(); + } else { + acksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder addAllAcks( + java.lang.Iterable values) { + if (acksBuilder_ == null) { + ensureAcksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, acks_); + onChanged(); + } else { + acksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder clearAcks() { + if (acksBuilder_ == null) { + acks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + acksBuilder_.clear(); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public Builder removeAcks(int index) { + if (acksBuilder_ == null) { + ensureAcksIsMutable(); + acks_.remove(index); + onChanged(); + } else { + acksBuilder_.remove(index); + } + return this; + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public com.heroiclabs.nakama.api.StorageObjectAck.Builder getAcksBuilder( + int index) { + return getAcksFieldBuilder().getBuilder(index); + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public com.heroiclabs.nakama.api.StorageObjectAckOrBuilder getAcksOrBuilder( + int index) { + if (acksBuilder_ == null) { + return acks_.get(index); } else { + return acksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public java.util.List + getAcksOrBuilderList() { + if (acksBuilder_ != null) { + return acksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(acks_); + } + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public com.heroiclabs.nakama.api.StorageObjectAck.Builder addAcksBuilder() { + return getAcksFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.StorageObjectAck.getDefaultInstance()); + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public com.heroiclabs.nakama.api.StorageObjectAck.Builder addAcksBuilder( + int index) { + return getAcksFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.StorageObjectAck.getDefaultInstance()); + } + /** + *
+     * Batch of storage write acknowledgements.
+     * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + public java.util.List + getAcksBuilderList() { + return getAcksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObjectAck, com.heroiclabs.nakama.api.StorageObjectAck.Builder, com.heroiclabs.nakama.api.StorageObjectAckOrBuilder> + getAcksFieldBuilder() { + if (acksBuilder_ == null) { + acksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObjectAck, com.heroiclabs.nakama.api.StorageObjectAck.Builder, com.heroiclabs.nakama.api.StorageObjectAckOrBuilder>( + acks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + acks_ = null; + } + return acksBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.StorageObjectAcks) + } + + // @@protoc_insertion_point(class_scope:nakama.api.StorageObjectAcks) + private static final com.heroiclabs.nakama.api.StorageObjectAcks DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.StorageObjectAcks(); + } + + public static com.heroiclabs.nakama.api.StorageObjectAcks getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageObjectAcks parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectAcks getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectAcksOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAcksOrBuilder.java new file mode 100644 index 00000000..179efa9c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectAcksOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface StorageObjectAcksOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.StorageObjectAcks) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + java.util.List + getAcksList(); + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + com.heroiclabs.nakama.api.StorageObjectAck getAcks(int index); + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + int getAcksCount(); + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + java.util.List + getAcksOrBuilderList(); + /** + *
+   * Batch of storage write acknowledgements.
+   * 
+ * + * repeated .nakama.api.StorageObjectAck acks = 1 [json_name = "acks"]; + */ + com.heroiclabs.nakama.api.StorageObjectAckOrBuilder getAcksOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectList.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectList.java new file mode 100644 index 00000000..23388c00 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectList.java @@ -0,0 +1,983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * List of storage objects.
+ * 
+ * + * Protobuf type {@code nakama.api.StorageObjectList} + */ +public final class StorageObjectList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.StorageObjectList) + StorageObjectListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StorageObjectList.class.getName()); + } + // Use StorageObjectList.newBuilder() to construct. + private StorageObjectList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StorageObjectList() { + objects_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjectList.class, com.heroiclabs.nakama.api.StorageObjectList.Builder.class); + } + + public static final int OBJECTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List objects_; + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public java.util.List getObjectsList() { + return objects_; + } + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public java.util.List + getObjectsOrBuilderList() { + return objects_; + } + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public int getObjectsCount() { + return objects_.size(); + } + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObject getObjects(int index) { + return objects_.get(index); + } + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectOrBuilder getObjectsOrBuilder( + int index) { + return objects_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * The cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * The cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < objects_.size(); i++) { + output.writeMessage(1, objects_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < objects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, objects_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.StorageObjectList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.StorageObjectList other = (com.heroiclabs.nakama.api.StorageObjectList) obj; + + if (!getObjectsList() + .equals(other.getObjectsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getObjectsCount() > 0) { + hash = (37 * hash) + OBJECTS_FIELD_NUMBER; + hash = (53 * hash) + getObjectsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.StorageObjectList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.StorageObjectList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjectList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.StorageObjectList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List of storage objects.
+   * 
+ * + * Protobuf type {@code nakama.api.StorageObjectList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.StorageObjectList) + com.heroiclabs.nakama.api.StorageObjectListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjectList.class, com.heroiclabs.nakama.api.StorageObjectList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.StorageObjectList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + } else { + objects_ = null; + objectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjectList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.StorageObjectList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectList build() { + com.heroiclabs.nakama.api.StorageObjectList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectList buildPartial() { + com.heroiclabs.nakama.api.StorageObjectList result = new com.heroiclabs.nakama.api.StorageObjectList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.StorageObjectList result) { + if (objectsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + objects_ = java.util.Collections.unmodifiableList(objects_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objects_ = objects_; + } else { + result.objects_ = objectsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.StorageObjectList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.StorageObjectList) { + return mergeFrom((com.heroiclabs.nakama.api.StorageObjectList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.StorageObjectList other) { + if (other == com.heroiclabs.nakama.api.StorageObjectList.getDefaultInstance()) return this; + if (objectsBuilder_ == null) { + if (!other.objects_.isEmpty()) { + if (objects_.isEmpty()) { + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectsIsMutable(); + objects_.addAll(other.objects_); + } + onChanged(); + } + } else { + if (!other.objects_.isEmpty()) { + if (objectsBuilder_.isEmpty()) { + objectsBuilder_.dispose(); + objectsBuilder_ = null; + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000001); + objectsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getObjectsFieldBuilder() : null; + } else { + objectsBuilder_.addAllMessages(other.objects_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.StorageObject m = + input.readMessage( + com.heroiclabs.nakama.api.StorageObject.parser(), + extensionRegistry); + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(m); + } else { + objectsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List objects_ = + java.util.Collections.emptyList(); + private void ensureObjectsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objects_ = new java.util.ArrayList(objects_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObject, com.heroiclabs.nakama.api.StorageObject.Builder, com.heroiclabs.nakama.api.StorageObjectOrBuilder> objectsBuilder_; + + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List getObjectsList() { + if (objectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objects_); + } else { + return objectsBuilder_.getMessageList(); + } + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public int getObjectsCount() { + if (objectsBuilder_ == null) { + return objects_.size(); + } else { + return objectsBuilder_.getCount(); + } + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject getObjects(int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); + } else { + return objectsBuilder_.getMessage(index); + } + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder setObjects( + int index, com.heroiclabs.nakama.api.StorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.set(index, value); + onChanged(); + } else { + objectsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder setObjects( + int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.set(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects(com.heroiclabs.nakama.api.StorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(value); + onChanged(); + } else { + objectsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + int index, com.heroiclabs.nakama.api.StorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(index, value); + onChanged(); + } else { + objectsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addAllObjects( + java.lang.Iterable values) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objects_); + onChanged(); + } else { + objectsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder clearObjects() { + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + objectsBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder removeObjects(int index) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.remove(index); + onChanged(); + } else { + objectsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject.Builder getObjectsBuilder( + int index) { + return getObjectsFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObjectOrBuilder getObjectsOrBuilder( + int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); } else { + return objectsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List + getObjectsOrBuilderList() { + if (objectsBuilder_ != null) { + return objectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objects_); + } + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject.Builder addObjectsBuilder() { + return getObjectsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.StorageObject.getDefaultInstance()); + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject.Builder addObjectsBuilder( + int index) { + return getObjectsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.StorageObject.getDefaultInstance()); + } + /** + *
+     * The list of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List + getObjectsBuilderList() { + return getObjectsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObject, com.heroiclabs.nakama.api.StorageObject.Builder, com.heroiclabs.nakama.api.StorageObjectOrBuilder> + getObjectsFieldBuilder() { + if (objectsBuilder_ == null) { + objectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObject, com.heroiclabs.nakama.api.StorageObject.Builder, com.heroiclabs.nakama.api.StorageObjectOrBuilder>( + objects_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + objects_ = null; + } + return objectsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * The cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.StorageObjectList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.StorageObjectList) + private static final com.heroiclabs.nakama.api.StorageObjectList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.StorageObjectList(); + } + + public static com.heroiclabs.nakama.api.StorageObjectList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageObjectList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectListOrBuilder.java new file mode 100644 index 00000000..7f094909 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface StorageObjectListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.StorageObjectList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + java.util.List + getObjectsList(); + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + com.heroiclabs.nakama.api.StorageObject getObjects(int index); + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + int getObjectsCount(); + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + java.util.List + getObjectsOrBuilderList(); + /** + *
+   * The list of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + com.heroiclabs.nakama.api.StorageObjectOrBuilder getObjectsOrBuilder( + int index); + + /** + *
+   * The cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * The cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectOrBuilder.java new file mode 100644 index 00000000..5cf3191e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectOrBuilder.java @@ -0,0 +1,185 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface StorageObjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.StorageObject) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + java.lang.String getCollection(); + /** + *
+   * The collection which stores the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+   * The key of the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * The user owner of the object.
+   * 
+ * + * string user_id = 3 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The version hash of the object.
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * int32 permission_read = 6 [json_name = "permissionRead"]; + * @return The permissionRead. + */ + int getPermissionRead(); + + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * int32 permission_write = 7 [json_name = "permissionWrite"]; + * @return The permissionWrite. + */ + int getPermissionWrite(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the object was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 9 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjects.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjects.java new file mode 100644 index 00000000..404076ab --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjects.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Batch of storage objects.
+ * 
+ * + * Protobuf type {@code nakama.api.StorageObjects} + */ +public final class StorageObjects extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.StorageObjects) + StorageObjectsOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StorageObjects.class.getName()); + } + // Use StorageObjects.newBuilder() to construct. + private StorageObjects(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StorageObjects() { + objects_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjects_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjects_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjects.class, com.heroiclabs.nakama.api.StorageObjects.Builder.class); + } + + public static final int OBJECTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List objects_; + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public java.util.List getObjectsList() { + return objects_; + } + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public java.util.List + getObjectsOrBuilderList() { + return objects_; + } + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public int getObjectsCount() { + return objects_.size(); + } + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObject getObjects(int index) { + return objects_.get(index); + } + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjectOrBuilder getObjectsOrBuilder( + int index) { + return objects_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < objects_.size(); i++) { + output.writeMessage(1, objects_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < objects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, objects_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.StorageObjects)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.StorageObjects other = (com.heroiclabs.nakama.api.StorageObjects) obj; + + if (!getObjectsList() + .equals(other.getObjectsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getObjectsCount() > 0) { + hash = (37 * hash) + OBJECTS_FIELD_NUMBER; + hash = (53 * hash) + getObjectsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.StorageObjects parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.StorageObjects parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.StorageObjects parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.StorageObjects prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Batch of storage objects.
+   * 
+ * + * Protobuf type {@code nakama.api.StorageObjects} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.StorageObjects) + com.heroiclabs.nakama.api.StorageObjectsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjects_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjects_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.StorageObjects.class, com.heroiclabs.nakama.api.StorageObjects.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.StorageObjects.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + } else { + objects_ = null; + objectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_StorageObjects_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjects getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.StorageObjects.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjects build() { + com.heroiclabs.nakama.api.StorageObjects result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjects buildPartial() { + com.heroiclabs.nakama.api.StorageObjects result = new com.heroiclabs.nakama.api.StorageObjects(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.StorageObjects result) { + if (objectsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + objects_ = java.util.Collections.unmodifiableList(objects_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objects_ = objects_; + } else { + result.objects_ = objectsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.StorageObjects result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.StorageObjects) { + return mergeFrom((com.heroiclabs.nakama.api.StorageObjects)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.StorageObjects other) { + if (other == com.heroiclabs.nakama.api.StorageObjects.getDefaultInstance()) return this; + if (objectsBuilder_ == null) { + if (!other.objects_.isEmpty()) { + if (objects_.isEmpty()) { + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectsIsMutable(); + objects_.addAll(other.objects_); + } + onChanged(); + } + } else { + if (!other.objects_.isEmpty()) { + if (objectsBuilder_.isEmpty()) { + objectsBuilder_.dispose(); + objectsBuilder_ = null; + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000001); + objectsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getObjectsFieldBuilder() : null; + } else { + objectsBuilder_.addAllMessages(other.objects_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.StorageObject m = + input.readMessage( + com.heroiclabs.nakama.api.StorageObject.parser(), + extensionRegistry); + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(m); + } else { + objectsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List objects_ = + java.util.Collections.emptyList(); + private void ensureObjectsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objects_ = new java.util.ArrayList(objects_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObject, com.heroiclabs.nakama.api.StorageObject.Builder, com.heroiclabs.nakama.api.StorageObjectOrBuilder> objectsBuilder_; + + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List getObjectsList() { + if (objectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objects_); + } else { + return objectsBuilder_.getMessageList(); + } + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public int getObjectsCount() { + if (objectsBuilder_ == null) { + return objects_.size(); + } else { + return objectsBuilder_.getCount(); + } + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject getObjects(int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); + } else { + return objectsBuilder_.getMessage(index); + } + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder setObjects( + int index, com.heroiclabs.nakama.api.StorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.set(index, value); + onChanged(); + } else { + objectsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder setObjects( + int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.set(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects(com.heroiclabs.nakama.api.StorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(value); + onChanged(); + } else { + objectsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + int index, com.heroiclabs.nakama.api.StorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(index, value); + onChanged(); + } else { + objectsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + int index, com.heroiclabs.nakama.api.StorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addAllObjects( + java.lang.Iterable values) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objects_); + onChanged(); + } else { + objectsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder clearObjects() { + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + objectsBuilder_.clear(); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public Builder removeObjects(int index) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.remove(index); + onChanged(); + } else { + objectsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject.Builder getObjectsBuilder( + int index) { + return getObjectsFieldBuilder().getBuilder(index); + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObjectOrBuilder getObjectsOrBuilder( + int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); } else { + return objectsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List + getObjectsOrBuilderList() { + if (objectsBuilder_ != null) { + return objectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objects_); + } + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject.Builder addObjectsBuilder() { + return getObjectsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.StorageObject.getDefaultInstance()); + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.StorageObject.Builder addObjectsBuilder( + int index) { + return getObjectsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.StorageObject.getDefaultInstance()); + } + /** + *
+     * The batch of storage objects.
+     * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List + getObjectsBuilderList() { + return getObjectsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObject, com.heroiclabs.nakama.api.StorageObject.Builder, com.heroiclabs.nakama.api.StorageObjectOrBuilder> + getObjectsFieldBuilder() { + if (objectsBuilder_ == null) { + objectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.StorageObject, com.heroiclabs.nakama.api.StorageObject.Builder, com.heroiclabs.nakama.api.StorageObjectOrBuilder>( + objects_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + objects_ = null; + } + return objectsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.StorageObjects) + } + + // @@protoc_insertion_point(class_scope:nakama.api.StorageObjects) + private static final com.heroiclabs.nakama.api.StorageObjects DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.StorageObjects(); + } + + public static com.heroiclabs.nakama.api.StorageObjects getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageObjects parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.StorageObjects getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/StorageObjectsOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/StorageObjectsOrBuilder.java new file mode 100644 index 00000000..7878ad67 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StorageObjectsOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface StorageObjectsOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.StorageObjects) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + java.util.List + getObjectsList(); + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + com.heroiclabs.nakama.api.StorageObject getObjects(int index); + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + int getObjectsCount(); + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + java.util.List + getObjectsOrBuilderList(); + /** + *
+   * The batch of storage objects.
+   * 
+ * + * repeated .nakama.api.StorageObject objects = 1 [json_name = "objects"]; + */ + com.heroiclabs.nakama.api.StorageObjectOrBuilder getObjectsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/StoreEnvironment.java b/src/main/java/com/heroiclabs/nakama/api/StoreEnvironment.java new file mode 100644 index 00000000..8684d12e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StoreEnvironment.java @@ -0,0 +1,161 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Environment where a purchase/subscription took place,
+ * 
+ * + * Protobuf enum {@code nakama.api.StoreEnvironment} + */ +public enum StoreEnvironment + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown environment.
+   * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+   * Sandbox/test environment.
+   * 
+ * + * SANDBOX = 1; + */ + SANDBOX(1), + /** + *
+   * Production environment.
+   * 
+ * + * PRODUCTION = 2; + */ + PRODUCTION(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StoreEnvironment.class.getName()); + } + /** + *
+   * Unknown environment.
+   * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+   * Sandbox/test environment.
+   * 
+ * + * SANDBOX = 1; + */ + public static final int SANDBOX_VALUE = 1; + /** + *
+   * Production environment.
+   * 
+ * + * PRODUCTION = 2; + */ + public static final int PRODUCTION_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StoreEnvironment valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StoreEnvironment forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return SANDBOX; + case 2: return PRODUCTION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + StoreEnvironment> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StoreEnvironment findValueByNumber(int number) { + return StoreEnvironment.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.getDescriptor().getEnumTypes().get(1); + } + + private static final StoreEnvironment[] VALUES = values(); + + public static StoreEnvironment valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StoreEnvironment(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.api.StoreEnvironment) +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/StoreProvider.java b/src/main/java/com/heroiclabs/nakama/api/StoreProvider.java new file mode 100644 index 00000000..f6e8fb94 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/StoreProvider.java @@ -0,0 +1,178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Validation Provider,
+ * 
+ * + * Protobuf enum {@code nakama.api.StoreProvider} + */ +public enum StoreProvider + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Apple App Store
+   * 
+ * + * APPLE_APP_STORE = 0; + */ + APPLE_APP_STORE(0), + /** + *
+   * Google Play Store
+   * 
+ * + * GOOGLE_PLAY_STORE = 1; + */ + GOOGLE_PLAY_STORE(1), + /** + *
+   * Huawei App Gallery
+   * 
+ * + * HUAWEI_APP_GALLERY = 2; + */ + HUAWEI_APP_GALLERY(2), + /** + *
+   * Facebook Instant Store
+   * 
+ * + * FACEBOOK_INSTANT_STORE = 3; + */ + FACEBOOK_INSTANT_STORE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StoreProvider.class.getName()); + } + /** + *
+   * Apple App Store
+   * 
+ * + * APPLE_APP_STORE = 0; + */ + public static final int APPLE_APP_STORE_VALUE = 0; + /** + *
+   * Google Play Store
+   * 
+ * + * GOOGLE_PLAY_STORE = 1; + */ + public static final int GOOGLE_PLAY_STORE_VALUE = 1; + /** + *
+   * Huawei App Gallery
+   * 
+ * + * HUAWEI_APP_GALLERY = 2; + */ + public static final int HUAWEI_APP_GALLERY_VALUE = 2; + /** + *
+   * Facebook Instant Store
+   * 
+ * + * FACEBOOK_INSTANT_STORE = 3; + */ + public static final int FACEBOOK_INSTANT_STORE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StoreProvider valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StoreProvider forNumber(int value) { + switch (value) { + case 0: return APPLE_APP_STORE; + case 1: return GOOGLE_PLAY_STORE; + case 2: return HUAWEI_APP_GALLERY; + case 3: return FACEBOOK_INSTANT_STORE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + StoreProvider> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StoreProvider findValueByNumber(int number) { + return StoreProvider.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.getDescriptor().getEnumTypes().get(0); + } + + private static final StoreProvider[] VALUES = values(); + + public static StoreProvider valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StoreProvider(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.api.StoreProvider) +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/SubscriptionList.java b/src/main/java/com/heroiclabs/nakama/api/SubscriptionList.java new file mode 100644 index 00000000..e2d2a629 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/SubscriptionList.java @@ -0,0 +1,1147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of validated subscriptions stored by Nakama.
+ * 
+ * + * Protobuf type {@code nakama.api.SubscriptionList} + */ +public final class SubscriptionList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.SubscriptionList) + SubscriptionListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SubscriptionList.class.getName()); + } + // Use SubscriptionList.newBuilder() to construct. + private SubscriptionList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SubscriptionList() { + validatedSubscriptions_ = java.util.Collections.emptyList(); + cursor_ = ""; + prevCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SubscriptionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SubscriptionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.SubscriptionList.class, com.heroiclabs.nakama.api.SubscriptionList.Builder.class); + } + + public static final int VALIDATED_SUBSCRIPTIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List validatedSubscriptions_; + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + @java.lang.Override + public java.util.List getValidatedSubscriptionsList() { + return validatedSubscriptions_; + } + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + @java.lang.Override + public java.util.List + getValidatedSubscriptionsOrBuilderList() { + return validatedSubscriptions_; + } + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + @java.lang.Override + public int getValidatedSubscriptionsCount() { + return validatedSubscriptions_.size(); + } + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscription getValidatedSubscriptions(int index) { + return validatedSubscriptions_.get(index); + } + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder getValidatedSubscriptionsOrBuilder( + int index) { + return validatedSubscriptions_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREV_CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object prevCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + @java.lang.Override + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < validatedSubscriptions_.size(); i++) { + output.writeMessage(1, validatedSubscriptions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, prevCursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < validatedSubscriptions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, validatedSubscriptions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, prevCursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.SubscriptionList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.SubscriptionList other = (com.heroiclabs.nakama.api.SubscriptionList) obj; + + if (!getValidatedSubscriptionsList() + .equals(other.getValidatedSubscriptionsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getPrevCursor() + .equals(other.getPrevCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValidatedSubscriptionsCount() > 0) { + hash = (37 * hash) + VALIDATED_SUBSCRIPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getValidatedSubscriptionsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (37 * hash) + PREV_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getPrevCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.SubscriptionList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.SubscriptionList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.SubscriptionList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.SubscriptionList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of validated subscriptions stored by Nakama.
+   * 
+ * + * Protobuf type {@code nakama.api.SubscriptionList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.SubscriptionList) + com.heroiclabs.nakama.api.SubscriptionListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SubscriptionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SubscriptionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.SubscriptionList.class, com.heroiclabs.nakama.api.SubscriptionList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.SubscriptionList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (validatedSubscriptionsBuilder_ == null) { + validatedSubscriptions_ = java.util.Collections.emptyList(); + } else { + validatedSubscriptions_ = null; + validatedSubscriptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + prevCursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_SubscriptionList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SubscriptionList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.SubscriptionList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SubscriptionList build() { + com.heroiclabs.nakama.api.SubscriptionList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SubscriptionList buildPartial() { + com.heroiclabs.nakama.api.SubscriptionList result = new com.heroiclabs.nakama.api.SubscriptionList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.SubscriptionList result) { + if (validatedSubscriptionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + validatedSubscriptions_ = java.util.Collections.unmodifiableList(validatedSubscriptions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.validatedSubscriptions_ = validatedSubscriptions_; + } else { + result.validatedSubscriptions_ = validatedSubscriptionsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.SubscriptionList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.prevCursor_ = prevCursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.SubscriptionList) { + return mergeFrom((com.heroiclabs.nakama.api.SubscriptionList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.SubscriptionList other) { + if (other == com.heroiclabs.nakama.api.SubscriptionList.getDefaultInstance()) return this; + if (validatedSubscriptionsBuilder_ == null) { + if (!other.validatedSubscriptions_.isEmpty()) { + if (validatedSubscriptions_.isEmpty()) { + validatedSubscriptions_ = other.validatedSubscriptions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.addAll(other.validatedSubscriptions_); + } + onChanged(); + } + } else { + if (!other.validatedSubscriptions_.isEmpty()) { + if (validatedSubscriptionsBuilder_.isEmpty()) { + validatedSubscriptionsBuilder_.dispose(); + validatedSubscriptionsBuilder_ = null; + validatedSubscriptions_ = other.validatedSubscriptions_; + bitField0_ = (bitField0_ & ~0x00000001); + validatedSubscriptionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValidatedSubscriptionsFieldBuilder() : null; + } else { + validatedSubscriptionsBuilder_.addAllMessages(other.validatedSubscriptions_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPrevCursor().isEmpty()) { + prevCursor_ = other.prevCursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.ValidatedSubscription m = + input.readMessage( + com.heroiclabs.nakama.api.ValidatedSubscription.parser(), + extensionRegistry); + if (validatedSubscriptionsBuilder_ == null) { + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.add(m); + } else { + validatedSubscriptionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + prevCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List validatedSubscriptions_ = + java.util.Collections.emptyList(); + private void ensureValidatedSubscriptionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + validatedSubscriptions_ = new java.util.ArrayList(validatedSubscriptions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedSubscription, com.heroiclabs.nakama.api.ValidatedSubscription.Builder, com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder> validatedSubscriptionsBuilder_; + + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public java.util.List getValidatedSubscriptionsList() { + if (validatedSubscriptionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(validatedSubscriptions_); + } else { + return validatedSubscriptionsBuilder_.getMessageList(); + } + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public int getValidatedSubscriptionsCount() { + if (validatedSubscriptionsBuilder_ == null) { + return validatedSubscriptions_.size(); + } else { + return validatedSubscriptionsBuilder_.getCount(); + } + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public com.heroiclabs.nakama.api.ValidatedSubscription getValidatedSubscriptions(int index) { + if (validatedSubscriptionsBuilder_ == null) { + return validatedSubscriptions_.get(index); + } else { + return validatedSubscriptionsBuilder_.getMessage(index); + } + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder setValidatedSubscriptions( + int index, com.heroiclabs.nakama.api.ValidatedSubscription value) { + if (validatedSubscriptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.set(index, value); + onChanged(); + } else { + validatedSubscriptionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder setValidatedSubscriptions( + int index, com.heroiclabs.nakama.api.ValidatedSubscription.Builder builderForValue) { + if (validatedSubscriptionsBuilder_ == null) { + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.set(index, builderForValue.build()); + onChanged(); + } else { + validatedSubscriptionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder addValidatedSubscriptions(com.heroiclabs.nakama.api.ValidatedSubscription value) { + if (validatedSubscriptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.add(value); + onChanged(); + } else { + validatedSubscriptionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder addValidatedSubscriptions( + int index, com.heroiclabs.nakama.api.ValidatedSubscription value) { + if (validatedSubscriptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.add(index, value); + onChanged(); + } else { + validatedSubscriptionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder addValidatedSubscriptions( + com.heroiclabs.nakama.api.ValidatedSubscription.Builder builderForValue) { + if (validatedSubscriptionsBuilder_ == null) { + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.add(builderForValue.build()); + onChanged(); + } else { + validatedSubscriptionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder addValidatedSubscriptions( + int index, com.heroiclabs.nakama.api.ValidatedSubscription.Builder builderForValue) { + if (validatedSubscriptionsBuilder_ == null) { + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.add(index, builderForValue.build()); + onChanged(); + } else { + validatedSubscriptionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder addAllValidatedSubscriptions( + java.lang.Iterable values) { + if (validatedSubscriptionsBuilder_ == null) { + ensureValidatedSubscriptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, validatedSubscriptions_); + onChanged(); + } else { + validatedSubscriptionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder clearValidatedSubscriptions() { + if (validatedSubscriptionsBuilder_ == null) { + validatedSubscriptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + validatedSubscriptionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public Builder removeValidatedSubscriptions(int index) { + if (validatedSubscriptionsBuilder_ == null) { + ensureValidatedSubscriptionsIsMutable(); + validatedSubscriptions_.remove(index); + onChanged(); + } else { + validatedSubscriptionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public com.heroiclabs.nakama.api.ValidatedSubscription.Builder getValidatedSubscriptionsBuilder( + int index) { + return getValidatedSubscriptionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder getValidatedSubscriptionsOrBuilder( + int index) { + if (validatedSubscriptionsBuilder_ == null) { + return validatedSubscriptions_.get(index); } else { + return validatedSubscriptionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public java.util.List + getValidatedSubscriptionsOrBuilderList() { + if (validatedSubscriptionsBuilder_ != null) { + return validatedSubscriptionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validatedSubscriptions_); + } + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public com.heroiclabs.nakama.api.ValidatedSubscription.Builder addValidatedSubscriptionsBuilder() { + return getValidatedSubscriptionsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance()); + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public com.heroiclabs.nakama.api.ValidatedSubscription.Builder addValidatedSubscriptionsBuilder( + int index) { + return getValidatedSubscriptionsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance()); + } + /** + *
+     * Stored validated subscriptions.
+     * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + public java.util.List + getValidatedSubscriptionsBuilderList() { + return getValidatedSubscriptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedSubscription, com.heroiclabs.nakama.api.ValidatedSubscription.Builder, com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder> + getValidatedSubscriptionsFieldBuilder() { + if (validatedSubscriptionsBuilder_ == null) { + validatedSubscriptionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedSubscription, com.heroiclabs.nakama.api.ValidatedSubscription.Builder, com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder>( + validatedSubscriptions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + validatedSubscriptions_ = null; + } + return validatedSubscriptionsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object prevCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return This builder for chaining. + */ + public Builder clearPrevCursor() { + prevCursor_ = getDefaultInstance().getPrevCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The bytes for prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.SubscriptionList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.SubscriptionList) + private static final com.heroiclabs.nakama.api.SubscriptionList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.SubscriptionList(); + } + + public static com.heroiclabs.nakama.api.SubscriptionList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubscriptionList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.SubscriptionList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/SubscriptionListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/SubscriptionListOrBuilder.java new file mode 100644 index 00000000..d544eef1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/SubscriptionListOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface SubscriptionListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.SubscriptionList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + java.util.List + getValidatedSubscriptionsList(); + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + com.heroiclabs.nakama.api.ValidatedSubscription getValidatedSubscriptions(int index); + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + int getValidatedSubscriptionsCount(); + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + java.util.List + getValidatedSubscriptionsOrBuilderList(); + /** + *
+   * Stored validated subscriptions.
+   * 
+ * + * repeated .nakama.api.ValidatedSubscription validated_subscriptions = 1 [json_name = "validatedSubscriptions"]; + */ + com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder getValidatedSubscriptionsOrBuilder( + int index); + + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); + + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + java.lang.String getPrevCursor(); + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + com.google.protobuf.ByteString + getPrevCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Tournament.java b/src/main/java/com/heroiclabs/nakama/api/Tournament.java new file mode 100644 index 00000000..bbb37700 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Tournament.java @@ -0,0 +1,2844 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A tournament on the server.
+ * 
+ * + * Protobuf type {@code nakama.api.Tournament} + */ +public final class Tournament extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Tournament) + TournamentOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Tournament.class.getName()); + } + // Use Tournament.newBuilder() to construct. + private Tournament(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Tournament() { + id_ = ""; + title_ = ""; + description_ = ""; + metadata_ = ""; + operator_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Tournament_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Tournament_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Tournament.class, com.heroiclabs.nakama.api.Tournament.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The ID of the tournament.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The ID of the tournament.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The title for the tournament.
+   * 
+ * + * string title = 2 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The title for the tournament.
+   * 
+ * + * string title = 2 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * The description of the tournament. May be blank.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of the tournament. May be blank.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORY_FIELD_NUMBER = 4; + private int category_ = 0; + /** + *
+   * The category of the tournament. e.g. "vip" could be category 1.
+   * 
+ * + * uint32 category = 4 [json_name = "category"]; + * @return The category. + */ + @java.lang.Override + public int getCategory() { + return category_; + } + + public static final int SORT_ORDER_FIELD_NUMBER = 5; + private int sortOrder_ = 0; + /** + *
+   * ASC (0) or DESC (1) sort mode of scores in the tournament.
+   * 
+ * + * uint32 sort_order = 5 [json_name = "sortOrder"]; + * @return The sortOrder. + */ + @java.lang.Override + public int getSortOrder() { + return sortOrder_; + } + + public static final int SIZE_FIELD_NUMBER = 6; + private int size_ = 0; + /** + *
+   * The current number of players in the tournament.
+   * 
+ * + * uint32 size = 6 [json_name = "size"]; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + + public static final int MAX_SIZE_FIELD_NUMBER = 7; + private int maxSize_ = 0; + /** + *
+   * The maximum number of players for the tournament.
+   * 
+ * + * uint32 max_size = 7 [json_name = "maxSize"]; + * @return The maxSize. + */ + @java.lang.Override + public int getMaxSize() { + return maxSize_; + } + + public static final int MAX_NUM_SCORE_FIELD_NUMBER = 8; + private int maxNumScore_ = 0; + /** + *
+   * The maximum score updates allowed per player for the current tournament.
+   * 
+ * + * uint32 max_num_score = 8 [json_name = "maxNumScore"]; + * @return The maxNumScore. + */ + @java.lang.Override + public int getMaxNumScore() { + return maxNumScore_; + } + + public static final int CAN_ENTER_FIELD_NUMBER = 9; + private boolean canEnter_ = false; + /** + *
+   * True if the tournament is active and can enter. A computed value.
+   * 
+ * + * bool can_enter = 9 [json_name = "canEnter"]; + * @return The canEnter. + */ + @java.lang.Override + public boolean getCanEnter() { + return canEnter_; + } + + public static final int END_ACTIVE_FIELD_NUMBER = 10; + private int endActive_ = 0; + /** + *
+   * The UNIX time when the tournament stops being active until next reset. A computed value.
+   * 
+ * + * uint32 end_active = 10 [json_name = "endActive"]; + * @return The endActive. + */ + @java.lang.Override + public int getEndActive() { + return endActive_; + } + + public static final int NEXT_RESET_FIELD_NUMBER = 11; + private int nextReset_ = 0; + /** + *
+   * The UNIX time when the tournament is next playable. A computed value.
+   * 
+ * + * uint32 next_reset = 11 [json_name = "nextReset"]; + * @return The nextReset. + */ + @java.lang.Override + public int getNextReset() { + return nextReset_; + } + + public static final int METADATA_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object metadata_ = ""; + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } + } + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 13; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 14; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 15; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int DURATION_FIELD_NUMBER = 16; + private int duration_ = 0; + /** + *
+   * Duration of the tournament in seconds.
+   * 
+ * + * uint32 duration = 16 [json_name = "duration"]; + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + + public static final int START_ACTIVE_FIELD_NUMBER = 17; + private int startActive_ = 0; + /** + *
+   * The UNIX time when the tournament start being active. A computed value.
+   * 
+ * + * uint32 start_active = 17 [json_name = "startActive"]; + * @return The startActive. + */ + @java.lang.Override + public int getStartActive() { + return startActive_; + } + + public static final int PREV_RESET_FIELD_NUMBER = 18; + private int prevReset_ = 0; + /** + *
+   * The UNIX time when the tournament was last reset. A computed value.
+   * 
+ * + * uint32 prev_reset = 18 [json_name = "prevReset"]; + * @return The prevReset. + */ + @java.lang.Override + public int getPrevReset() { + return prevReset_; + } + + public static final int OPERATOR_FIELD_NUMBER = 19; + private int operator_ = 0; + /** + *
+   * Operator.
+   * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+   * Operator.
+   * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + + public static final int AUTHORITATIVE_FIELD_NUMBER = 20; + private boolean authoritative_ = false; + /** + *
+   * Whether the leaderboard was created authoritatively or not.
+   * 
+ * + * bool authoritative = 20 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (category_ != 0) { + output.writeUInt32(4, category_); + } + if (sortOrder_ != 0) { + output.writeUInt32(5, sortOrder_); + } + if (size_ != 0) { + output.writeUInt32(6, size_); + } + if (maxSize_ != 0) { + output.writeUInt32(7, maxSize_); + } + if (maxNumScore_ != 0) { + output.writeUInt32(8, maxNumScore_); + } + if (canEnter_ != false) { + output.writeBool(9, canEnter_); + } + if (endActive_ != 0) { + output.writeUInt32(10, endActive_); + } + if (nextReset_ != 0) { + output.writeUInt32(11, nextReset_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, metadata_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(13, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(14, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(15, getEndTime()); + } + if (duration_ != 0) { + output.writeUInt32(16, duration_); + } + if (startActive_ != 0) { + output.writeUInt32(17, startActive_); + } + if (prevReset_ != 0) { + output.writeUInt32(18, prevReset_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + output.writeEnum(19, operator_); + } + if (authoritative_ != false) { + output.writeBool(20, authoritative_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (category_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, category_); + } + if (sortOrder_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, sortOrder_); + } + if (size_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, size_); + } + if (maxSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, maxSize_); + } + if (maxNumScore_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, maxNumScore_); + } + if (canEnter_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, canEnter_); + } + if (endActive_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, endActive_); + } + if (nextReset_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(11, nextReset_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, metadata_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getEndTime()); + } + if (duration_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(16, duration_); + } + if (startActive_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(17, startActive_); + } + if (prevReset_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(18, prevReset_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(19, operator_); + } + if (authoritative_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(20, authoritative_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Tournament)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Tournament other = (com.heroiclabs.nakama.api.Tournament) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (getCategory() + != other.getCategory()) return false; + if (getSortOrder() + != other.getSortOrder()) return false; + if (getSize() + != other.getSize()) return false; + if (getMaxSize() + != other.getMaxSize()) return false; + if (getMaxNumScore() + != other.getMaxNumScore()) return false; + if (getCanEnter() + != other.getCanEnter()) return false; + if (getEndActive() + != other.getEndActive()) return false; + if (getNextReset() + != other.getNextReset()) return false; + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (getDuration() + != other.getDuration()) return false; + if (getStartActive() + != other.getStartActive()) return false; + if (getPrevReset() + != other.getPrevReset()) return false; + if (operator_ != other.operator_) return false; + if (getAuthoritative() + != other.getAuthoritative()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getCategory(); + hash = (37 * hash) + SORT_ORDER_FIELD_NUMBER; + hash = (53 * hash) + getSortOrder(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + getSize(); + hash = (37 * hash) + MAX_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxSize(); + hash = (37 * hash) + MAX_NUM_SCORE_FIELD_NUMBER; + hash = (53 * hash) + getMaxNumScore(); + hash = (37 * hash) + CAN_ENTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCanEnter()); + hash = (37 * hash) + END_ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + getEndActive(); + hash = (37 * hash) + NEXT_RESET_FIELD_NUMBER; + hash = (53 * hash) + getNextReset(); + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration(); + hash = (37 * hash) + START_ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + getStartActive(); + hash = (37 * hash) + PREV_RESET_FIELD_NUMBER; + hash = (53 * hash) + getPrevReset(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + operator_; + hash = (37 * hash) + AUTHORITATIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAuthoritative()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Tournament parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Tournament parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Tournament parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Tournament parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Tournament prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A tournament on the server.
+   * 
+ * + * Protobuf type {@code nakama.api.Tournament} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Tournament) + com.heroiclabs.nakama.api.TournamentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Tournament_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Tournament_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Tournament.class, com.heroiclabs.nakama.api.Tournament.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Tournament.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + title_ = ""; + description_ = ""; + category_ = 0; + sortOrder_ = 0; + size_ = 0; + maxSize_ = 0; + maxNumScore_ = 0; + canEnter_ = false; + endActive_ = 0; + nextReset_ = 0; + metadata_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + duration_ = 0; + startActive_ = 0; + prevReset_ = 0; + operator_ = 0; + authoritative_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Tournament_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Tournament getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Tournament.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Tournament build() { + com.heroiclabs.nakama.api.Tournament result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Tournament buildPartial() { + com.heroiclabs.nakama.api.Tournament result = new com.heroiclabs.nakama.api.Tournament(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.Tournament result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sortOrder_ = sortOrder_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.size_ = size_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maxSize_ = maxSize_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.maxNumScore_ = maxNumScore_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.canEnter_ = canEnter_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.endActive_ = endActive_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.nextReset_ = nextReset_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.metadata_ = metadata_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00001000) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.startTime_ = startTimeBuilder_ == null + ? startTime_ + : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.endTime_ = endTimeBuilder_ == null + ? endTime_ + : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.duration_ = duration_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.startActive_ = startActive_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.prevReset_ = prevReset_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.operator_ = operator_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.authoritative_ = authoritative_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Tournament) { + return mergeFrom((com.heroiclabs.nakama.api.Tournament)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Tournament other) { + if (other == com.heroiclabs.nakama.api.Tournament.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getCategory() != 0) { + setCategory(other.getCategory()); + } + if (other.getSortOrder() != 0) { + setSortOrder(other.getSortOrder()); + } + if (other.getSize() != 0) { + setSize(other.getSize()); + } + if (other.getMaxSize() != 0) { + setMaxSize(other.getMaxSize()); + } + if (other.getMaxNumScore() != 0) { + setMaxNumScore(other.getMaxNumScore()); + } + if (other.getCanEnter() != false) { + setCanEnter(other.getCanEnter()); + } + if (other.getEndActive() != 0) { + setEndActive(other.getEndActive()); + } + if (other.getNextReset() != 0) { + setNextReset(other.getNextReset()); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.getDuration() != 0) { + setDuration(other.getDuration()); + } + if (other.getStartActive() != 0) { + setStartActive(other.getStartActive()); + } + if (other.getPrevReset() != 0) { + setPrevReset(other.getPrevReset()); + } + if (other.operator_ != 0) { + setOperatorValue(other.getOperatorValue()); + } + if (other.getAuthoritative() != false) { + setAuthoritative(other.getAuthoritative()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + category_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + sortOrder_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + size_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + maxSize_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + maxNumScore_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + canEnter_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + endActive_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + nextReset_ = input.readUInt32(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + input.readMessage( + getStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: { + input.readMessage( + getEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 128: { + duration_ = input.readUInt32(); + bitField0_ |= 0x00008000; + break; + } // case 128 + case 136: { + startActive_ = input.readUInt32(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 144: { + prevReset_ = input.readUInt32(); + bitField0_ |= 0x00020000; + break; + } // case 144 + case 152: { + operator_ = input.readEnum(); + bitField0_ |= 0x00040000; + break; + } // case 152 + case 160: { + authoritative_ = input.readBool(); + bitField0_ |= 0x00080000; + break; + } // case 160 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The ID of the tournament.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the tournament.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the tournament.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the tournament.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + *
+     * The title for the tournament.
+     * 
+ * + * string title = 2 [json_name = "title"]; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The title for the tournament.
+     * 
+ * + * string title = 2 [json_name = "title"]; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The title for the tournament.
+     * 
+ * + * string title = 2 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The title for the tournament.
+     * 
+ * + * string title = 2 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The title for the tournament.
+     * 
+ * + * string title = 2 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of the tournament. May be blank.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of the tournament. May be blank.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of the tournament. May be blank.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The description of the tournament. May be blank.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The description of the tournament. May be blank.
+     * 
+ * + * string description = 3 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int category_ ; + /** + *
+     * The category of the tournament. e.g. "vip" could be category 1.
+     * 
+ * + * uint32 category = 4 [json_name = "category"]; + * @return The category. + */ + @java.lang.Override + public int getCategory() { + return category_; + } + /** + *
+     * The category of the tournament. e.g. "vip" could be category 1.
+     * 
+ * + * uint32 category = 4 [json_name = "category"]; + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory(int value) { + + category_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The category of the tournament. e.g. "vip" could be category 1.
+     * 
+ * + * uint32 category = 4 [json_name = "category"]; + * @return This builder for chaining. + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000008); + category_ = 0; + onChanged(); + return this; + } + + private int sortOrder_ ; + /** + *
+     * ASC (0) or DESC (1) sort mode of scores in the tournament.
+     * 
+ * + * uint32 sort_order = 5 [json_name = "sortOrder"]; + * @return The sortOrder. + */ + @java.lang.Override + public int getSortOrder() { + return sortOrder_; + } + /** + *
+     * ASC (0) or DESC (1) sort mode of scores in the tournament.
+     * 
+ * + * uint32 sort_order = 5 [json_name = "sortOrder"]; + * @param value The sortOrder to set. + * @return This builder for chaining. + */ + public Builder setSortOrder(int value) { + + sortOrder_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * ASC (0) or DESC (1) sort mode of scores in the tournament.
+     * 
+ * + * uint32 sort_order = 5 [json_name = "sortOrder"]; + * @return This builder for chaining. + */ + public Builder clearSortOrder() { + bitField0_ = (bitField0_ & ~0x00000010); + sortOrder_ = 0; + onChanged(); + return this; + } + + private int size_ ; + /** + *
+     * The current number of players in the tournament.
+     * 
+ * + * uint32 size = 6 [json_name = "size"]; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + /** + *
+     * The current number of players in the tournament.
+     * 
+ * + * uint32 size = 6 [json_name = "size"]; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(int value) { + + size_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The current number of players in the tournament.
+     * 
+ * + * uint32 size = 6 [json_name = "size"]; + * @return This builder for chaining. + */ + public Builder clearSize() { + bitField0_ = (bitField0_ & ~0x00000020); + size_ = 0; + onChanged(); + return this; + } + + private int maxSize_ ; + /** + *
+     * The maximum number of players for the tournament.
+     * 
+ * + * uint32 max_size = 7 [json_name = "maxSize"]; + * @return The maxSize. + */ + @java.lang.Override + public int getMaxSize() { + return maxSize_; + } + /** + *
+     * The maximum number of players for the tournament.
+     * 
+ * + * uint32 max_size = 7 [json_name = "maxSize"]; + * @param value The maxSize to set. + * @return This builder for chaining. + */ + public Builder setMaxSize(int value) { + + maxSize_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The maximum number of players for the tournament.
+     * 
+ * + * uint32 max_size = 7 [json_name = "maxSize"]; + * @return This builder for chaining. + */ + public Builder clearMaxSize() { + bitField0_ = (bitField0_ & ~0x00000040); + maxSize_ = 0; + onChanged(); + return this; + } + + private int maxNumScore_ ; + /** + *
+     * The maximum score updates allowed per player for the current tournament.
+     * 
+ * + * uint32 max_num_score = 8 [json_name = "maxNumScore"]; + * @return The maxNumScore. + */ + @java.lang.Override + public int getMaxNumScore() { + return maxNumScore_; + } + /** + *
+     * The maximum score updates allowed per player for the current tournament.
+     * 
+ * + * uint32 max_num_score = 8 [json_name = "maxNumScore"]; + * @param value The maxNumScore to set. + * @return This builder for chaining. + */ + public Builder setMaxNumScore(int value) { + + maxNumScore_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The maximum score updates allowed per player for the current tournament.
+     * 
+ * + * uint32 max_num_score = 8 [json_name = "maxNumScore"]; + * @return This builder for chaining. + */ + public Builder clearMaxNumScore() { + bitField0_ = (bitField0_ & ~0x00000080); + maxNumScore_ = 0; + onChanged(); + return this; + } + + private boolean canEnter_ ; + /** + *
+     * True if the tournament is active and can enter. A computed value.
+     * 
+ * + * bool can_enter = 9 [json_name = "canEnter"]; + * @return The canEnter. + */ + @java.lang.Override + public boolean getCanEnter() { + return canEnter_; + } + /** + *
+     * True if the tournament is active and can enter. A computed value.
+     * 
+ * + * bool can_enter = 9 [json_name = "canEnter"]; + * @param value The canEnter to set. + * @return This builder for chaining. + */ + public Builder setCanEnter(boolean value) { + + canEnter_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * True if the tournament is active and can enter. A computed value.
+     * 
+ * + * bool can_enter = 9 [json_name = "canEnter"]; + * @return This builder for chaining. + */ + public Builder clearCanEnter() { + bitField0_ = (bitField0_ & ~0x00000100); + canEnter_ = false; + onChanged(); + return this; + } + + private int endActive_ ; + /** + *
+     * The UNIX time when the tournament stops being active until next reset. A computed value.
+     * 
+ * + * uint32 end_active = 10 [json_name = "endActive"]; + * @return The endActive. + */ + @java.lang.Override + public int getEndActive() { + return endActive_; + } + /** + *
+     * The UNIX time when the tournament stops being active until next reset. A computed value.
+     * 
+ * + * uint32 end_active = 10 [json_name = "endActive"]; + * @param value The endActive to set. + * @return This builder for chaining. + */ + public Builder setEndActive(int value) { + + endActive_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The UNIX time when the tournament stops being active until next reset. A computed value.
+     * 
+ * + * uint32 end_active = 10 [json_name = "endActive"]; + * @return This builder for chaining. + */ + public Builder clearEndActive() { + bitField0_ = (bitField0_ & ~0x00000200); + endActive_ = 0; + onChanged(); + return this; + } + + private int nextReset_ ; + /** + *
+     * The UNIX time when the tournament is next playable. A computed value.
+     * 
+ * + * uint32 next_reset = 11 [json_name = "nextReset"]; + * @return The nextReset. + */ + @java.lang.Override + public int getNextReset() { + return nextReset_; + } + /** + *
+     * The UNIX time when the tournament is next playable. A computed value.
+     * 
+ * + * uint32 next_reset = 11 [json_name = "nextReset"]; + * @param value The nextReset to set. + * @return This builder for chaining. + */ + public Builder setNextReset(int value) { + + nextReset_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The UNIX time when the tournament is next playable. A computed value.
+     * 
+ * + * uint32 next_reset = 11 [json_name = "nextReset"]; + * @return This builder for chaining. + */ + public Builder clearNextReset() { + bitField0_ = (bitField0_ & ~0x00000400); + nextReset_ = 0; + onChanged(); + return this; + } + + private java.lang.Object metadata_ = ""; + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @return The metadata. + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @param value The metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadata_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @return This builder for chaining. + */ + public Builder clearMetadata() { + metadata_ = getDefaultInstance().getMetadata(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @param value The bytes for metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadata_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00001000); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + startTime_ != null && + startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00002000); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) && + endTime_ != null && + endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00004000); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int duration_ ; + /** + *
+     * Duration of the tournament in seconds.
+     * 
+ * + * uint32 duration = 16 [json_name = "duration"]; + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + /** + *
+     * Duration of the tournament in seconds.
+     * 
+ * + * uint32 duration = 16 [json_name = "duration"]; + * @param value The duration to set. + * @return This builder for chaining. + */ + public Builder setDuration(int value) { + + duration_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * Duration of the tournament in seconds.
+     * 
+ * + * uint32 duration = 16 [json_name = "duration"]; + * @return This builder for chaining. + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00008000); + duration_ = 0; + onChanged(); + return this; + } + + private int startActive_ ; + /** + *
+     * The UNIX time when the tournament start being active. A computed value.
+     * 
+ * + * uint32 start_active = 17 [json_name = "startActive"]; + * @return The startActive. + */ + @java.lang.Override + public int getStartActive() { + return startActive_; + } + /** + *
+     * The UNIX time when the tournament start being active. A computed value.
+     * 
+ * + * uint32 start_active = 17 [json_name = "startActive"]; + * @param value The startActive to set. + * @return This builder for chaining. + */ + public Builder setStartActive(int value) { + + startActive_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time when the tournament start being active. A computed value.
+     * 
+ * + * uint32 start_active = 17 [json_name = "startActive"]; + * @return This builder for chaining. + */ + public Builder clearStartActive() { + bitField0_ = (bitField0_ & ~0x00010000); + startActive_ = 0; + onChanged(); + return this; + } + + private int prevReset_ ; + /** + *
+     * The UNIX time when the tournament was last reset. A computed value.
+     * 
+ * + * uint32 prev_reset = 18 [json_name = "prevReset"]; + * @return The prevReset. + */ + @java.lang.Override + public int getPrevReset() { + return prevReset_; + } + /** + *
+     * The UNIX time when the tournament was last reset. A computed value.
+     * 
+ * + * uint32 prev_reset = 18 [json_name = "prevReset"]; + * @param value The prevReset to set. + * @return This builder for chaining. + */ + public Builder setPrevReset(int value) { + + prevReset_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time when the tournament was last reset. A computed value.
+     * 
+ * + * uint32 prev_reset = 18 [json_name = "prevReset"]; + * @return This builder for chaining. + */ + public Builder clearPrevReset() { + bitField0_ = (bitField0_ & ~0x00020000); + prevReset_ = 0; + onChanged(); + return this; + } + + private int operator_ = 0; + /** + *
+     * Operator.
+     * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+     * Operator.
+     * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @param value The enum numeric value on the wire for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorValue(int value) { + operator_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + *
+     * Operator.
+     * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + /** + *
+     * Operator.
+     * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(com.heroiclabs.nakama.api.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; + operator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Operator.
+     * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @return This builder for chaining. + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00040000); + operator_ = 0; + onChanged(); + return this; + } + + private boolean authoritative_ ; + /** + *
+     * Whether the leaderboard was created authoritatively or not.
+     * 
+ * + * bool authoritative = 20 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + /** + *
+     * Whether the leaderboard was created authoritatively or not.
+     * 
+ * + * bool authoritative = 20 [json_name = "authoritative"]; + * @param value The authoritative to set. + * @return This builder for chaining. + */ + public Builder setAuthoritative(boolean value) { + + authoritative_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + *
+     * Whether the leaderboard was created authoritatively or not.
+     * 
+ * + * bool authoritative = 20 [json_name = "authoritative"]; + * @return This builder for chaining. + */ + public Builder clearAuthoritative() { + bitField0_ = (bitField0_ & ~0x00080000); + authoritative_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Tournament) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Tournament) + private static final com.heroiclabs.nakama.api.Tournament DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Tournament(); + } + + public static com.heroiclabs.nakama.api.Tournament getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tournament parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Tournament getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/TournamentList.java b/src/main/java/com/heroiclabs/nakama/api/TournamentList.java new file mode 100644 index 00000000..30096c42 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/TournamentList.java @@ -0,0 +1,983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of tournaments.
+ * 
+ * + * Protobuf type {@code nakama.api.TournamentList} + */ +public final class TournamentList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.TournamentList) + TournamentListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + TournamentList.class.getName()); + } + // Use TournamentList.newBuilder() to construct. + private TournamentList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TournamentList() { + tournaments_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.TournamentList.class, com.heroiclabs.nakama.api.TournamentList.Builder.class); + } + + public static final int TOURNAMENTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List tournaments_; + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + @java.lang.Override + public java.util.List getTournamentsList() { + return tournaments_; + } + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + @java.lang.Override + public java.util.List + getTournamentsOrBuilderList() { + return tournaments_; + } + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + @java.lang.Override + public int getTournamentsCount() { + return tournaments_.size(); + } + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Tournament getTournaments(int index) { + return tournaments_.get(index); + } + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentOrBuilder getTournamentsOrBuilder( + int index) { + return tournaments_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < tournaments_.size(); i++) { + output.writeMessage(1, tournaments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tournaments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tournaments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.TournamentList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.TournamentList other = (com.heroiclabs.nakama.api.TournamentList) obj; + + if (!getTournamentsList() + .equals(other.getTournamentsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTournamentsCount() > 0) { + hash = (37 * hash) + TOURNAMENTS_FIELD_NUMBER; + hash = (53 * hash) + getTournamentsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.TournamentList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.TournamentList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.TournamentList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.TournamentList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of tournaments.
+   * 
+ * + * Protobuf type {@code nakama.api.TournamentList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.TournamentList) + com.heroiclabs.nakama.api.TournamentListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.TournamentList.class, com.heroiclabs.nakama.api.TournamentList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.TournamentList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tournamentsBuilder_ == null) { + tournaments_ = java.util.Collections.emptyList(); + } else { + tournaments_ = null; + tournamentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.TournamentList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentList build() { + com.heroiclabs.nakama.api.TournamentList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentList buildPartial() { + com.heroiclabs.nakama.api.TournamentList result = new com.heroiclabs.nakama.api.TournamentList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.TournamentList result) { + if (tournamentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tournaments_ = java.util.Collections.unmodifiableList(tournaments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tournaments_ = tournaments_; + } else { + result.tournaments_ = tournamentsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.TournamentList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.TournamentList) { + return mergeFrom((com.heroiclabs.nakama.api.TournamentList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.TournamentList other) { + if (other == com.heroiclabs.nakama.api.TournamentList.getDefaultInstance()) return this; + if (tournamentsBuilder_ == null) { + if (!other.tournaments_.isEmpty()) { + if (tournaments_.isEmpty()) { + tournaments_ = other.tournaments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTournamentsIsMutable(); + tournaments_.addAll(other.tournaments_); + } + onChanged(); + } + } else { + if (!other.tournaments_.isEmpty()) { + if (tournamentsBuilder_.isEmpty()) { + tournamentsBuilder_.dispose(); + tournamentsBuilder_ = null; + tournaments_ = other.tournaments_; + bitField0_ = (bitField0_ & ~0x00000001); + tournamentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTournamentsFieldBuilder() : null; + } else { + tournamentsBuilder_.addAllMessages(other.tournaments_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.Tournament m = + input.readMessage( + com.heroiclabs.nakama.api.Tournament.parser(), + extensionRegistry); + if (tournamentsBuilder_ == null) { + ensureTournamentsIsMutable(); + tournaments_.add(m); + } else { + tournamentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List tournaments_ = + java.util.Collections.emptyList(); + private void ensureTournamentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tournaments_ = new java.util.ArrayList(tournaments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Tournament, com.heroiclabs.nakama.api.Tournament.Builder, com.heroiclabs.nakama.api.TournamentOrBuilder> tournamentsBuilder_; + + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public java.util.List getTournamentsList() { + if (tournamentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tournaments_); + } else { + return tournamentsBuilder_.getMessageList(); + } + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public int getTournamentsCount() { + if (tournamentsBuilder_ == null) { + return tournaments_.size(); + } else { + return tournamentsBuilder_.getCount(); + } + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public com.heroiclabs.nakama.api.Tournament getTournaments(int index) { + if (tournamentsBuilder_ == null) { + return tournaments_.get(index); + } else { + return tournamentsBuilder_.getMessage(index); + } + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder setTournaments( + int index, com.heroiclabs.nakama.api.Tournament value) { + if (tournamentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTournamentsIsMutable(); + tournaments_.set(index, value); + onChanged(); + } else { + tournamentsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder setTournaments( + int index, com.heroiclabs.nakama.api.Tournament.Builder builderForValue) { + if (tournamentsBuilder_ == null) { + ensureTournamentsIsMutable(); + tournaments_.set(index, builderForValue.build()); + onChanged(); + } else { + tournamentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder addTournaments(com.heroiclabs.nakama.api.Tournament value) { + if (tournamentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTournamentsIsMutable(); + tournaments_.add(value); + onChanged(); + } else { + tournamentsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder addTournaments( + int index, com.heroiclabs.nakama.api.Tournament value) { + if (tournamentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTournamentsIsMutable(); + tournaments_.add(index, value); + onChanged(); + } else { + tournamentsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder addTournaments( + com.heroiclabs.nakama.api.Tournament.Builder builderForValue) { + if (tournamentsBuilder_ == null) { + ensureTournamentsIsMutable(); + tournaments_.add(builderForValue.build()); + onChanged(); + } else { + tournamentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder addTournaments( + int index, com.heroiclabs.nakama.api.Tournament.Builder builderForValue) { + if (tournamentsBuilder_ == null) { + ensureTournamentsIsMutable(); + tournaments_.add(index, builderForValue.build()); + onChanged(); + } else { + tournamentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder addAllTournaments( + java.lang.Iterable values) { + if (tournamentsBuilder_ == null) { + ensureTournamentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tournaments_); + onChanged(); + } else { + tournamentsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder clearTournaments() { + if (tournamentsBuilder_ == null) { + tournaments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tournamentsBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public Builder removeTournaments(int index) { + if (tournamentsBuilder_ == null) { + ensureTournamentsIsMutable(); + tournaments_.remove(index); + onChanged(); + } else { + tournamentsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public com.heroiclabs.nakama.api.Tournament.Builder getTournamentsBuilder( + int index) { + return getTournamentsFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public com.heroiclabs.nakama.api.TournamentOrBuilder getTournamentsOrBuilder( + int index) { + if (tournamentsBuilder_ == null) { + return tournaments_.get(index); } else { + return tournamentsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public java.util.List + getTournamentsOrBuilderList() { + if (tournamentsBuilder_ != null) { + return tournamentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tournaments_); + } + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public com.heroiclabs.nakama.api.Tournament.Builder addTournamentsBuilder() { + return getTournamentsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.Tournament.getDefaultInstance()); + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public com.heroiclabs.nakama.api.Tournament.Builder addTournamentsBuilder( + int index) { + return getTournamentsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.Tournament.getDefaultInstance()); + } + /** + *
+     * The list of tournaments returned.
+     * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + public java.util.List + getTournamentsBuilderList() { + return getTournamentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Tournament, com.heroiclabs.nakama.api.Tournament.Builder, com.heroiclabs.nakama.api.TournamentOrBuilder> + getTournamentsFieldBuilder() { + if (tournamentsBuilder_ == null) { + tournamentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Tournament, com.heroiclabs.nakama.api.Tournament.Builder, com.heroiclabs.nakama.api.TournamentOrBuilder>( + tournaments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + tournaments_ = null; + } + return tournamentsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A pagination cursor (optional).
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.TournamentList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.TournamentList) + private static final com.heroiclabs.nakama.api.TournamentList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.TournamentList(); + } + + public static com.heroiclabs.nakama.api.TournamentList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TournamentList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/TournamentListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/TournamentListOrBuilder.java new file mode 100644 index 00000000..ee071220 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/TournamentListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface TournamentListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.TournamentList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + java.util.List + getTournamentsList(); + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + com.heroiclabs.nakama.api.Tournament getTournaments(int index); + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + int getTournamentsCount(); + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + java.util.List + getTournamentsOrBuilderList(); + /** + *
+   * The list of tournaments returned.
+   * 
+ * + * repeated .nakama.api.Tournament tournaments = 1 [json_name = "tournaments"]; + */ + com.heroiclabs.nakama.api.TournamentOrBuilder getTournamentsOrBuilder( + int index); + + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A pagination cursor (optional).
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/TournamentOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/TournamentOrBuilder.java new file mode 100644 index 00000000..e0bed547 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/TournamentOrBuilder.java @@ -0,0 +1,311 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface TournamentOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Tournament) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the tournament.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The ID of the tournament.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The title for the tournament.
+   * 
+ * + * string title = 2 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The title for the tournament.
+   * 
+ * + * string title = 2 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * The description of the tournament. May be blank.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of the tournament. May be blank.
+   * 
+ * + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * The category of the tournament. e.g. "vip" could be category 1.
+   * 
+ * + * uint32 category = 4 [json_name = "category"]; + * @return The category. + */ + int getCategory(); + + /** + *
+   * ASC (0) or DESC (1) sort mode of scores in the tournament.
+   * 
+ * + * uint32 sort_order = 5 [json_name = "sortOrder"]; + * @return The sortOrder. + */ + int getSortOrder(); + + /** + *
+   * The current number of players in the tournament.
+   * 
+ * + * uint32 size = 6 [json_name = "size"]; + * @return The size. + */ + int getSize(); + + /** + *
+   * The maximum number of players for the tournament.
+   * 
+ * + * uint32 max_size = 7 [json_name = "maxSize"]; + * @return The maxSize. + */ + int getMaxSize(); + + /** + *
+   * The maximum score updates allowed per player for the current tournament.
+   * 
+ * + * uint32 max_num_score = 8 [json_name = "maxNumScore"]; + * @return The maxNumScore. + */ + int getMaxNumScore(); + + /** + *
+   * True if the tournament is active and can enter. A computed value.
+   * 
+ * + * bool can_enter = 9 [json_name = "canEnter"]; + * @return The canEnter. + */ + boolean getCanEnter(); + + /** + *
+   * The UNIX time when the tournament stops being active until next reset. A computed value.
+   * 
+ * + * uint32 end_active = 10 [json_name = "endActive"]; + * @return The endActive. + */ + int getEndActive(); + + /** + *
+   * The UNIX time when the tournament is next playable. A computed value.
+   * 
+ * + * uint32 next_reset = 11 [json_name = "nextReset"]; + * @return The nextReset. + */ + int getNextReset(); + + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @return The metadata. + */ + java.lang.String getMetadata(); + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 12 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + com.google.protobuf.ByteString + getMetadataBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 13 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will start.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 14 [json_name = "startTime"]; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the tournament will be stopped.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 15 [json_name = "endTime"]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * Duration of the tournament in seconds.
+   * 
+ * + * uint32 duration = 16 [json_name = "duration"]; + * @return The duration. + */ + int getDuration(); + + /** + *
+   * The UNIX time when the tournament start being active. A computed value.
+   * 
+ * + * uint32 start_active = 17 [json_name = "startActive"]; + * @return The startActive. + */ + int getStartActive(); + + /** + *
+   * The UNIX time when the tournament was last reset. A computed value.
+   * 
+ * + * uint32 prev_reset = 18 [json_name = "prevReset"]; + * @return The prevReset. + */ + int getPrevReset(); + + /** + *
+   * Operator.
+   * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + int getOperatorValue(); + /** + *
+   * Operator.
+   * 
+ * + * .nakama.api.Operator operator = 19 [json_name = "operator"]; + * @return The operator. + */ + com.heroiclabs.nakama.api.Operator getOperator(); + + /** + *
+   * Whether the leaderboard was created authoritatively or not.
+   * 
+ * + * bool authoritative = 20 [json_name = "authoritative"]; + * @return The authoritative. + */ + boolean getAuthoritative(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/TournamentRecordList.java b/src/main/java/com/heroiclabs/nakama/api/TournamentRecordList.java new file mode 100644 index 00000000..2e9bcf4e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/TournamentRecordList.java @@ -0,0 +1,1672 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A set of tournament records which may be part of a tournament records page or a batch of individual records.
+ * 
+ * + * Protobuf type {@code nakama.api.TournamentRecordList} + */ +public final class TournamentRecordList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.TournamentRecordList) + TournamentRecordListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + TournamentRecordList.class.getName()); + } + // Use TournamentRecordList.newBuilder() to construct. + private TournamentRecordList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TournamentRecordList() { + records_ = java.util.Collections.emptyList(); + ownerRecords_ = java.util.Collections.emptyList(); + nextCursor_ = ""; + prevCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentRecordList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentRecordList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.TournamentRecordList.class, com.heroiclabs.nakama.api.TournamentRecordList.Builder.class); + } + + public static final int RECORDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List records_; + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public java.util.List getRecordsList() { + return records_; + } + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public java.util.List + getRecordsOrBuilderList() { + return records_; + } + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public int getRecordsCount() { + return records_.size(); + } + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index) { + return records_.get(index); + } + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getRecordsOrBuilder( + int index) { + return records_.get(index); + } + + public static final int OWNER_RECORDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List ownerRecords_; + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public java.util.List getOwnerRecordsList() { + return ownerRecords_; + } + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public java.util.List + getOwnerRecordsOrBuilderList() { + return ownerRecords_; + } + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public int getOwnerRecordsCount() { + return ownerRecords_.size(); + } + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecord getOwnerRecords(int index) { + return ownerRecords_.get(index); + } + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getOwnerRecordsOrBuilder( + int index) { + return ownerRecords_.get(index); + } + + public static final int NEXT_CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object nextCursor_ = ""; + /** + *
+   * The cursor to send when retireving the next page (optional).
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + @java.lang.Override + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retireving the next page (optional).
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREV_CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object prevCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the previous page (optional).
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + @java.lang.Override + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the previous page (optional).
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RANK_COUNT_FIELD_NUMBER = 5; + private long rankCount_ = 0L; + /** + *
+   * The total number of ranks available.
+   * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return The rankCount. + */ + @java.lang.Override + public long getRankCount() { + return rankCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < records_.size(); i++) { + output.writeMessage(1, records_.get(i)); + } + for (int i = 0; i < ownerRecords_.size(); i++) { + output.writeMessage(2, ownerRecords_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, prevCursor_); + } + if (rankCount_ != 0L) { + output.writeInt64(5, rankCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < records_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, records_.get(i)); + } + for (int i = 0; i < ownerRecords_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, ownerRecords_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, prevCursor_); + } + if (rankCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, rankCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.TournamentRecordList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.TournamentRecordList other = (com.heroiclabs.nakama.api.TournamentRecordList) obj; + + if (!getRecordsList() + .equals(other.getRecordsList())) return false; + if (!getOwnerRecordsList() + .equals(other.getOwnerRecordsList())) return false; + if (!getNextCursor() + .equals(other.getNextCursor())) return false; + if (!getPrevCursor() + .equals(other.getPrevCursor())) return false; + if (getRankCount() + != other.getRankCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRecordsCount() > 0) { + hash = (37 * hash) + RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getRecordsList().hashCode(); + } + if (getOwnerRecordsCount() > 0) { + hash = (37 * hash) + OWNER_RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getOwnerRecordsList().hashCode(); + } + hash = (37 * hash) + NEXT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getNextCursor().hashCode(); + hash = (37 * hash) + PREV_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getPrevCursor().hashCode(); + hash = (37 * hash) + RANK_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRankCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.TournamentRecordList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.TournamentRecordList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.TournamentRecordList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.TournamentRecordList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of tournament records which may be part of a tournament records page or a batch of individual records.
+   * 
+ * + * Protobuf type {@code nakama.api.TournamentRecordList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.TournamentRecordList) + com.heroiclabs.nakama.api.TournamentRecordListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentRecordList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentRecordList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.TournamentRecordList.class, com.heroiclabs.nakama.api.TournamentRecordList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.TournamentRecordList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + } else { + records_ = null; + recordsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (ownerRecordsBuilder_ == null) { + ownerRecords_ = java.util.Collections.emptyList(); + } else { + ownerRecords_ = null; + ownerRecordsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + nextCursor_ = ""; + prevCursor_ = ""; + rankCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_TournamentRecordList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentRecordList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.TournamentRecordList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentRecordList build() { + com.heroiclabs.nakama.api.TournamentRecordList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentRecordList buildPartial() { + com.heroiclabs.nakama.api.TournamentRecordList result = new com.heroiclabs.nakama.api.TournamentRecordList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.TournamentRecordList result) { + if (recordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + records_ = java.util.Collections.unmodifiableList(records_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.records_ = records_; + } else { + result.records_ = recordsBuilder_.build(); + } + if (ownerRecordsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + ownerRecords_ = java.util.Collections.unmodifiableList(ownerRecords_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ownerRecords_ = ownerRecords_; + } else { + result.ownerRecords_ = ownerRecordsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.TournamentRecordList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nextCursor_ = nextCursor_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.prevCursor_ = prevCursor_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rankCount_ = rankCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.TournamentRecordList) { + return mergeFrom((com.heroiclabs.nakama.api.TournamentRecordList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.TournamentRecordList other) { + if (other == com.heroiclabs.nakama.api.TournamentRecordList.getDefaultInstance()) return this; + if (recordsBuilder_ == null) { + if (!other.records_.isEmpty()) { + if (records_.isEmpty()) { + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRecordsIsMutable(); + records_.addAll(other.records_); + } + onChanged(); + } + } else { + if (!other.records_.isEmpty()) { + if (recordsBuilder_.isEmpty()) { + recordsBuilder_.dispose(); + recordsBuilder_ = null; + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + recordsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRecordsFieldBuilder() : null; + } else { + recordsBuilder_.addAllMessages(other.records_); + } + } + } + if (ownerRecordsBuilder_ == null) { + if (!other.ownerRecords_.isEmpty()) { + if (ownerRecords_.isEmpty()) { + ownerRecords_ = other.ownerRecords_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOwnerRecordsIsMutable(); + ownerRecords_.addAll(other.ownerRecords_); + } + onChanged(); + } + } else { + if (!other.ownerRecords_.isEmpty()) { + if (ownerRecordsBuilder_.isEmpty()) { + ownerRecordsBuilder_.dispose(); + ownerRecordsBuilder_ = null; + ownerRecords_ = other.ownerRecords_; + bitField0_ = (bitField0_ & ~0x00000002); + ownerRecordsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOwnerRecordsFieldBuilder() : null; + } else { + ownerRecordsBuilder_.addAllMessages(other.ownerRecords_); + } + } + } + if (!other.getNextCursor().isEmpty()) { + nextCursor_ = other.nextCursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPrevCursor().isEmpty()) { + prevCursor_ = other.prevCursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getRankCount() != 0L) { + setRankCount(other.getRankCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.LeaderboardRecord m = + input.readMessage( + com.heroiclabs.nakama.api.LeaderboardRecord.parser(), + extensionRegistry); + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(m); + } else { + recordsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.api.LeaderboardRecord m = + input.readMessage( + com.heroiclabs.nakama.api.LeaderboardRecord.parser(), + extensionRegistry); + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(m); + } else { + ownerRecordsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + nextCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + prevCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + rankCount_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List records_ = + java.util.Collections.emptyList(); + private void ensureRecordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + records_ = new java.util.ArrayList(records_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> recordsBuilder_; + + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public java.util.List getRecordsList() { + if (recordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(records_); + } else { + return recordsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public int getRecordsCount() { + if (recordsBuilder_ == null) { + return records_.size(); + } else { + return recordsBuilder_.getCount(); + } + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index) { + if (recordsBuilder_ == null) { + return records_.get(index); + } else { + return recordsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder setRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.set(index, value); + onChanged(); + } else { + recordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder setRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.set(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords(com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(value); + onChanged(); + } else { + recordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(index, value); + onChanged(); + } else { + recordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords( + com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder addAllRecords( + java.lang.Iterable values) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, records_); + onChanged(); + } else { + recordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder clearRecords() { + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + recordsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public Builder removeRecords(int index) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.remove(index); + onChanged(); + } else { + recordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder getRecordsBuilder( + int index) { + return getRecordsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getRecordsOrBuilder( + int index) { + if (recordsBuilder_ == null) { + return records_.get(index); } else { + return recordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public java.util.List + getRecordsOrBuilderList() { + if (recordsBuilder_ != null) { + return recordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(records_); + } + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addRecordsBuilder() { + return getRecordsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addRecordsBuilder( + int index) { + return getRecordsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A list of tournament records.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + public java.util.List + getRecordsBuilderList() { + return getRecordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> + getRecordsFieldBuilder() { + if (recordsBuilder_ == null) { + recordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder>( + records_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + records_ = null; + } + return recordsBuilder_; + } + + private java.util.List ownerRecords_ = + java.util.Collections.emptyList(); + private void ensureOwnerRecordsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ownerRecords_ = new java.util.ArrayList(ownerRecords_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> ownerRecordsBuilder_; + + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public java.util.List getOwnerRecordsList() { + if (ownerRecordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ownerRecords_); + } else { + return ownerRecordsBuilder_.getMessageList(); + } + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public int getOwnerRecordsCount() { + if (ownerRecordsBuilder_ == null) { + return ownerRecords_.size(); + } else { + return ownerRecordsBuilder_.getCount(); + } + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord getOwnerRecords(int index) { + if (ownerRecordsBuilder_ == null) { + return ownerRecords_.get(index); + } else { + return ownerRecordsBuilder_.getMessage(index); + } + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder setOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (ownerRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnerRecordsIsMutable(); + ownerRecords_.set(index, value); + onChanged(); + } else { + ownerRecordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder setOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.set(index, builderForValue.build()); + onChanged(); + } else { + ownerRecordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords(com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (ownerRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(value); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord value) { + if (ownerRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(index, value); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords( + com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(builderForValue.build()); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addOwnerRecords( + int index, com.heroiclabs.nakama.api.LeaderboardRecord.Builder builderForValue) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.add(index, builderForValue.build()); + onChanged(); + } else { + ownerRecordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder addAllOwnerRecords( + java.lang.Iterable values) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ownerRecords_); + onChanged(); + } else { + ownerRecordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder clearOwnerRecords() { + if (ownerRecordsBuilder_ == null) { + ownerRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + ownerRecordsBuilder_.clear(); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public Builder removeOwnerRecords(int index) { + if (ownerRecordsBuilder_ == null) { + ensureOwnerRecordsIsMutable(); + ownerRecords_.remove(index); + onChanged(); + } else { + ownerRecordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder getOwnerRecordsBuilder( + int index) { + return getOwnerRecordsFieldBuilder().getBuilder(index); + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getOwnerRecordsOrBuilder( + int index) { + if (ownerRecordsBuilder_ == null) { + return ownerRecords_.get(index); } else { + return ownerRecordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public java.util.List + getOwnerRecordsOrBuilderList() { + if (ownerRecordsBuilder_ != null) { + return ownerRecordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ownerRecords_); + } + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addOwnerRecordsBuilder() { + return getOwnerRecordsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public com.heroiclabs.nakama.api.LeaderboardRecord.Builder addOwnerRecordsBuilder( + int index) { + return getOwnerRecordsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.LeaderboardRecord.getDefaultInstance()); + } + /** + *
+     * A batched set of tournament records belonging to specified owners.
+     * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + public java.util.List + getOwnerRecordsBuilderList() { + return getOwnerRecordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder> + getOwnerRecordsFieldBuilder() { + if (ownerRecordsBuilder_ == null) { + ownerRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.LeaderboardRecord, com.heroiclabs.nakama.api.LeaderboardRecord.Builder, com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder>( + ownerRecords_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + ownerRecords_ = null; + } + return ownerRecordsBuilder_; + } + + private java.lang.Object nextCursor_ = ""; + /** + *
+     * The cursor to send when retireving the next page (optional).
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retireving the next page (optional).
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retireving the next page (optional).
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @param value The nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retireving the next page (optional).
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return This builder for chaining. + */ + public Builder clearNextCursor() { + nextCursor_ = getDefaultInstance().getNextCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retireving the next page (optional).
+     * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @param value The bytes for nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object prevCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the previous page (optional).
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page (optional).
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page (optional).
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @param value The prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + prevCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page (optional).
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return This builder for chaining. + */ + public Builder clearPrevCursor() { + prevCursor_ = getDefaultInstance().getPrevCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page (optional).
+     * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @param value The bytes for prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + prevCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long rankCount_ ; + /** + *
+     * The total number of ranks available.
+     * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return The rankCount. + */ + @java.lang.Override + public long getRankCount() { + return rankCount_; + } + /** + *
+     * The total number of ranks available.
+     * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @param value The rankCount to set. + * @return This builder for chaining. + */ + public Builder setRankCount(long value) { + + rankCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The total number of ranks available.
+     * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return This builder for chaining. + */ + public Builder clearRankCount() { + bitField0_ = (bitField0_ & ~0x00000010); + rankCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.TournamentRecordList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.TournamentRecordList) + private static final com.heroiclabs.nakama.api.TournamentRecordList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.TournamentRecordList(); + } + + public static com.heroiclabs.nakama.api.TournamentRecordList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TournamentRecordList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.TournamentRecordList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/TournamentRecordListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/TournamentRecordListOrBuilder.java new file mode 100644 index 00000000..6de0253b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/TournamentRecordListOrBuilder.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface TournamentRecordListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.TournamentRecordList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + java.util.List + getRecordsList(); + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecord getRecords(int index); + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + int getRecordsCount(); + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + java.util.List + getRecordsOrBuilderList(); + /** + *
+   * A list of tournament records.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord records = 1 [json_name = "records"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getRecordsOrBuilder( + int index); + + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + java.util.List + getOwnerRecordsList(); + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecord getOwnerRecords(int index); + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + int getOwnerRecordsCount(); + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + java.util.List + getOwnerRecordsOrBuilderList(); + /** + *
+   * A batched set of tournament records belonging to specified owners.
+   * 
+ * + * repeated .nakama.api.LeaderboardRecord owner_records = 2 [json_name = "ownerRecords"]; + */ + com.heroiclabs.nakama.api.LeaderboardRecordOrBuilder getOwnerRecordsOrBuilder( + int index); + + /** + *
+   * The cursor to send when retireving the next page (optional).
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + java.lang.String getNextCursor(); + /** + *
+   * The cursor to send when retireving the next page (optional).
+   * 
+ * + * string next_cursor = 3 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + com.google.protobuf.ByteString + getNextCursorBytes(); + + /** + *
+   * The cursor to send when retrieving the previous page (optional).
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + java.lang.String getPrevCursor(); + /** + *
+   * The cursor to send when retrieving the previous page (optional).
+   * 
+ * + * string prev_cursor = 4 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + com.google.protobuf.ByteString + getPrevCursorBytes(); + + /** + *
+   * The total number of ranks available.
+   * 
+ * + * int64 rank_count = 5 [json_name = "rankCount"]; + * @return The rankCount. + */ + long getRankCount(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequest.java b/src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequest.java new file mode 100644 index 00000000..1e75ab45 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequest.java @@ -0,0 +1,1779 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Update a user's account details.
+ * 
+ * + * Protobuf type {@code nakama.api.UpdateAccountRequest} + */ +public final class UpdateAccountRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.UpdateAccountRequest) + UpdateAccountRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + UpdateAccountRequest.class.getName()); + } + // Use UpdateAccountRequest.newBuilder() to construct. + private UpdateAccountRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UpdateAccountRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UpdateAccountRequest.class, com.heroiclabs.nakama.api.UpdateAccountRequest.Builder.class); + } + + private int bitField0_; + public static final int USERNAME_FIELD_NUMBER = 1; + private com.google.protobuf.StringValue username_; + /** + *
+   * The username of the user's account.
+   * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + * @return Whether the username field is set. + */ + @java.lang.Override + public boolean hasUsername() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The username of the user's account.
+   * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public com.google.protobuf.StringValue getUsername() { + return username_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : username_; + } + /** + *
+   * The username of the user's account.
+   * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getUsernameOrBuilder() { + return username_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : username_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private com.google.protobuf.StringValue displayName_; + /** + *
+   * The display name of the user.
+   * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + * @return Whether the displayName field is set. + */ + @java.lang.Override + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The display name of the user.
+   * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + * @return The displayName. + */ + @java.lang.Override + public com.google.protobuf.StringValue getDisplayName() { + return displayName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : displayName_; + } + /** + *
+   * The display name of the user.
+   * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getDisplayNameOrBuilder() { + return displayName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : displayName_; + } + + public static final int AVATAR_URL_FIELD_NUMBER = 3; + private com.google.protobuf.StringValue avatarUrl_; + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + * @return Whether the avatarUrl field is set. + */ + @java.lang.Override + public boolean hasAvatarUrl() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + @java.lang.Override + public com.google.protobuf.StringValue getAvatarUrl() { + return avatarUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getAvatarUrlOrBuilder() { + return avatarUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } + + public static final int LANG_TAG_FIELD_NUMBER = 4; + private com.google.protobuf.StringValue langTag_; + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return Whether the langTag field is set. + */ + @java.lang.Override + public boolean hasLangTag() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + @java.lang.Override + public com.google.protobuf.StringValue getLangTag() { + return langTag_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getLangTagOrBuilder() { + return langTag_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } + + public static final int LOCATION_FIELD_NUMBER = 5; + private com.google.protobuf.StringValue location_; + /** + *
+   * The location set by the user.
+   * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+   * The location set by the user.
+   * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + * @return The location. + */ + @java.lang.Override + public com.google.protobuf.StringValue getLocation() { + return location_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : location_; + } + /** + *
+   * The location set by the user.
+   * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getLocationOrBuilder() { + return location_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : location_; + } + + public static final int TIMEZONE_FIELD_NUMBER = 6; + private com.google.protobuf.StringValue timezone_; + /** + *
+   * The timezone set by the user.
+   * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + * @return Whether the timezone field is set. + */ + @java.lang.Override + public boolean hasTimezone() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+   * The timezone set by the user.
+   * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + * @return The timezone. + */ + @java.lang.Override + public com.google.protobuf.StringValue getTimezone() { + return timezone_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : timezone_; + } + /** + *
+   * The timezone set by the user.
+   * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getTimezoneOrBuilder() { + return timezone_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : timezone_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUsername()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getDisplayName()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getAvatarUrl()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getLangTag()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getLocation()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(6, getTimezone()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUsername()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDisplayName()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAvatarUrl()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getLangTag()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLocation()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getTimezone()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.UpdateAccountRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.UpdateAccountRequest other = (com.heroiclabs.nakama.api.UpdateAccountRequest) obj; + + if (hasUsername() != other.hasUsername()) return false; + if (hasUsername()) { + if (!getUsername() + .equals(other.getUsername())) return false; + } + if (hasDisplayName() != other.hasDisplayName()) return false; + if (hasDisplayName()) { + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + } + if (hasAvatarUrl() != other.hasAvatarUrl()) return false; + if (hasAvatarUrl()) { + if (!getAvatarUrl() + .equals(other.getAvatarUrl())) return false; + } + if (hasLangTag() != other.hasLangTag()) return false; + if (hasLangTag()) { + if (!getLangTag() + .equals(other.getLangTag())) return false; + } + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation() + .equals(other.getLocation())) return false; + } + if (hasTimezone() != other.hasTimezone()) return false; + if (hasTimezone()) { + if (!getTimezone() + .equals(other.getTimezone())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUsername()) { + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + } + if (hasDisplayName()) { + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + } + if (hasAvatarUrl()) { + hash = (37 * hash) + AVATAR_URL_FIELD_NUMBER; + hash = (53 * hash) + getAvatarUrl().hashCode(); + } + if (hasLangTag()) { + hash = (37 * hash) + LANG_TAG_FIELD_NUMBER; + hash = (53 * hash) + getLangTag().hashCode(); + } + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (hasTimezone()) { + hash = (37 * hash) + TIMEZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimezone().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UpdateAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.UpdateAccountRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Update a user's account details.
+   * 
+ * + * Protobuf type {@code nakama.api.UpdateAccountRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.UpdateAccountRequest) + com.heroiclabs.nakama.api.UpdateAccountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UpdateAccountRequest.class, com.heroiclabs.nakama.api.UpdateAccountRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.UpdateAccountRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getUsernameFieldBuilder(); + getDisplayNameFieldBuilder(); + getAvatarUrlFieldBuilder(); + getLangTagFieldBuilder(); + getLocationFieldBuilder(); + getTimezoneFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + username_ = null; + if (usernameBuilder_ != null) { + usernameBuilder_.dispose(); + usernameBuilder_ = null; + } + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + avatarUrl_ = null; + if (avatarUrlBuilder_ != null) { + avatarUrlBuilder_.dispose(); + avatarUrlBuilder_ = null; + } + langTag_ = null; + if (langTagBuilder_ != null) { + langTagBuilder_.dispose(); + langTagBuilder_ = null; + } + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + timezone_ = null; + if (timezoneBuilder_ != null) { + timezoneBuilder_.dispose(); + timezoneBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateAccountRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateAccountRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.UpdateAccountRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateAccountRequest build() { + com.heroiclabs.nakama.api.UpdateAccountRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateAccountRequest buildPartial() { + com.heroiclabs.nakama.api.UpdateAccountRequest result = new com.heroiclabs.nakama.api.UpdateAccountRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.UpdateAccountRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.username_ = usernameBuilder_ == null + ? username_ + : usernameBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayNameBuilder_ == null + ? displayName_ + : displayNameBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.avatarUrl_ = avatarUrlBuilder_ == null + ? avatarUrl_ + : avatarUrlBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.langTag_ = langTagBuilder_ == null + ? langTag_ + : langTagBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.location_ = locationBuilder_ == null + ? location_ + : locationBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.timezone_ = timezoneBuilder_ == null + ? timezone_ + : timezoneBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.UpdateAccountRequest) { + return mergeFrom((com.heroiclabs.nakama.api.UpdateAccountRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.UpdateAccountRequest other) { + if (other == com.heroiclabs.nakama.api.UpdateAccountRequest.getDefaultInstance()) return this; + if (other.hasUsername()) { + mergeUsername(other.getUsername()); + } + if (other.hasDisplayName()) { + mergeDisplayName(other.getDisplayName()); + } + if (other.hasAvatarUrl()) { + mergeAvatarUrl(other.getAvatarUrl()); + } + if (other.hasLangTag()) { + mergeLangTag(other.getLangTag()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (other.hasTimezone()) { + mergeTimezone(other.getTimezone()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUsernameFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getDisplayNameFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getAvatarUrlFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getLangTagFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getLocationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getTimezoneFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.StringValue username_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> usernameBuilder_; + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + * @return Whether the username field is set. + */ + public boolean hasUsername() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + * @return The username. + */ + public com.google.protobuf.StringValue getUsername() { + if (usernameBuilder_ == null) { + return username_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : username_; + } else { + return usernameBuilder_.getMessage(); + } + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + public Builder setUsername(com.google.protobuf.StringValue value) { + if (usernameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + username_ = value; + } else { + usernameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + public Builder setUsername( + com.google.protobuf.StringValue.Builder builderForValue) { + if (usernameBuilder_ == null) { + username_ = builderForValue.build(); + } else { + usernameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + public Builder mergeUsername(com.google.protobuf.StringValue value) { + if (usernameBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + username_ != null && + username_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getUsernameBuilder().mergeFrom(value); + } else { + username_ = value; + } + } else { + usernameBuilder_.mergeFrom(value); + } + if (username_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + public Builder clearUsername() { + bitField0_ = (bitField0_ & ~0x00000001); + username_ = null; + if (usernameBuilder_ != null) { + usernameBuilder_.dispose(); + usernameBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + public com.google.protobuf.StringValue.Builder getUsernameBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUsernameFieldBuilder().getBuilder(); + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + public com.google.protobuf.StringValueOrBuilder getUsernameOrBuilder() { + if (usernameBuilder_ != null) { + return usernameBuilder_.getMessageOrBuilder(); + } else { + return username_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : username_; + } + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getUsernameFieldBuilder() { + if (usernameBuilder_ == null) { + usernameBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getUsername(), + getParentForChildren(), + isClean()); + username_ = null; + } + return usernameBuilder_; + } + + private com.google.protobuf.StringValue displayName_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> displayNameBuilder_; + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + * @return Whether the displayName field is set. + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + * @return The displayName. + */ + public com.google.protobuf.StringValue getDisplayName() { + if (displayNameBuilder_ == null) { + return displayName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : displayName_; + } else { + return displayNameBuilder_.getMessage(); + } + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + public Builder setDisplayName(com.google.protobuf.StringValue value) { + if (displayNameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + } else { + displayNameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + public Builder setDisplayName( + com.google.protobuf.StringValue.Builder builderForValue) { + if (displayNameBuilder_ == null) { + displayName_ = builderForValue.build(); + } else { + displayNameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + public Builder mergeDisplayName(com.google.protobuf.StringValue value) { + if (displayNameBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + displayName_ != null && + displayName_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getDisplayNameBuilder().mergeFrom(value); + } else { + displayName_ = value; + } + } else { + displayNameBuilder_.mergeFrom(value); + } + if (displayName_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + public Builder clearDisplayName() { + bitField0_ = (bitField0_ & ~0x00000002); + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + public com.google.protobuf.StringValue.Builder getDisplayNameBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDisplayNameFieldBuilder().getBuilder(); + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + public com.google.protobuf.StringValueOrBuilder getDisplayNameOrBuilder() { + if (displayNameBuilder_ != null) { + return displayNameBuilder_.getMessageOrBuilder(); + } else { + return displayName_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : displayName_; + } + } + /** + *
+     * The display name of the user.
+     * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getDisplayNameFieldBuilder() { + if (displayNameBuilder_ == null) { + displayNameBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getDisplayName(), + getParentForChildren(), + isClean()); + displayName_ = null; + } + return displayNameBuilder_; + } + + private com.google.protobuf.StringValue avatarUrl_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> avatarUrlBuilder_; + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + * @return Whether the avatarUrl field is set. + */ + public boolean hasAvatarUrl() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + public com.google.protobuf.StringValue getAvatarUrl() { + if (avatarUrlBuilder_ == null) { + return avatarUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } else { + return avatarUrlBuilder_.getMessage(); + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + public Builder setAvatarUrl(com.google.protobuf.StringValue value) { + if (avatarUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarUrl_ = value; + } else { + avatarUrlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + public Builder setAvatarUrl( + com.google.protobuf.StringValue.Builder builderForValue) { + if (avatarUrlBuilder_ == null) { + avatarUrl_ = builderForValue.build(); + } else { + avatarUrlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + public Builder mergeAvatarUrl(com.google.protobuf.StringValue value) { + if (avatarUrlBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + avatarUrl_ != null && + avatarUrl_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getAvatarUrlBuilder().mergeFrom(value); + } else { + avatarUrl_ = value; + } + } else { + avatarUrlBuilder_.mergeFrom(value); + } + if (avatarUrl_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + public Builder clearAvatarUrl() { + bitField0_ = (bitField0_ & ~0x00000004); + avatarUrl_ = null; + if (avatarUrlBuilder_ != null) { + avatarUrlBuilder_.dispose(); + avatarUrlBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + public com.google.protobuf.StringValue.Builder getAvatarUrlBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAvatarUrlFieldBuilder().getBuilder(); + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + public com.google.protobuf.StringValueOrBuilder getAvatarUrlOrBuilder() { + if (avatarUrlBuilder_ != null) { + return avatarUrlBuilder_.getMessageOrBuilder(); + } else { + return avatarUrl_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getAvatarUrlFieldBuilder() { + if (avatarUrlBuilder_ == null) { + avatarUrlBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getAvatarUrl(), + getParentForChildren(), + isClean()); + avatarUrl_ = null; + } + return avatarUrlBuilder_; + } + + private com.google.protobuf.StringValue langTag_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> langTagBuilder_; + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return Whether the langTag field is set. + */ + public boolean hasLangTag() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + public com.google.protobuf.StringValue getLangTag() { + if (langTagBuilder_ == null) { + return langTag_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } else { + return langTagBuilder_.getMessage(); + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder setLangTag(com.google.protobuf.StringValue value) { + if (langTagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + langTag_ = value; + } else { + langTagBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder setLangTag( + com.google.protobuf.StringValue.Builder builderForValue) { + if (langTagBuilder_ == null) { + langTag_ = builderForValue.build(); + } else { + langTagBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder mergeLangTag(com.google.protobuf.StringValue value) { + if (langTagBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + langTag_ != null && + langTag_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getLangTagBuilder().mergeFrom(value); + } else { + langTag_ = value; + } + } else { + langTagBuilder_.mergeFrom(value); + } + if (langTag_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder clearLangTag() { + bitField0_ = (bitField0_ & ~0x00000008); + langTag_ = null; + if (langTagBuilder_ != null) { + langTagBuilder_.dispose(); + langTagBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public com.google.protobuf.StringValue.Builder getLangTagBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getLangTagFieldBuilder().getBuilder(); + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public com.google.protobuf.StringValueOrBuilder getLangTagOrBuilder() { + if (langTagBuilder_ != null) { + return langTagBuilder_.getMessageOrBuilder(); + } else { + return langTag_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getLangTagFieldBuilder() { + if (langTagBuilder_ == null) { + langTagBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getLangTag(), + getParentForChildren(), + isClean()); + langTag_ = null; + } + return langTagBuilder_; + } + + private com.google.protobuf.StringValue location_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> locationBuilder_; + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + * @return The location. + */ + public com.google.protobuf.StringValue getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + public Builder setLocation(com.google.protobuf.StringValue value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + public Builder setLocation( + com.google.protobuf.StringValue.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + public Builder mergeLocation(com.google.protobuf.StringValue value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + location_ != null && + location_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + if (location_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000010); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + public com.google.protobuf.StringValue.Builder getLocationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + public com.google.protobuf.StringValueOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : location_; + } + } + /** + *
+     * The location set by the user.
+     * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getLocation(), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.protobuf.StringValue timezone_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> timezoneBuilder_; + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + * @return Whether the timezone field is set. + */ + public boolean hasTimezone() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + * @return The timezone. + */ + public com.google.protobuf.StringValue getTimezone() { + if (timezoneBuilder_ == null) { + return timezone_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : timezone_; + } else { + return timezoneBuilder_.getMessage(); + } + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + public Builder setTimezone(com.google.protobuf.StringValue value) { + if (timezoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timezone_ = value; + } else { + timezoneBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + public Builder setTimezone( + com.google.protobuf.StringValue.Builder builderForValue) { + if (timezoneBuilder_ == null) { + timezone_ = builderForValue.build(); + } else { + timezoneBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + public Builder mergeTimezone(com.google.protobuf.StringValue value) { + if (timezoneBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + timezone_ != null && + timezone_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getTimezoneBuilder().mergeFrom(value); + } else { + timezone_ = value; + } + } else { + timezoneBuilder_.mergeFrom(value); + } + if (timezone_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + public Builder clearTimezone() { + bitField0_ = (bitField0_ & ~0x00000020); + timezone_ = null; + if (timezoneBuilder_ != null) { + timezoneBuilder_.dispose(); + timezoneBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + public com.google.protobuf.StringValue.Builder getTimezoneBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getTimezoneFieldBuilder().getBuilder(); + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + public com.google.protobuf.StringValueOrBuilder getTimezoneOrBuilder() { + if (timezoneBuilder_ != null) { + return timezoneBuilder_.getMessageOrBuilder(); + } else { + return timezone_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : timezone_; + } + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getTimezoneFieldBuilder() { + if (timezoneBuilder_ == null) { + timezoneBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getTimezone(), + getParentForChildren(), + isClean()); + timezone_ = null; + } + return timezoneBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.UpdateAccountRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.UpdateAccountRequest) + private static final com.heroiclabs.nakama.api.UpdateAccountRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.UpdateAccountRequest(); + } + + public static com.heroiclabs.nakama.api.UpdateAccountRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAccountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateAccountRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequestOrBuilder.java new file mode 100644 index 00000000..8fbffc4a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UpdateAccountRequestOrBuilder.java @@ -0,0 +1,173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface UpdateAccountRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.UpdateAccountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The username of the user's account.
+   * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + * @return Whether the username field is set. + */ + boolean hasUsername(); + /** + *
+   * The username of the user's account.
+   * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + * @return The username. + */ + com.google.protobuf.StringValue getUsername(); + /** + *
+   * The username of the user's account.
+   * 
+ * + * .google.protobuf.StringValue username = 1 [json_name = "username"]; + */ + com.google.protobuf.StringValueOrBuilder getUsernameOrBuilder(); + + /** + *
+   * The display name of the user.
+   * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + * @return Whether the displayName field is set. + */ + boolean hasDisplayName(); + /** + *
+   * The display name of the user.
+   * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + * @return The displayName. + */ + com.google.protobuf.StringValue getDisplayName(); + /** + *
+   * The display name of the user.
+   * 
+ * + * .google.protobuf.StringValue display_name = 2 [json_name = "displayName"]; + */ + com.google.protobuf.StringValueOrBuilder getDisplayNameOrBuilder(); + + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + * @return Whether the avatarUrl field is set. + */ + boolean hasAvatarUrl(); + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + com.google.protobuf.StringValue getAvatarUrl(); + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 3 [json_name = "avatarUrl"]; + */ + com.google.protobuf.StringValueOrBuilder getAvatarUrlOrBuilder(); + + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return Whether the langTag field is set. + */ + boolean hasLangTag(); + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + com.google.protobuf.StringValue getLangTag(); + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + com.google.protobuf.StringValueOrBuilder getLangTagOrBuilder(); + + /** + *
+   * The location set by the user.
+   * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + * @return Whether the location field is set. + */ + boolean hasLocation(); + /** + *
+   * The location set by the user.
+   * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + * @return The location. + */ + com.google.protobuf.StringValue getLocation(); + /** + *
+   * The location set by the user.
+   * 
+ * + * .google.protobuf.StringValue location = 5 [json_name = "location"]; + */ + com.google.protobuf.StringValueOrBuilder getLocationOrBuilder(); + + /** + *
+   * The timezone set by the user.
+   * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + * @return Whether the timezone field is set. + */ + boolean hasTimezone(); + /** + *
+   * The timezone set by the user.
+   * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + * @return The timezone. + */ + com.google.protobuf.StringValue getTimezone(); + /** + *
+   * The timezone set by the user.
+   * 
+ * + * .google.protobuf.StringValue timezone = 6 [json_name = "timezone"]; + */ + com.google.protobuf.StringValueOrBuilder getTimezoneOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequest.java b/src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequest.java new file mode 100644 index 00000000..b1c2c712 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequest.java @@ -0,0 +1,1710 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Update fields in a given group.
+ * 
+ * + * Protobuf type {@code nakama.api.UpdateGroupRequest} + */ +public final class UpdateGroupRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.UpdateGroupRequest) + UpdateGroupRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + UpdateGroupRequest.class.getName()); + } + // Use UpdateGroupRequest.newBuilder() to construct. + private UpdateGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UpdateGroupRequest() { + groupId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UpdateGroupRequest.class, com.heroiclabs.nakama.api.UpdateGroupRequest.Builder.class); + } + + private int bitField0_; + public static final int GROUP_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The ID of the group to update.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The ID of the group to update.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private com.google.protobuf.StringValue name_; + /** + *
+   * Name.
+   * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Name.
+   * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public com.google.protobuf.StringValue getName() { + return name_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : name_; + } + /** + *
+   * Name.
+   * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getNameOrBuilder() { + return name_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : name_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private com.google.protobuf.StringValue description_; + /** + *
+   * Description string.
+   * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Description string.
+   * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public com.google.protobuf.StringValue getDescription() { + return description_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : description_; + } + /** + *
+   * Description string.
+   * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getDescriptionOrBuilder() { + return description_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : description_; + } + + public static final int LANG_TAG_FIELD_NUMBER = 4; + private com.google.protobuf.StringValue langTag_; + /** + *
+   * Lang tag.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return Whether the langTag field is set. + */ + @java.lang.Override + public boolean hasLangTag() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Lang tag.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + @java.lang.Override + public com.google.protobuf.StringValue getLangTag() { + return langTag_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } + /** + *
+   * Lang tag.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getLangTagOrBuilder() { + return langTag_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } + + public static final int AVATAR_URL_FIELD_NUMBER = 5; + private com.google.protobuf.StringValue avatarUrl_; + /** + *
+   * Avatar URL.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + * @return Whether the avatarUrl field is set. + */ + @java.lang.Override + public boolean hasAvatarUrl() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * Avatar URL.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + @java.lang.Override + public com.google.protobuf.StringValue getAvatarUrl() { + return avatarUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } + /** + *
+   * Avatar URL.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getAvatarUrlOrBuilder() { + return avatarUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } + + public static final int OPEN_FIELD_NUMBER = 6; + private com.google.protobuf.BoolValue open_; + /** + *
+   * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return Whether the open field is set. + */ + @java.lang.Override + public boolean hasOpen() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+   * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getOpen() { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + /** + *
+   * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder() { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, groupId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getName()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getDescription()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getLangTag()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(5, getAvatarUrl()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(6, getOpen()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, groupId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getName()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDescription()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getLangTag()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getAvatarUrl()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getOpen()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.UpdateGroupRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.UpdateGroupRequest other = (com.heroiclabs.nakama.api.UpdateGroupRequest) obj; + + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (hasName() != other.hasName()) return false; + if (hasName()) { + if (!getName() + .equals(other.getName())) return false; + } + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription() + .equals(other.getDescription())) return false; + } + if (hasLangTag() != other.hasLangTag()) return false; + if (hasLangTag()) { + if (!getLangTag() + .equals(other.getLangTag())) return false; + } + if (hasAvatarUrl() != other.hasAvatarUrl()) return false; + if (hasAvatarUrl()) { + if (!getAvatarUrl() + .equals(other.getAvatarUrl())) return false; + } + if (hasOpen() != other.hasOpen()) return false; + if (hasOpen()) { + if (!getOpen() + .equals(other.getOpen())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + if (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + if (hasLangTag()) { + hash = (37 * hash) + LANG_TAG_FIELD_NUMBER; + hash = (53 * hash) + getLangTag().hashCode(); + } + if (hasAvatarUrl()) { + hash = (37 * hash) + AVATAR_URL_FIELD_NUMBER; + hash = (53 * hash) + getAvatarUrl().hashCode(); + } + if (hasOpen()) { + hash = (37 * hash) + OPEN_FIELD_NUMBER; + hash = (53 * hash) + getOpen().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UpdateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.UpdateGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Update fields in a given group.
+   * 
+ * + * Protobuf type {@code nakama.api.UpdateGroupRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.UpdateGroupRequest) + com.heroiclabs.nakama.api.UpdateGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UpdateGroupRequest.class, com.heroiclabs.nakama.api.UpdateGroupRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.UpdateGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getNameFieldBuilder(); + getDescriptionFieldBuilder(); + getLangTagFieldBuilder(); + getAvatarUrlFieldBuilder(); + getOpenFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupId_ = ""; + name_ = null; + if (nameBuilder_ != null) { + nameBuilder_.dispose(); + nameBuilder_ = null; + } + description_ = null; + if (descriptionBuilder_ != null) { + descriptionBuilder_.dispose(); + descriptionBuilder_ = null; + } + langTag_ = null; + if (langTagBuilder_ != null) { + langTagBuilder_.dispose(); + langTagBuilder_ = null; + } + avatarUrl_ = null; + if (avatarUrlBuilder_ != null) { + avatarUrlBuilder_.dispose(); + avatarUrlBuilder_ = null; + } + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateGroupRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.UpdateGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateGroupRequest build() { + com.heroiclabs.nakama.api.UpdateGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateGroupRequest buildPartial() { + com.heroiclabs.nakama.api.UpdateGroupRequest result = new com.heroiclabs.nakama.api.UpdateGroupRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.UpdateGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupId_ = groupId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = nameBuilder_ == null + ? name_ + : nameBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = descriptionBuilder_ == null + ? description_ + : descriptionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.langTag_ = langTagBuilder_ == null + ? langTag_ + : langTagBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.avatarUrl_ = avatarUrlBuilder_ == null + ? avatarUrl_ + : avatarUrlBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.open_ = openBuilder_ == null + ? open_ + : openBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.UpdateGroupRequest) { + return mergeFrom((com.heroiclabs.nakama.api.UpdateGroupRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.UpdateGroupRequest other) { + if (other == com.heroiclabs.nakama.api.UpdateGroupRequest.getDefaultInstance()) return this; + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasName()) { + mergeName(other.getName()); + } + if (other.hasDescription()) { + mergeDescription(other.getDescription()); + } + if (other.hasLangTag()) { + mergeLangTag(other.getLangTag()); + } + if (other.hasAvatarUrl()) { + mergeAvatarUrl(other.getAvatarUrl()); + } + if (other.hasOpen()) { + mergeOpen(other.getOpen()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getNameFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getDescriptionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getLangTagFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getAvatarUrlFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getOpenFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object groupId_ = ""; + /** + *
+     * The ID of the group to update.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the group to update.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the group to update.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the group to update.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the group to update.
+     * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.StringValue name_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> nameBuilder_; + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + * @return Whether the name field is set. + */ + public boolean hasName() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + * @return The name. + */ + public com.google.protobuf.StringValue getName() { + if (nameBuilder_ == null) { + return name_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : name_; + } else { + return nameBuilder_.getMessage(); + } + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + public Builder setName(com.google.protobuf.StringValue value) { + if (nameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + } else { + nameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + public Builder setName( + com.google.protobuf.StringValue.Builder builderForValue) { + if (nameBuilder_ == null) { + name_ = builderForValue.build(); + } else { + nameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + public Builder mergeName(com.google.protobuf.StringValue value) { + if (nameBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + name_ != null && + name_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getNameBuilder().mergeFrom(value); + } else { + name_ = value; + } + } else { + nameBuilder_.mergeFrom(value); + } + if (name_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000002); + name_ = null; + if (nameBuilder_ != null) { + nameBuilder_.dispose(); + nameBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + public com.google.protobuf.StringValue.Builder getNameBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNameFieldBuilder().getBuilder(); + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + public com.google.protobuf.StringValueOrBuilder getNameOrBuilder() { + if (nameBuilder_ != null) { + return nameBuilder_.getMessageOrBuilder(); + } else { + return name_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : name_; + } + } + /** + *
+     * Name.
+     * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getNameFieldBuilder() { + if (nameBuilder_ == null) { + nameBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getName(), + getParentForChildren(), + isClean()); + name_ = null; + } + return nameBuilder_; + } + + private com.google.protobuf.StringValue description_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> descriptionBuilder_; + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + * @return The description. + */ + public com.google.protobuf.StringValue getDescription() { + if (descriptionBuilder_ == null) { + return description_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : description_; + } else { + return descriptionBuilder_.getMessage(); + } + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + public Builder setDescription(com.google.protobuf.StringValue value) { + if (descriptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + } else { + descriptionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + public Builder setDescription( + com.google.protobuf.StringValue.Builder builderForValue) { + if (descriptionBuilder_ == null) { + description_ = builderForValue.build(); + } else { + descriptionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + public Builder mergeDescription(com.google.protobuf.StringValue value) { + if (descriptionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + description_ != null && + description_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getDescriptionBuilder().mergeFrom(value); + } else { + description_ = value; + } + } else { + descriptionBuilder_.mergeFrom(value); + } + if (description_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + public Builder clearDescription() { + bitField0_ = (bitField0_ & ~0x00000004); + description_ = null; + if (descriptionBuilder_ != null) { + descriptionBuilder_.dispose(); + descriptionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + public com.google.protobuf.StringValue.Builder getDescriptionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDescriptionFieldBuilder().getBuilder(); + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + public com.google.protobuf.StringValueOrBuilder getDescriptionOrBuilder() { + if (descriptionBuilder_ != null) { + return descriptionBuilder_.getMessageOrBuilder(); + } else { + return description_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : description_; + } + } + /** + *
+     * Description string.
+     * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getDescriptionFieldBuilder() { + if (descriptionBuilder_ == null) { + descriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getDescription(), + getParentForChildren(), + isClean()); + description_ = null; + } + return descriptionBuilder_; + } + + private com.google.protobuf.StringValue langTag_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> langTagBuilder_; + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return Whether the langTag field is set. + */ + public boolean hasLangTag() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + public com.google.protobuf.StringValue getLangTag() { + if (langTagBuilder_ == null) { + return langTag_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } else { + return langTagBuilder_.getMessage(); + } + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder setLangTag(com.google.protobuf.StringValue value) { + if (langTagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + langTag_ = value; + } else { + langTagBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder setLangTag( + com.google.protobuf.StringValue.Builder builderForValue) { + if (langTagBuilder_ == null) { + langTag_ = builderForValue.build(); + } else { + langTagBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder mergeLangTag(com.google.protobuf.StringValue value) { + if (langTagBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + langTag_ != null && + langTag_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getLangTagBuilder().mergeFrom(value); + } else { + langTag_ = value; + } + } else { + langTagBuilder_.mergeFrom(value); + } + if (langTag_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public Builder clearLangTag() { + bitField0_ = (bitField0_ & ~0x00000008); + langTag_ = null; + if (langTagBuilder_ != null) { + langTagBuilder_.dispose(); + langTagBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public com.google.protobuf.StringValue.Builder getLangTagBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getLangTagFieldBuilder().getBuilder(); + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + public com.google.protobuf.StringValueOrBuilder getLangTagOrBuilder() { + if (langTagBuilder_ != null) { + return langTagBuilder_.getMessageOrBuilder(); + } else { + return langTag_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : langTag_; + } + } + /** + *
+     * Lang tag.
+     * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getLangTagFieldBuilder() { + if (langTagBuilder_ == null) { + langTagBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getLangTag(), + getParentForChildren(), + isClean()); + langTag_ = null; + } + return langTagBuilder_; + } + + private com.google.protobuf.StringValue avatarUrl_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> avatarUrlBuilder_; + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + * @return Whether the avatarUrl field is set. + */ + public boolean hasAvatarUrl() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + public com.google.protobuf.StringValue getAvatarUrl() { + if (avatarUrlBuilder_ == null) { + return avatarUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } else { + return avatarUrlBuilder_.getMessage(); + } + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + public Builder setAvatarUrl(com.google.protobuf.StringValue value) { + if (avatarUrlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarUrl_ = value; + } else { + avatarUrlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + public Builder setAvatarUrl( + com.google.protobuf.StringValue.Builder builderForValue) { + if (avatarUrlBuilder_ == null) { + avatarUrl_ = builderForValue.build(); + } else { + avatarUrlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + public Builder mergeAvatarUrl(com.google.protobuf.StringValue value) { + if (avatarUrlBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + avatarUrl_ != null && + avatarUrl_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getAvatarUrlBuilder().mergeFrom(value); + } else { + avatarUrl_ = value; + } + } else { + avatarUrlBuilder_.mergeFrom(value); + } + if (avatarUrl_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + public Builder clearAvatarUrl() { + bitField0_ = (bitField0_ & ~0x00000010); + avatarUrl_ = null; + if (avatarUrlBuilder_ != null) { + avatarUrlBuilder_.dispose(); + avatarUrlBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + public com.google.protobuf.StringValue.Builder getAvatarUrlBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getAvatarUrlFieldBuilder().getBuilder(); + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + public com.google.protobuf.StringValueOrBuilder getAvatarUrlOrBuilder() { + if (avatarUrlBuilder_ != null) { + return avatarUrlBuilder_.getMessageOrBuilder(); + } else { + return avatarUrl_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : avatarUrl_; + } + } + /** + *
+     * Avatar URL.
+     * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getAvatarUrlFieldBuilder() { + if (avatarUrlBuilder_ == null) { + avatarUrlBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getAvatarUrl(), + getParentForChildren(), + isClean()); + avatarUrl_ = null; + } + return avatarUrlBuilder_; + } + + private com.google.protobuf.BoolValue open_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> openBuilder_; + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return Whether the open field is set. + */ + public boolean hasOpen() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return The open. + */ + public com.google.protobuf.BoolValue getOpen() { + if (openBuilder_ == null) { + return open_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } else { + return openBuilder_.getMessage(); + } + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder setOpen(com.google.protobuf.BoolValue value) { + if (openBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + open_ = value; + } else { + openBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder setOpen( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (openBuilder_ == null) { + open_ = builderForValue.build(); + } else { + openBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder mergeOpen(com.google.protobuf.BoolValue value) { + if (openBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + open_ != null && + open_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getOpenBuilder().mergeFrom(value); + } else { + open_ = value; + } + } else { + openBuilder_.mergeFrom(value); + } + if (open_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public Builder clearOpen() { + bitField0_ = (bitField0_ & ~0x00000020); + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public com.google.protobuf.BoolValue.Builder getOpenBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getOpenFieldBuilder().getBuilder(); + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + public com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder() { + if (openBuilder_ != null) { + return openBuilder_.getMessageOrBuilder(); + } else { + return open_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : open_; + } + } + /** + *
+     * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+     * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getOpenFieldBuilder() { + if (openBuilder_ == null) { + openBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getOpen(), + getParentForChildren(), + isClean()); + open_ = null; + } + return openBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.UpdateGroupRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.UpdateGroupRequest) + private static final com.heroiclabs.nakama.api.UpdateGroupRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.UpdateGroupRequest(); + } + + public static com.heroiclabs.nakama.api.UpdateGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UpdateGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequestOrBuilder.java new file mode 100644 index 00000000..6a55105e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UpdateGroupRequestOrBuilder.java @@ -0,0 +1,166 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface UpdateGroupRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.UpdateGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the group to update.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The ID of the group to update.
+   * 
+ * + * string group_id = 1 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * Name.
+   * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + * @return Whether the name field is set. + */ + boolean hasName(); + /** + *
+   * Name.
+   * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + * @return The name. + */ + com.google.protobuf.StringValue getName(); + /** + *
+   * Name.
+   * 
+ * + * .google.protobuf.StringValue name = 2 [json_name = "name"]; + */ + com.google.protobuf.StringValueOrBuilder getNameOrBuilder(); + + /** + *
+   * Description string.
+   * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + * @return Whether the description field is set. + */ + boolean hasDescription(); + /** + *
+   * Description string.
+   * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + * @return The description. + */ + com.google.protobuf.StringValue getDescription(); + /** + *
+   * Description string.
+   * 
+ * + * .google.protobuf.StringValue description = 3 [json_name = "description"]; + */ + com.google.protobuf.StringValueOrBuilder getDescriptionOrBuilder(); + + /** + *
+   * Lang tag.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return Whether the langTag field is set. + */ + boolean hasLangTag(); + /** + *
+   * Lang tag.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + * @return The langTag. + */ + com.google.protobuf.StringValue getLangTag(); + /** + *
+   * Lang tag.
+   * 
+ * + * .google.protobuf.StringValue lang_tag = 4 [json_name = "langTag"]; + */ + com.google.protobuf.StringValueOrBuilder getLangTagOrBuilder(); + + /** + *
+   * Avatar URL.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + * @return Whether the avatarUrl field is set. + */ + boolean hasAvatarUrl(); + /** + *
+   * Avatar URL.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + com.google.protobuf.StringValue getAvatarUrl(); + /** + *
+   * Avatar URL.
+   * 
+ * + * .google.protobuf.StringValue avatar_url = 5 [json_name = "avatarUrl"]; + */ + com.google.protobuf.StringValueOrBuilder getAvatarUrlOrBuilder(); + + /** + *
+   * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return Whether the open field is set. + */ + boolean hasOpen(); + /** + *
+   * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + * @return The open. + */ + com.google.protobuf.BoolValue getOpen(); + /** + *
+   * Open is true if anyone should be allowed to join, or false if joins must be approved by a group admin.
+   * 
+ * + * .google.protobuf.BoolValue open = 6 [json_name = "open"]; + */ + com.google.protobuf.BoolValueOrBuilder getOpenOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/User.java b/src/main/java/com/heroiclabs/nakama/api/User.java new file mode 100644 index 00000000..fd6b2438 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/User.java @@ -0,0 +1,3308 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A user in the server.
+ * 
+ * + * Protobuf type {@code nakama.api.User} + */ +public final class User extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.User) + UserOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + User.class.getName()); + } + // Use User.newBuilder() to construct. + private User(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private User() { + id_ = ""; + username_ = ""; + displayName_ = ""; + avatarUrl_ = ""; + langTag_ = ""; + location_ = ""; + timezone_ = ""; + metadata_ = ""; + facebookId_ = ""; + googleId_ = ""; + gamecenterId_ = ""; + steamId_ = ""; + facebookInstantGameId_ = ""; + appleId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.User.class, com.heroiclabs.nakama.api.User.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The id of the user's account.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The id of the user's account.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * The username of the user's account.
+   * 
+ * + * string username = 2 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * The username of the user's account.
+   * 
+ * + * string username = 2 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + *
+   * The display name of the user.
+   * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The display name of the user.
+   * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATAR_URL_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarUrl_ = ""; + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + @java.lang.Override + public java.lang.String getAvatarUrl() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarUrl_ = s; + return s; + } + } + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarUrlBytes() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANG_TAG_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object langTag_ = ""; + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The langTag. + */ + @java.lang.Override + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } + } + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + *
+   * The location set by the user.
+   * 
+ * + * string location = 6 [json_name = "location"]; + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + *
+   * The location set by the user.
+   * 
+ * + * string location = 6 [json_name = "location"]; + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMEZONE_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object timezone_ = ""; + /** + *
+   * The timezone set by the user.
+   * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @return The timezone. + */ + @java.lang.Override + public java.lang.String getTimezone() { + java.lang.Object ref = timezone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timezone_ = s; + return s; + } + } + /** + *
+   * The timezone set by the user.
+   * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @return The bytes for timezone. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTimezoneBytes() { + java.lang.Object ref = timezone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + timezone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object metadata_ = ""; + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } + } + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FACEBOOK_ID_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object facebookId_ = ""; + /** + *
+   * The Facebook id in the user's account.
+   * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @return The facebookId. + */ + @java.lang.Override + public java.lang.String getFacebookId() { + java.lang.Object ref = facebookId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + facebookId_ = s; + return s; + } + } + /** + *
+   * The Facebook id in the user's account.
+   * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @return The bytes for facebookId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFacebookIdBytes() { + java.lang.Object ref = facebookId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + facebookId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOOGLE_ID_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object googleId_ = ""; + /** + *
+   * The Google id in the user's account.
+   * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @return The googleId. + */ + @java.lang.Override + public java.lang.String getGoogleId() { + java.lang.Object ref = googleId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleId_ = s; + return s; + } + } + /** + *
+   * The Google id in the user's account.
+   * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @return The bytes for googleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGoogleIdBytes() { + java.lang.Object ref = googleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + googleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GAMECENTER_ID_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object gamecenterId_ = ""; + /** + *
+   * The Apple Game Center in of the user's account.
+   * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @return The gamecenterId. + */ + @java.lang.Override + public java.lang.String getGamecenterId() { + java.lang.Object ref = gamecenterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gamecenterId_ = s; + return s; + } + } + /** + *
+   * The Apple Game Center in of the user's account.
+   * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @return The bytes for gamecenterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGamecenterIdBytes() { + java.lang.Object ref = gamecenterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gamecenterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STEAM_ID_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object steamId_ = ""; + /** + *
+   * The Steam id in the user's account.
+   * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @return The steamId. + */ + @java.lang.Override + public java.lang.String getSteamId() { + java.lang.Object ref = steamId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + steamId_ = s; + return s; + } + } + /** + *
+   * The Steam id in the user's account.
+   * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @return The bytes for steamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSteamIdBytes() { + java.lang.Object ref = steamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + steamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ONLINE_FIELD_NUMBER = 13; + private boolean online_ = false; + /** + *
+   * Indicates whether the user is currently online.
+   * 
+ * + * bool online = 13 [json_name = "online"]; + * @return The online. + */ + @java.lang.Override + public boolean getOnline() { + return online_; + } + + public static final int EDGE_COUNT_FIELD_NUMBER = 14; + private int edgeCount_ = 0; + /** + *
+   * Number of related edges to this user.
+   * 
+ * + * int32 edge_count = 14 [json_name = "edgeCount"]; + * @return The edgeCount. + */ + @java.lang.Override + public int getEdgeCount() { + return edgeCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 15; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int FACEBOOK_INSTANT_GAME_ID_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object facebookInstantGameId_ = ""; + /** + *
+   * The Facebook Instant Game ID in the user's account.
+   * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @return The facebookInstantGameId. + */ + @java.lang.Override + public java.lang.String getFacebookInstantGameId() { + java.lang.Object ref = facebookInstantGameId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + facebookInstantGameId_ = s; + return s; + } + } + /** + *
+   * The Facebook Instant Game ID in the user's account.
+   * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @return The bytes for facebookInstantGameId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFacebookInstantGameIdBytes() { + java.lang.Object ref = facebookInstantGameId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + facebookInstantGameId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLE_ID_FIELD_NUMBER = 18; + @SuppressWarnings("serial") + private volatile java.lang.Object appleId_ = ""; + /** + *
+   * The Apple Sign In ID in the user's account.
+   * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @return The appleId. + */ + @java.lang.Override + public java.lang.String getAppleId() { + java.lang.Object ref = appleId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appleId_ = s; + return s; + } + } + /** + *
+   * The Apple Sign In ID in the user's account.
+   * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @return The bytes for appleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAppleIdBytes() { + java.lang.Object ref = appleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, username_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(avatarUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, avatarUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, langTag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timezone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, timezone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, metadata_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(facebookId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, facebookId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(googleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, googleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gamecenterId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, gamecenterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(steamId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, steamId_); + } + if (online_ != false) { + output.writeBool(13, online_); + } + if (edgeCount_ != 0) { + output.writeInt32(14, edgeCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(15, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(16, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(facebookInstantGameId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 17, facebookInstantGameId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 18, appleId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, username_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(avatarUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, avatarUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(langTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, langTag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timezone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, timezone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, metadata_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(facebookId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, facebookId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(googleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, googleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gamecenterId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, gamecenterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(steamId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, steamId_); + } + if (online_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(13, online_); + } + if (edgeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(14, edgeCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(facebookInstantGameId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(17, facebookInstantGameId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(18, appleId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.User)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.User other = (com.heroiclabs.nakama.api.User) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getAvatarUrl() + .equals(other.getAvatarUrl())) return false; + if (!getLangTag() + .equals(other.getLangTag())) return false; + if (!getLocation() + .equals(other.getLocation())) return false; + if (!getTimezone() + .equals(other.getTimezone())) return false; + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (!getFacebookId() + .equals(other.getFacebookId())) return false; + if (!getGoogleId() + .equals(other.getGoogleId())) return false; + if (!getGamecenterId() + .equals(other.getGamecenterId())) return false; + if (!getSteamId() + .equals(other.getSteamId())) return false; + if (getOnline() + != other.getOnline()) return false; + if (getEdgeCount() + != other.getEdgeCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getFacebookInstantGameId() + .equals(other.getFacebookInstantGameId())) return false; + if (!getAppleId() + .equals(other.getAppleId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + AVATAR_URL_FIELD_NUMBER; + hash = (53 * hash) + getAvatarUrl().hashCode(); + hash = (37 * hash) + LANG_TAG_FIELD_NUMBER; + hash = (53 * hash) + getLangTag().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + TIMEZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimezone().hashCode(); + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + hash = (37 * hash) + FACEBOOK_ID_FIELD_NUMBER; + hash = (53 * hash) + getFacebookId().hashCode(); + hash = (37 * hash) + GOOGLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getGoogleId().hashCode(); + hash = (37 * hash) + GAMECENTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getGamecenterId().hashCode(); + hash = (37 * hash) + STEAM_ID_FIELD_NUMBER; + hash = (53 * hash) + getSteamId().hashCode(); + hash = (37 * hash) + ONLINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOnline()); + hash = (37 * hash) + EDGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getEdgeCount(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + FACEBOOK_INSTANT_GAME_ID_FIELD_NUMBER; + hash = (53 * hash) + getFacebookInstantGameId().hashCode(); + hash = (37 * hash) + APPLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppleId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.User parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.User parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.User parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.User parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.User parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.User parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.User parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.User parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.User parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.User parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.User parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.User parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.User prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A user in the server.
+   * 
+ * + * Protobuf type {@code nakama.api.User} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.User) + com.heroiclabs.nakama.api.UserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.User.class, com.heroiclabs.nakama.api.User.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.User.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + username_ = ""; + displayName_ = ""; + avatarUrl_ = ""; + langTag_ = ""; + location_ = ""; + timezone_ = ""; + metadata_ = ""; + facebookId_ = ""; + googleId_ = ""; + gamecenterId_ = ""; + steamId_ = ""; + online_ = false; + edgeCount_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + facebookInstantGameId_ = ""; + appleId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_User_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.User getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.User.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.User build() { + com.heroiclabs.nakama.api.User result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.User buildPartial() { + com.heroiclabs.nakama.api.User result = new com.heroiclabs.nakama.api.User(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.User result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.avatarUrl_ = avatarUrl_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.langTag_ = langTag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.timezone_ = timezone_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.metadata_ = metadata_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.facebookId_ = facebookId_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.googleId_ = googleId_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.gamecenterId_ = gamecenterId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.steamId_ = steamId_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.online_ = online_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.edgeCount_ = edgeCount_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00004000) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.facebookInstantGameId_ = facebookInstantGameId_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.appleId_ = appleId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.User) { + return mergeFrom((com.heroiclabs.nakama.api.User)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.User other) { + if (other == com.heroiclabs.nakama.api.User.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAvatarUrl().isEmpty()) { + avatarUrl_ = other.avatarUrl_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getLangTag().isEmpty()) { + langTag_ = other.langTag_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getTimezone().isEmpty()) { + timezone_ = other.timezone_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getFacebookId().isEmpty()) { + facebookId_ = other.facebookId_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getGoogleId().isEmpty()) { + googleId_ = other.googleId_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getGamecenterId().isEmpty()) { + gamecenterId_ = other.gamecenterId_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getSteamId().isEmpty()) { + steamId_ = other.steamId_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.getOnline() != false) { + setOnline(other.getOnline()); + } + if (other.getEdgeCount() != 0) { + setEdgeCount(other.getEdgeCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getFacebookInstantGameId().isEmpty()) { + facebookInstantGameId_ = other.facebookInstantGameId_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (!other.getAppleId().isEmpty()) { + appleId_ = other.appleId_; + bitField0_ |= 0x00020000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + avatarUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + langTag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + timezone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + facebookId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + googleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + gamecenterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + steamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 104: { + online_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 112: { + edgeCount_ = input.readInt32(); + bitField0_ |= 0x00002000; + break; + } // case 112 + case 122: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: { + facebookInstantGameId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: { + appleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 146 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The id of the user's account.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The id of the user's account.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The id of the user's account.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The id of the user's account.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The id of the user's account.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object username_ = ""; + /** + *
+     * The username of the user's account.
+     * 
+ * + * string username = 2 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * string username = 2 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * string username = 2 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * string username = 2 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The username of the user's account.
+     * 
+ * + * string username = 2 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The display name of the user.
+     * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The display name of the user.
+     * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The display name of the user.
+     * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The display name of the user.
+     * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The display name of the user.
+     * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object avatarUrl_ = ""; + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + public java.lang.String getAvatarUrl() { + java.lang.Object ref = avatarUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + public com.google.protobuf.ByteString + getAvatarUrlBytes() { + java.lang.Object ref = avatarUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @param value The avatarUrl to set. + * @return This builder for chaining. + */ + public Builder setAvatarUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return This builder for chaining. + */ + public Builder clearAvatarUrl() { + avatarUrl_ = getDefaultInstance().getAvatarUrl(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * A URL for an avatar image.
+     * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @param value The bytes for avatarUrl to set. + * @return This builder for chaining. + */ + public Builder setAvatarUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object langTag_ = ""; + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The langTag. + */ + public java.lang.String getLangTag() { + java.lang.Object ref = langTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + langTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + public com.google.protobuf.ByteString + getLangTagBytes() { + java.lang.Object ref = langTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + langTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @param value The langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTag( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + langTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return This builder for chaining. + */ + public Builder clearLangTag() { + langTag_ = getDefaultInstance().getLangTag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The language expected to be a tag which follows the BCP-47 spec.
+     * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @param value The bytes for langTag to set. + * @return This builder for chaining. + */ + public Builder setLangTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + langTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + *
+     * The location set by the user.
+     * 
+ * + * string location = 6 [json_name = "location"]; + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The location set by the user.
+     * 
+ * + * string location = 6 [json_name = "location"]; + * @return The bytes for location. + */ + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The location set by the user.
+     * 
+ * + * string location = 6 [json_name = "location"]; + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + location_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The location set by the user.
+     * 
+ * + * string location = 6 [json_name = "location"]; + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The location set by the user.
+     * 
+ * + * string location = 6 [json_name = "location"]; + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object timezone_ = ""; + /** + *
+     * The timezone set by the user.
+     * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @return The timezone. + */ + public java.lang.String getTimezone() { + java.lang.Object ref = timezone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timezone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @return The bytes for timezone. + */ + public com.google.protobuf.ByteString + getTimezoneBytes() { + java.lang.Object ref = timezone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + timezone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @param value The timezone to set. + * @return This builder for chaining. + */ + public Builder setTimezone( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + timezone_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @return This builder for chaining. + */ + public Builder clearTimezone() { + timezone_ = getDefaultInstance().getTimezone(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * The timezone set by the user.
+     * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @param value The bytes for timezone to set. + * @return This builder for chaining. + */ + public Builder setTimezoneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + timezone_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object metadata_ = ""; + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @return The metadata. + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @param value The metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadata_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @return This builder for chaining. + */ + public Builder clearMetadata() { + metadata_ = getDefaultInstance().getMetadata(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * Additional information stored as a JSON object.
+     * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @param value The bytes for metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadata_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object facebookId_ = ""; + /** + *
+     * The Facebook id in the user's account.
+     * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @return The facebookId. + */ + public java.lang.String getFacebookId() { + java.lang.Object ref = facebookId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + facebookId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Facebook id in the user's account.
+     * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @return The bytes for facebookId. + */ + public com.google.protobuf.ByteString + getFacebookIdBytes() { + java.lang.Object ref = facebookId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + facebookId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Facebook id in the user's account.
+     * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @param value The facebookId to set. + * @return This builder for chaining. + */ + public Builder setFacebookId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + facebookId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The Facebook id in the user's account.
+     * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @return This builder for chaining. + */ + public Builder clearFacebookId() { + facebookId_ = getDefaultInstance().getFacebookId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * The Facebook id in the user's account.
+     * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @param value The bytes for facebookId to set. + * @return This builder for chaining. + */ + public Builder setFacebookIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + facebookId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object googleId_ = ""; + /** + *
+     * The Google id in the user's account.
+     * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @return The googleId. + */ + public java.lang.String getGoogleId() { + java.lang.Object ref = googleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Google id in the user's account.
+     * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @return The bytes for googleId. + */ + public com.google.protobuf.ByteString + getGoogleIdBytes() { + java.lang.Object ref = googleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + googleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Google id in the user's account.
+     * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @param value The googleId to set. + * @return This builder for chaining. + */ + public Builder setGoogleId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + googleId_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The Google id in the user's account.
+     * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @return This builder for chaining. + */ + public Builder clearGoogleId() { + googleId_ = getDefaultInstance().getGoogleId(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * The Google id in the user's account.
+     * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @param value The bytes for googleId to set. + * @return This builder for chaining. + */ + public Builder setGoogleIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + googleId_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object gamecenterId_ = ""; + /** + *
+     * The Apple Game Center in of the user's account.
+     * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @return The gamecenterId. + */ + public java.lang.String getGamecenterId() { + java.lang.Object ref = gamecenterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gamecenterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Apple Game Center in of the user's account.
+     * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @return The bytes for gamecenterId. + */ + public com.google.protobuf.ByteString + getGamecenterIdBytes() { + java.lang.Object ref = gamecenterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gamecenterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Apple Game Center in of the user's account.
+     * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @param value The gamecenterId to set. + * @return This builder for chaining. + */ + public Builder setGamecenterId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gamecenterId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The Apple Game Center in of the user's account.
+     * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @return This builder for chaining. + */ + public Builder clearGamecenterId() { + gamecenterId_ = getDefaultInstance().getGamecenterId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * The Apple Game Center in of the user's account.
+     * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @param value The bytes for gamecenterId to set. + * @return This builder for chaining. + */ + public Builder setGamecenterIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gamecenterId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object steamId_ = ""; + /** + *
+     * The Steam id in the user's account.
+     * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @return The steamId. + */ + public java.lang.String getSteamId() { + java.lang.Object ref = steamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + steamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Steam id in the user's account.
+     * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @return The bytes for steamId. + */ + public com.google.protobuf.ByteString + getSteamIdBytes() { + java.lang.Object ref = steamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + steamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Steam id in the user's account.
+     * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @param value The steamId to set. + * @return This builder for chaining. + */ + public Builder setSteamId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + steamId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * The Steam id in the user's account.
+     * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @return This builder for chaining. + */ + public Builder clearSteamId() { + steamId_ = getDefaultInstance().getSteamId(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + *
+     * The Steam id in the user's account.
+     * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @param value The bytes for steamId to set. + * @return This builder for chaining. + */ + public Builder setSteamIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + steamId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private boolean online_ ; + /** + *
+     * Indicates whether the user is currently online.
+     * 
+ * + * bool online = 13 [json_name = "online"]; + * @return The online. + */ + @java.lang.Override + public boolean getOnline() { + return online_; + } + /** + *
+     * Indicates whether the user is currently online.
+     * 
+ * + * bool online = 13 [json_name = "online"]; + * @param value The online to set. + * @return This builder for chaining. + */ + public Builder setOnline(boolean value) { + + online_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Indicates whether the user is currently online.
+     * 
+ * + * bool online = 13 [json_name = "online"]; + * @return This builder for chaining. + */ + public Builder clearOnline() { + bitField0_ = (bitField0_ & ~0x00001000); + online_ = false; + onChanged(); + return this; + } + + private int edgeCount_ ; + /** + *
+     * Number of related edges to this user.
+     * 
+ * + * int32 edge_count = 14 [json_name = "edgeCount"]; + * @return The edgeCount. + */ + @java.lang.Override + public int getEdgeCount() { + return edgeCount_; + } + /** + *
+     * Number of related edges to this user.
+     * 
+ * + * int32 edge_count = 14 [json_name = "edgeCount"]; + * @param value The edgeCount to set. + * @return This builder for chaining. + */ + public Builder setEdgeCount(int value) { + + edgeCount_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+     * Number of related edges to this user.
+     * 
+ * + * int32 edge_count = 14 [json_name = "edgeCount"]; + * @return This builder for chaining. + */ + public Builder clearEdgeCount() { + bitField0_ = (bitField0_ & ~0x00002000); + edgeCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00004000); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00008000); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object facebookInstantGameId_ = ""; + /** + *
+     * The Facebook Instant Game ID in the user's account.
+     * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @return The facebookInstantGameId. + */ + public java.lang.String getFacebookInstantGameId() { + java.lang.Object ref = facebookInstantGameId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + facebookInstantGameId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Facebook Instant Game ID in the user's account.
+     * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @return The bytes for facebookInstantGameId. + */ + public com.google.protobuf.ByteString + getFacebookInstantGameIdBytes() { + java.lang.Object ref = facebookInstantGameId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + facebookInstantGameId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Facebook Instant Game ID in the user's account.
+     * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @param value The facebookInstantGameId to set. + * @return This builder for chaining. + */ + public Builder setFacebookInstantGameId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + facebookInstantGameId_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+     * The Facebook Instant Game ID in the user's account.
+     * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @return This builder for chaining. + */ + public Builder clearFacebookInstantGameId() { + facebookInstantGameId_ = getDefaultInstance().getFacebookInstantGameId(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + *
+     * The Facebook Instant Game ID in the user's account.
+     * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @param value The bytes for facebookInstantGameId to set. + * @return This builder for chaining. + */ + public Builder setFacebookInstantGameIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + facebookInstantGameId_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private java.lang.Object appleId_ = ""; + /** + *
+     * The Apple Sign In ID in the user's account.
+     * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @return The appleId. + */ + public java.lang.String getAppleId() { + java.lang.Object ref = appleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Apple Sign In ID in the user's account.
+     * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @return The bytes for appleId. + */ + public com.google.protobuf.ByteString + getAppleIdBytes() { + java.lang.Object ref = appleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Apple Sign In ID in the user's account.
+     * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @param value The appleId to set. + * @return This builder for chaining. + */ + public Builder setAppleId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + appleId_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+     * The Apple Sign In ID in the user's account.
+     * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @return This builder for chaining. + */ + public Builder clearAppleId() { + appleId_ = getDefaultInstance().getAppleId(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + /** + *
+     * The Apple Sign In ID in the user's account.
+     * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @param value The bytes for appleId to set. + * @return This builder for chaining. + */ + public Builder setAppleIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + appleId_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.User) + } + + // @@protoc_insertion_point(class_scope:nakama.api.User) + private static final com.heroiclabs.nakama.api.User DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.User(); + } + + public static com.heroiclabs.nakama.api.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/UserGroupList.java b/src/main/java/com/heroiclabs/nakama/api/UserGroupList.java new file mode 100644 index 00000000..09b7fb1e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UserGroupList.java @@ -0,0 +1,2052 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A list of groups belonging to a user, along with the user's role in each group.
+ * 
+ * + * Protobuf type {@code nakama.api.UserGroupList} + */ +public final class UserGroupList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.UserGroupList) + UserGroupListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + UserGroupList.class.getName()); + } + // Use UserGroupList.newBuilder() to construct. + private UserGroupList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UserGroupList() { + userGroups_ = java.util.Collections.emptyList(); + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UserGroupList.class, com.heroiclabs.nakama.api.UserGroupList.Builder.class); + } + + public interface UserGroupOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.UserGroupList.UserGroup) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Group.
+     * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + * @return Whether the group field is set. + */ + boolean hasGroup(); + /** + *
+     * Group.
+     * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + * @return The group. + */ + com.heroiclabs.nakama.api.Group getGroup(); + /** + *
+     * Group.
+     * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + com.heroiclabs.nakama.api.GroupOrBuilder getGroupOrBuilder(); + + /** + *
+     * The user's relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + boolean hasState(); + /** + *
+     * The user's relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + com.google.protobuf.Int32Value getState(); + /** + *
+     * The user's relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder(); + } + /** + *
+   * A single group-role pair.
+   * 
+ * + * Protobuf type {@code nakama.api.UserGroupList.UserGroup} + */ + public static final class UserGroup extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.UserGroupList.UserGroup) + UserGroupOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + UserGroup.class.getName()); + } + // Use UserGroup.newBuilder() to construct. + private UserGroup(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UserGroup() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_UserGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_UserGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UserGroupList.UserGroup.class, com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder.class); + } + + /** + *
+     * The group role status.
+     * 
+ * + * Protobuf enum {@code nakama.api.UserGroupList.UserGroup.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * The user is a superadmin with full control of the group.
+       * 
+ * + * SUPERADMIN = 0; + */ + SUPERADMIN(0), + /** + *
+       * The user is an admin with additional privileges.
+       * 
+ * + * ADMIN = 1; + */ + ADMIN(1), + /** + *
+       * The user is a regular member.
+       * 
+ * + * MEMBER = 2; + */ + MEMBER(2), + /** + *
+       * The user has requested to join the group
+       * 
+ * + * JOIN_REQUEST = 3; + */ + JOIN_REQUEST(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + State.class.getName()); + } + /** + *
+       * The user is a superadmin with full control of the group.
+       * 
+ * + * SUPERADMIN = 0; + */ + public static final int SUPERADMIN_VALUE = 0; + /** + *
+       * The user is an admin with additional privileges.
+       * 
+ * + * ADMIN = 1; + */ + public static final int ADMIN_VALUE = 1; + /** + *
+       * The user is a regular member.
+       * 
+ * + * MEMBER = 2; + */ + public static final int MEMBER_VALUE = 2; + /** + *
+       * The user has requested to join the group
+       * 
+ * + * JOIN_REQUEST = 3; + */ + public static final int JOIN_REQUEST_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return SUPERADMIN; + case 1: return ADMIN; + case 2: return MEMBER; + case 3: return JOIN_REQUEST; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.api.UserGroupList.UserGroup.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.api.UserGroupList.UserGroup.State) + } + + private int bitField0_; + public static final int GROUP_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.Group group_; + /** + *
+     * Group.
+     * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + * @return Whether the group field is set. + */ + @java.lang.Override + public boolean hasGroup() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Group.
+     * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + * @return The group. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Group getGroup() { + return group_ == null ? com.heroiclabs.nakama.api.Group.getDefaultInstance() : group_; + } + /** + *
+     * Group.
+     * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.GroupOrBuilder getGroupOrBuilder() { + return group_ == null ? com.heroiclabs.nakama.api.Group.getDefaultInstance() : group_; + } + + public static final int STATE_FIELD_NUMBER = 2; + private com.google.protobuf.Int32Value state_; + /** + *
+     * The user's relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + @java.lang.Override + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The user's relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getState() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + /** + *
+     * The user's relationship to the group.
+     * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getGroup()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getState()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGroup()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getState()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.UserGroupList.UserGroup)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.UserGroupList.UserGroup other = (com.heroiclabs.nakama.api.UserGroupList.UserGroup) obj; + + if (hasGroup() != other.hasGroup()) return false; + if (hasGroup()) { + if (!getGroup() + .equals(other.getGroup())) return false; + } + if (hasState() != other.hasState()) return false; + if (hasState()) { + if (!getState() + .equals(other.getState())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGroup()) { + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.UserGroupList.UserGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A single group-role pair.
+     * 
+ * + * Protobuf type {@code nakama.api.UserGroupList.UserGroup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.UserGroupList.UserGroup) + com.heroiclabs.nakama.api.UserGroupList.UserGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_UserGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_UserGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UserGroupList.UserGroup.class, com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.UserGroupList.UserGroup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getGroupFieldBuilder(); + getStateFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_UserGroup_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList.UserGroup getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.UserGroupList.UserGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList.UserGroup build() { + com.heroiclabs.nakama.api.UserGroupList.UserGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList.UserGroup buildPartial() { + com.heroiclabs.nakama.api.UserGroupList.UserGroup result = new com.heroiclabs.nakama.api.UserGroupList.UserGroup(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.UserGroupList.UserGroup result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.group_ = groupBuilder_ == null + ? group_ + : groupBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = stateBuilder_ == null + ? state_ + : stateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.UserGroupList.UserGroup) { + return mergeFrom((com.heroiclabs.nakama.api.UserGroupList.UserGroup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.UserGroupList.UserGroup other) { + if (other == com.heroiclabs.nakama.api.UserGroupList.UserGroup.getDefaultInstance()) return this; + if (other.hasGroup()) { + mergeGroup(other.getGroup()); + } + if (other.hasState()) { + mergeState(other.getState()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getGroupFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.Group group_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.Group, com.heroiclabs.nakama.api.Group.Builder, com.heroiclabs.nakama.api.GroupOrBuilder> groupBuilder_; + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + * @return Whether the group field is set. + */ + public boolean hasGroup() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + * @return The group. + */ + public com.heroiclabs.nakama.api.Group getGroup() { + if (groupBuilder_ == null) { + return group_ == null ? com.heroiclabs.nakama.api.Group.getDefaultInstance() : group_; + } else { + return groupBuilder_.getMessage(); + } + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + public Builder setGroup(com.heroiclabs.nakama.api.Group value) { + if (groupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + } else { + groupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + public Builder setGroup( + com.heroiclabs.nakama.api.Group.Builder builderForValue) { + if (groupBuilder_ == null) { + group_ = builderForValue.build(); + } else { + groupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + public Builder mergeGroup(com.heroiclabs.nakama.api.Group value) { + if (groupBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + group_ != null && + group_ != com.heroiclabs.nakama.api.Group.getDefaultInstance()) { + getGroupBuilder().mergeFrom(value); + } else { + group_ = value; + } + } else { + groupBuilder_.mergeFrom(value); + } + if (group_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + public Builder clearGroup() { + bitField0_ = (bitField0_ & ~0x00000001); + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + public com.heroiclabs.nakama.api.Group.Builder getGroupBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGroupFieldBuilder().getBuilder(); + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + public com.heroiclabs.nakama.api.GroupOrBuilder getGroupOrBuilder() { + if (groupBuilder_ != null) { + return groupBuilder_.getMessageOrBuilder(); + } else { + return group_ == null ? + com.heroiclabs.nakama.api.Group.getDefaultInstance() : group_; + } + } + /** + *
+       * Group.
+       * 
+ * + * .nakama.api.Group group = 1 [json_name = "group"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.Group, com.heroiclabs.nakama.api.Group.Builder, com.heroiclabs.nakama.api.GroupOrBuilder> + getGroupFieldBuilder() { + if (groupBuilder_ == null) { + groupBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.Group, com.heroiclabs.nakama.api.Group.Builder, com.heroiclabs.nakama.api.GroupOrBuilder>( + getGroup(), + getParentForChildren(), + isClean()); + group_ = null; + } + return groupBuilder_; + } + + private com.google.protobuf.Int32Value state_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> stateBuilder_; + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return Whether the state field is set. + */ + public boolean hasState() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + * @return The state. + */ + public com.google.protobuf.Int32Value getState() { + if (stateBuilder_ == null) { + return state_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } else { + return stateBuilder_.getMessage(); + } + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + } else { + stateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder setState( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (stateBuilder_ == null) { + state_ = builderForValue.build(); + } else { + stateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder mergeState(com.google.protobuf.Int32Value value) { + if (stateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + state_ != null && + state_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getStateBuilder().mergeFrom(value); + } else { + state_ = value; + } + } else { + stateBuilder_.mergeFrom(value); + } + if (state_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = null; + if (stateBuilder_ != null) { + stateBuilder_.dispose(); + stateBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32Value.Builder getStateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStateFieldBuilder().getBuilder(); + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getStateOrBuilder() { + if (stateBuilder_ != null) { + return stateBuilder_.getMessageOrBuilder(); + } else { + return state_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : state_; + } + } + /** + *
+       * The user's relationship to the group.
+       * 
+ * + * .google.protobuf.Int32Value state = 2 [json_name = "state"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getStateFieldBuilder() { + if (stateBuilder_ == null) { + stateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getState(), + getParentForChildren(), + isClean()); + state_ = null; + } + return stateBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.UserGroupList.UserGroup) + } + + // @@protoc_insertion_point(class_scope:nakama.api.UserGroupList.UserGroup) + private static final com.heroiclabs.nakama.api.UserGroupList.UserGroup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.UserGroupList.UserGroup(); + } + + public static com.heroiclabs.nakama.api.UserGroupList.UserGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList.UserGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int USER_GROUPS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List userGroups_; + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + @java.lang.Override + public java.util.List getUserGroupsList() { + return userGroups_; + } + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + @java.lang.Override + public java.util.List + getUserGroupsOrBuilderList() { + return userGroups_; + } + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + @java.lang.Override + public int getUserGroupsCount() { + return userGroups_.size(); + } + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList.UserGroup getUserGroups(int index) { + return userGroups_.get(index); + } + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList.UserGroupOrBuilder getUserGroupsOrBuilder( + int index) { + return userGroups_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < userGroups_.size(); i++) { + output.writeMessage(1, userGroups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, userGroups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.UserGroupList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.UserGroupList other = (com.heroiclabs.nakama.api.UserGroupList) obj; + + if (!getUserGroupsList() + .equals(other.getUserGroupsList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserGroupsCount() > 0) { + hash = (37 * hash) + USER_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getUserGroupsList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.UserGroupList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.UserGroupList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.UserGroupList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.UserGroupList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of groups belonging to a user, along with the user's role in each group.
+   * 
+ * + * Protobuf type {@code nakama.api.UserGroupList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.UserGroupList) + com.heroiclabs.nakama.api.UserGroupListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.UserGroupList.class, com.heroiclabs.nakama.api.UserGroupList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.UserGroupList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userGroupsBuilder_ == null) { + userGroups_ = java.util.Collections.emptyList(); + } else { + userGroups_ = null; + userGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_UserGroupList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.UserGroupList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList build() { + com.heroiclabs.nakama.api.UserGroupList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList buildPartial() { + com.heroiclabs.nakama.api.UserGroupList result = new com.heroiclabs.nakama.api.UserGroupList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.UserGroupList result) { + if (userGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userGroups_ = java.util.Collections.unmodifiableList(userGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userGroups_ = userGroups_; + } else { + result.userGroups_ = userGroupsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.UserGroupList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.UserGroupList) { + return mergeFrom((com.heroiclabs.nakama.api.UserGroupList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.UserGroupList other) { + if (other == com.heroiclabs.nakama.api.UserGroupList.getDefaultInstance()) return this; + if (userGroupsBuilder_ == null) { + if (!other.userGroups_.isEmpty()) { + if (userGroups_.isEmpty()) { + userGroups_ = other.userGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserGroupsIsMutable(); + userGroups_.addAll(other.userGroups_); + } + onChanged(); + } + } else { + if (!other.userGroups_.isEmpty()) { + if (userGroupsBuilder_.isEmpty()) { + userGroupsBuilder_.dispose(); + userGroupsBuilder_ = null; + userGroups_ = other.userGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + userGroupsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getUserGroupsFieldBuilder() : null; + } else { + userGroupsBuilder_.addAllMessages(other.userGroups_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.UserGroupList.UserGroup m = + input.readMessage( + com.heroiclabs.nakama.api.UserGroupList.UserGroup.parser(), + extensionRegistry); + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.add(m); + } else { + userGroupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List userGroups_ = + java.util.Collections.emptyList(); + private void ensureUserGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userGroups_ = new java.util.ArrayList(userGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.UserGroupList.UserGroup, com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder, com.heroiclabs.nakama.api.UserGroupList.UserGroupOrBuilder> userGroupsBuilder_; + + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public java.util.List getUserGroupsList() { + if (userGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(userGroups_); + } else { + return userGroupsBuilder_.getMessageList(); + } + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public int getUserGroupsCount() { + if (userGroupsBuilder_ == null) { + return userGroups_.size(); + } else { + return userGroupsBuilder_.getCount(); + } + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public com.heroiclabs.nakama.api.UserGroupList.UserGroup getUserGroups(int index) { + if (userGroupsBuilder_ == null) { + return userGroups_.get(index); + } else { + return userGroupsBuilder_.getMessage(index); + } + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder setUserGroups( + int index, com.heroiclabs.nakama.api.UserGroupList.UserGroup value) { + if (userGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupsIsMutable(); + userGroups_.set(index, value); + onChanged(); + } else { + userGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder setUserGroups( + int index, com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder builderForValue) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + userGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder addUserGroups(com.heroiclabs.nakama.api.UserGroupList.UserGroup value) { + if (userGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupsIsMutable(); + userGroups_.add(value); + onChanged(); + } else { + userGroupsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder addUserGroups( + int index, com.heroiclabs.nakama.api.UserGroupList.UserGroup value) { + if (userGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserGroupsIsMutable(); + userGroups_.add(index, value); + onChanged(); + } else { + userGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder addUserGroups( + com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder builderForValue) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.add(builderForValue.build()); + onChanged(); + } else { + userGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder addUserGroups( + int index, com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder builderForValue) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + userGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder addAllUserGroups( + java.lang.Iterable values) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userGroups_); + onChanged(); + } else { + userGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder clearUserGroups() { + if (userGroupsBuilder_ == null) { + userGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userGroupsBuilder_.clear(); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public Builder removeUserGroups(int index) { + if (userGroupsBuilder_ == null) { + ensureUserGroupsIsMutable(); + userGroups_.remove(index); + onChanged(); + } else { + userGroupsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder getUserGroupsBuilder( + int index) { + return getUserGroupsFieldBuilder().getBuilder(index); + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public com.heroiclabs.nakama.api.UserGroupList.UserGroupOrBuilder getUserGroupsOrBuilder( + int index) { + if (userGroupsBuilder_ == null) { + return userGroups_.get(index); } else { + return userGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public java.util.List + getUserGroupsOrBuilderList() { + if (userGroupsBuilder_ != null) { + return userGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userGroups_); + } + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder addUserGroupsBuilder() { + return getUserGroupsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.UserGroupList.UserGroup.getDefaultInstance()); + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder addUserGroupsBuilder( + int index) { + return getUserGroupsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.UserGroupList.UserGroup.getDefaultInstance()); + } + /** + *
+     * Group-role pairs for a user.
+     * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + public java.util.List + getUserGroupsBuilderList() { + return getUserGroupsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.UserGroupList.UserGroup, com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder, com.heroiclabs.nakama.api.UserGroupList.UserGroupOrBuilder> + getUserGroupsFieldBuilder() { + if (userGroupsBuilder_ == null) { + userGroupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.UserGroupList.UserGroup, com.heroiclabs.nakama.api.UserGroupList.UserGroup.Builder, com.heroiclabs.nakama.api.UserGroupList.UserGroupOrBuilder>( + userGroups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + userGroups_ = null; + } + return userGroupsBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Cursor for the next page of results, if any.
+     * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.UserGroupList) + } + + // @@protoc_insertion_point(class_scope:nakama.api.UserGroupList) + private static final com.heroiclabs.nakama.api.UserGroupList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.UserGroupList(); + } + + public static com.heroiclabs.nakama.api.UserGroupList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserGroupList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.UserGroupList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/UserGroupListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/UserGroupListOrBuilder.java new file mode 100644 index 00000000..ff403b95 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UserGroupListOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface UserGroupListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.UserGroupList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + java.util.List + getUserGroupsList(); + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + com.heroiclabs.nakama.api.UserGroupList.UserGroup getUserGroups(int index); + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + int getUserGroupsCount(); + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + java.util.List + getUserGroupsOrBuilderList(); + /** + *
+   * Group-role pairs for a user.
+   * 
+ * + * repeated .nakama.api.UserGroupList.UserGroup user_groups = 1 [json_name = "userGroups"]; + */ + com.heroiclabs.nakama.api.UserGroupList.UserGroupOrBuilder getUserGroupsOrBuilder( + int index); + + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * Cursor for the next page of results, if any.
+   * 
+ * + * string cursor = 2 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/UserOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/UserOrBuilder.java new file mode 100644 index 00000000..aadf4f40 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UserOrBuilder.java @@ -0,0 +1,365 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface UserOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.User) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The id of the user's account.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The id of the user's account.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The username of the user's account.
+   * 
+ * + * string username = 2 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * The username of the user's account.
+   * 
+ * + * string username = 2 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + *
+   * The display name of the user.
+   * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The display name of the user.
+   * 
+ * + * string display_name = 3 [json_name = "displayName"]; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The avatarUrl. + */ + java.lang.String getAvatarUrl(); + /** + *
+   * A URL for an avatar image.
+   * 
+ * + * string avatar_url = 4 [json_name = "avatarUrl"]; + * @return The bytes for avatarUrl. + */ + com.google.protobuf.ByteString + getAvatarUrlBytes(); + + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The langTag. + */ + java.lang.String getLangTag(); + /** + *
+   * The language expected to be a tag which follows the BCP-47 spec.
+   * 
+ * + * string lang_tag = 5 [json_name = "langTag"]; + * @return The bytes for langTag. + */ + com.google.protobuf.ByteString + getLangTagBytes(); + + /** + *
+   * The location set by the user.
+   * 
+ * + * string location = 6 [json_name = "location"]; + * @return The location. + */ + java.lang.String getLocation(); + /** + *
+   * The location set by the user.
+   * 
+ * + * string location = 6 [json_name = "location"]; + * @return The bytes for location. + */ + com.google.protobuf.ByteString + getLocationBytes(); + + /** + *
+   * The timezone set by the user.
+   * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @return The timezone. + */ + java.lang.String getTimezone(); + /** + *
+   * The timezone set by the user.
+   * 
+ * + * string timezone = 7 [json_name = "timezone"]; + * @return The bytes for timezone. + */ + com.google.protobuf.ByteString + getTimezoneBytes(); + + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @return The metadata. + */ + java.lang.String getMetadata(); + /** + *
+   * Additional information stored as a JSON object.
+   * 
+ * + * string metadata = 8 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + com.google.protobuf.ByteString + getMetadataBytes(); + + /** + *
+   * The Facebook id in the user's account.
+   * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @return The facebookId. + */ + java.lang.String getFacebookId(); + /** + *
+   * The Facebook id in the user's account.
+   * 
+ * + * string facebook_id = 9 [json_name = "facebookId"]; + * @return The bytes for facebookId. + */ + com.google.protobuf.ByteString + getFacebookIdBytes(); + + /** + *
+   * The Google id in the user's account.
+   * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @return The googleId. + */ + java.lang.String getGoogleId(); + /** + *
+   * The Google id in the user's account.
+   * 
+ * + * string google_id = 10 [json_name = "googleId"]; + * @return The bytes for googleId. + */ + com.google.protobuf.ByteString + getGoogleIdBytes(); + + /** + *
+   * The Apple Game Center in of the user's account.
+   * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @return The gamecenterId. + */ + java.lang.String getGamecenterId(); + /** + *
+   * The Apple Game Center in of the user's account.
+   * 
+ * + * string gamecenter_id = 11 [json_name = "gamecenterId"]; + * @return The bytes for gamecenterId. + */ + com.google.protobuf.ByteString + getGamecenterIdBytes(); + + /** + *
+   * The Steam id in the user's account.
+   * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @return The steamId. + */ + java.lang.String getSteamId(); + /** + *
+   * The Steam id in the user's account.
+   * 
+ * + * string steam_id = 12 [json_name = "steamId"]; + * @return The bytes for steamId. + */ + com.google.protobuf.ByteString + getSteamIdBytes(); + + /** + *
+   * Indicates whether the user is currently online.
+   * 
+ * + * bool online = 13 [json_name = "online"]; + * @return The online. + */ + boolean getOnline(); + + /** + *
+   * Number of related edges to this user.
+   * 
+ * + * int32 edge_count = 14 [json_name = "edgeCount"]; + * @return The edgeCount. + */ + int getEdgeCount(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 15 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 16 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * The Facebook Instant Game ID in the user's account.
+   * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @return The facebookInstantGameId. + */ + java.lang.String getFacebookInstantGameId(); + /** + *
+   * The Facebook Instant Game ID in the user's account.
+   * 
+ * + * string facebook_instant_game_id = 17 [json_name = "facebookInstantGameId"]; + * @return The bytes for facebookInstantGameId. + */ + com.google.protobuf.ByteString + getFacebookInstantGameIdBytes(); + + /** + *
+   * The Apple Sign In ID in the user's account.
+   * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @return The appleId. + */ + java.lang.String getAppleId(); + /** + *
+   * The Apple Sign In ID in the user's account.
+   * 
+ * + * string apple_id = 18 [json_name = "appleId"]; + * @return The bytes for appleId. + */ + com.google.protobuf.ByteString + getAppleIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/Users.java b/src/main/java/com/heroiclabs/nakama/api/Users.java new file mode 100644 index 00000000..8e81021a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/Users.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A collection of zero or more users.
+ * 
+ * + * Protobuf type {@code nakama.api.Users} + */ +public final class Users extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.Users) + UsersOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Users.class.getName()); + } + // Use Users.newBuilder() to construct. + private Users(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Users() { + users_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Users_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Users_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Users.class, com.heroiclabs.nakama.api.Users.Builder.class); + } + + public static final int USERS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List users_; + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + @java.lang.Override + public java.util.List getUsersList() { + return users_; + } + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + @java.lang.Override + public java.util.List + getUsersOrBuilderList() { + return users_; + } + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + @java.lang.Override + public int getUsersCount() { + return users_.size(); + } + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.User getUsers(int index) { + return users_.get(index); + } + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.UserOrBuilder getUsersOrBuilder( + int index) { + return users_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < users_.size(); i++) { + output.writeMessage(1, users_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < users_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, users_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.Users)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.Users other = (com.heroiclabs.nakama.api.Users) obj; + + if (!getUsersList() + .equals(other.getUsersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUsersCount() > 0) { + hash = (37 * hash) + USERS_FIELD_NUMBER; + hash = (53 * hash) + getUsersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.Users parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Users parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Users parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Users parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Users parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.Users parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Users parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Users parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.Users parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.Users parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.Users parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.Users parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.Users prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of zero or more users.
+   * 
+ * + * Protobuf type {@code nakama.api.Users} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.Users) + com.heroiclabs.nakama.api.UsersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Users_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Users_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.Users.class, com.heroiclabs.nakama.api.Users.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.Users.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + } else { + users_ = null; + usersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_Users_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Users getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.Users.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Users build() { + com.heroiclabs.nakama.api.Users result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Users buildPartial() { + com.heroiclabs.nakama.api.Users result = new com.heroiclabs.nakama.api.Users(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.Users result) { + if (usersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + users_ = java.util.Collections.unmodifiableList(users_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.users_ = users_; + } else { + result.users_ = usersBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.Users result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.Users) { + return mergeFrom((com.heroiclabs.nakama.api.Users)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.Users other) { + if (other == com.heroiclabs.nakama.api.Users.getDefaultInstance()) return this; + if (usersBuilder_ == null) { + if (!other.users_.isEmpty()) { + if (users_.isEmpty()) { + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUsersIsMutable(); + users_.addAll(other.users_); + } + onChanged(); + } + } else { + if (!other.users_.isEmpty()) { + if (usersBuilder_.isEmpty()) { + usersBuilder_.dispose(); + usersBuilder_ = null; + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + usersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getUsersFieldBuilder() : null; + } else { + usersBuilder_.addAllMessages(other.users_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.User m = + input.readMessage( + com.heroiclabs.nakama.api.User.parser(), + extensionRegistry); + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(m); + } else { + usersBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List users_ = + java.util.Collections.emptyList(); + private void ensureUsersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + users_ = new java.util.ArrayList(users_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> usersBuilder_; + + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public java.util.List getUsersList() { + if (usersBuilder_ == null) { + return java.util.Collections.unmodifiableList(users_); + } else { + return usersBuilder_.getMessageList(); + } + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public int getUsersCount() { + if (usersBuilder_ == null) { + return users_.size(); + } else { + return usersBuilder_.getCount(); + } + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public com.heroiclabs.nakama.api.User getUsers(int index) { + if (usersBuilder_ == null) { + return users_.get(index); + } else { + return usersBuilder_.getMessage(index); + } + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder setUsers( + int index, com.heroiclabs.nakama.api.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.set(index, value); + onChanged(); + } else { + usersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder setUsers( + int index, com.heroiclabs.nakama.api.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.set(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder addUsers(com.heroiclabs.nakama.api.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(value); + onChanged(); + } else { + usersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder addUsers( + int index, com.heroiclabs.nakama.api.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(index, value); + onChanged(); + } else { + usersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder addUsers( + com.heroiclabs.nakama.api.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder addUsers( + int index, com.heroiclabs.nakama.api.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder addAllUsers( + java.lang.Iterable values) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, users_); + onChanged(); + } else { + usersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder clearUsers() { + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + usersBuilder_.clear(); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public Builder removeUsers(int index) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.remove(index); + onChanged(); + } else { + usersBuilder_.remove(index); + } + return this; + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public com.heroiclabs.nakama.api.User.Builder getUsersBuilder( + int index) { + return getUsersFieldBuilder().getBuilder(index); + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public com.heroiclabs.nakama.api.UserOrBuilder getUsersOrBuilder( + int index) { + if (usersBuilder_ == null) { + return users_.get(index); } else { + return usersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public java.util.List + getUsersOrBuilderList() { + if (usersBuilder_ != null) { + return usersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(users_); + } + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public com.heroiclabs.nakama.api.User.Builder addUsersBuilder() { + return getUsersFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.User.getDefaultInstance()); + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public com.heroiclabs.nakama.api.User.Builder addUsersBuilder( + int index) { + return getUsersFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.User.getDefaultInstance()); + } + /** + *
+     * The User objects.
+     * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + public java.util.List + getUsersBuilderList() { + return getUsersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder> + getUsersFieldBuilder() { + if (usersBuilder_ == null) { + usersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.User, com.heroiclabs.nakama.api.User.Builder, com.heroiclabs.nakama.api.UserOrBuilder>( + users_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + users_ = null; + } + return usersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.Users) + } + + // @@protoc_insertion_point(class_scope:nakama.api.Users) + private static final com.heroiclabs.nakama.api.Users DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.Users(); + } + + public static com.heroiclabs.nakama.api.Users getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Users parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.Users getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/UsersOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/UsersOrBuilder.java new file mode 100644 index 00000000..41db69a1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/UsersOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface UsersOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.Users) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + java.util.List + getUsersList(); + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + com.heroiclabs.nakama.api.User getUsers(int index); + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + int getUsersCount(); + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + java.util.List + getUsersOrBuilderList(); + /** + *
+   * The User objects.
+   * 
+ * + * repeated .nakama.api.User users = 1 [json_name = "users"]; + */ + com.heroiclabs.nakama.api.UserOrBuilder getUsersOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequest.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequest.java new file mode 100644 index 00000000..bb598756 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Apple IAP Purchases validation request
+ * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseAppleRequest} + */ +public final class ValidatePurchaseAppleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidatePurchaseAppleRequest) + ValidatePurchaseAppleRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidatePurchaseAppleRequest.class.getName()); + } + // Use ValidatePurchaseAppleRequest.newBuilder() to construct. + private ValidatePurchaseAppleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidatePurchaseAppleRequest() { + receipt_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseAppleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseAppleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.Builder.class); + } + + private int bitField0_; + public static final int RECEIPT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object receipt_ = ""; + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + @java.lang.Override + public java.lang.String getReceipt() { + java.lang.Object ref = receipt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receipt_ = s; + return s; + } + } + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiptBytes() { + java.lang.Object ref = receipt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receipt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSIST_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue persist_; + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + @java.lang.Override + public boolean hasPersist() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersist() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receipt_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, receipt_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPersist()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receipt_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, receipt_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPersist()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest other = (com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest) obj; + + if (!getReceipt() + .equals(other.getReceipt())) return false; + if (hasPersist() != other.hasPersist()) return false; + if (hasPersist()) { + if (!getPersist() + .equals(other.getPersist())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RECEIPT_FIELD_NUMBER; + hash = (53 * hash) + getReceipt().hashCode(); + if (hasPersist()) { + hash = (37 * hash) + PERSIST_FIELD_NUMBER; + hash = (53 * hash) + getPersist().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Apple IAP Purchases validation request
+   * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseAppleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidatePurchaseAppleRequest) + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseAppleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseAppleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPersistFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + receipt_ = ""; + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseAppleRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest build() { + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest buildPartial() { + com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest result = new com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.receipt_ = receipt_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.persist_ = persistBuilder_ == null + ? persist_ + : persistBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest other) { + if (other == com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest.getDefaultInstance()) return this; + if (!other.getReceipt().isEmpty()) { + receipt_ = other.receipt_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPersist()) { + mergePersist(other.getPersist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + receipt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPersistFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object receipt_ = ""; + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + public java.lang.String getReceipt() { + java.lang.Object ref = receipt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receipt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + public com.google.protobuf.ByteString + getReceiptBytes() { + java.lang.Object ref = receipt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receipt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @param value The receipt to set. + * @return This builder for chaining. + */ + public Builder setReceipt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + receipt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return This builder for chaining. + */ + public Builder clearReceipt() { + receipt_ = getDefaultInstance().getReceipt(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @param value The bytes for receipt to set. + * @return This builder for chaining. + */ + public Builder setReceiptBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + receipt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue persist_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistBuilder_; + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + public boolean hasPersist() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + public com.google.protobuf.BoolValue getPersist() { + if (persistBuilder_ == null) { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } else { + return persistBuilder_.getMessage(); + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persist_ = value; + } else { + persistBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistBuilder_ == null) { + persist_ = builderForValue.build(); + } else { + persistBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder mergePersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + persist_ != null && + persist_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistBuilder().mergeFrom(value); + } else { + persist_ = value; + } + } else { + persistBuilder_.mergeFrom(value); + } + if (persist_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder clearPersist() { + bitField0_ = (bitField0_ & ~0x00000002); + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPersistFieldBuilder().getBuilder(); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + if (persistBuilder_ != null) { + return persistBuilder_.getMessageOrBuilder(); + } else { + return persist_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistFieldBuilder() { + if (persistBuilder_ == null) { + persistBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersist(), + getParentForChildren(), + isClean()); + persist_ = null; + } + return persistBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidatePurchaseAppleRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidatePurchaseAppleRequest) + private static final com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest(); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatePurchaseAppleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseAppleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequestOrBuilder.java new file mode 100644 index 00000000..e7a5456e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseAppleRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidatePurchaseAppleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidatePurchaseAppleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + java.lang.String getReceipt(); + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + com.google.protobuf.ByteString + getReceiptBytes(); + + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + boolean hasPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + com.google.protobuf.BoolValue getPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequest.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequest.java new file mode 100644 index 00000000..173aa65f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Facebook Instant IAP Purchase validation request
+ * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseFacebookInstantRequest} + */ +public final class ValidatePurchaseFacebookInstantRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidatePurchaseFacebookInstantRequest) + ValidatePurchaseFacebookInstantRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidatePurchaseFacebookInstantRequest.class.getName()); + } + // Use ValidatePurchaseFacebookInstantRequest.newBuilder() to construct. + private ValidatePurchaseFacebookInstantRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidatePurchaseFacebookInstantRequest() { + signedRequest_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.Builder.class); + } + + private int bitField0_; + public static final int SIGNED_REQUEST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object signedRequest_ = ""; + /** + *
+   * Base64 encoded Facebook Instant signedRequest receipt data payload.
+   * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @return The signedRequest. + */ + @java.lang.Override + public java.lang.String getSignedRequest() { + java.lang.Object ref = signedRequest_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRequest_ = s; + return s; + } + } + /** + *
+   * Base64 encoded Facebook Instant signedRequest receipt data payload.
+   * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @return The bytes for signedRequest. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignedRequestBytes() { + java.lang.Object ref = signedRequest_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRequest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSIST_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue persist_; + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + @java.lang.Override + public boolean hasPersist() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersist() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedRequest_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, signedRequest_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPersist()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signedRequest_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, signedRequest_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPersist()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest other = (com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest) obj; + + if (!getSignedRequest() + .equals(other.getSignedRequest())) return false; + if (hasPersist() != other.hasPersist()) return false; + if (hasPersist()) { + if (!getPersist() + .equals(other.getPersist())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNED_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getSignedRequest().hashCode(); + if (hasPersist()) { + hash = (37 * hash) + PERSIST_FIELD_NUMBER; + hash = (53 * hash) + getPersist().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Facebook Instant IAP Purchase validation request
+   * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseFacebookInstantRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidatePurchaseFacebookInstantRequest) + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPersistFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signedRequest_ = ""; + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseFacebookInstantRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest build() { + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest buildPartial() { + com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest result = new com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signedRequest_ = signedRequest_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.persist_ = persistBuilder_ == null + ? persist_ + : persistBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest other) { + if (other == com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest.getDefaultInstance()) return this; + if (!other.getSignedRequest().isEmpty()) { + signedRequest_ = other.signedRequest_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPersist()) { + mergePersist(other.getPersist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signedRequest_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPersistFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object signedRequest_ = ""; + /** + *
+     * Base64 encoded Facebook Instant signedRequest receipt data payload.
+     * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @return The signedRequest. + */ + public java.lang.String getSignedRequest() { + java.lang.Object ref = signedRequest_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRequest_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Base64 encoded Facebook Instant signedRequest receipt data payload.
+     * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @return The bytes for signedRequest. + */ + public com.google.protobuf.ByteString + getSignedRequestBytes() { + java.lang.Object ref = signedRequest_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRequest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Base64 encoded Facebook Instant signedRequest receipt data payload.
+     * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @param value The signedRequest to set. + * @return This builder for chaining. + */ + public Builder setSignedRequest( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + signedRequest_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Base64 encoded Facebook Instant signedRequest receipt data payload.
+     * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @return This builder for chaining. + */ + public Builder clearSignedRequest() { + signedRequest_ = getDefaultInstance().getSignedRequest(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Base64 encoded Facebook Instant signedRequest receipt data payload.
+     * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @param value The bytes for signedRequest to set. + * @return This builder for chaining. + */ + public Builder setSignedRequestBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + signedRequest_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue persist_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistBuilder_; + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + public boolean hasPersist() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + public com.google.protobuf.BoolValue getPersist() { + if (persistBuilder_ == null) { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } else { + return persistBuilder_.getMessage(); + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persist_ = value; + } else { + persistBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistBuilder_ == null) { + persist_ = builderForValue.build(); + } else { + persistBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder mergePersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + persist_ != null && + persist_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistBuilder().mergeFrom(value); + } else { + persist_ = value; + } + } else { + persistBuilder_.mergeFrom(value); + } + if (persist_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder clearPersist() { + bitField0_ = (bitField0_ & ~0x00000002); + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPersistFieldBuilder().getBuilder(); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + if (persistBuilder_ != null) { + return persistBuilder_.getMessageOrBuilder(); + } else { + return persist_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistFieldBuilder() { + if (persistBuilder_ == null) { + persistBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersist(), + getParentForChildren(), + isClean()); + persist_ = null; + } + return persistBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidatePurchaseFacebookInstantRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidatePurchaseFacebookInstantRequest) + private static final com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest(); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatePurchaseFacebookInstantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseFacebookInstantRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequestOrBuilder.java new file mode 100644 index 00000000..547b9175 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseFacebookInstantRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidatePurchaseFacebookInstantRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidatePurchaseFacebookInstantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Base64 encoded Facebook Instant signedRequest receipt data payload.
+   * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @return The signedRequest. + */ + java.lang.String getSignedRequest(); + /** + *
+   * Base64 encoded Facebook Instant signedRequest receipt data payload.
+   * 
+ * + * string signed_request = 1 [json_name = "signedRequest"]; + * @return The bytes for signedRequest. + */ + com.google.protobuf.ByteString + getSignedRequestBytes(); + + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + boolean hasPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + com.google.protobuf.BoolValue getPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequest.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequest.java new file mode 100644 index 00000000..3249888e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Google IAP Purchase validation request
+ * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseGoogleRequest} + */ +public final class ValidatePurchaseGoogleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidatePurchaseGoogleRequest) + ValidatePurchaseGoogleRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidatePurchaseGoogleRequest.class.getName()); + } + // Use ValidatePurchaseGoogleRequest.newBuilder() to construct. + private ValidatePurchaseGoogleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidatePurchaseGoogleRequest() { + purchase_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.Builder.class); + } + + private int bitField0_; + public static final int PURCHASE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object purchase_ = ""; + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The purchase. + */ + @java.lang.Override + public java.lang.String getPurchase() { + java.lang.Object ref = purchase_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchase_ = s; + return s; + } + } + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The bytes for purchase. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPurchaseBytes() { + java.lang.Object ref = purchase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + purchase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSIST_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue persist_; + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + @java.lang.Override + public boolean hasPersist() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersist() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(purchase_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, purchase_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPersist()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(purchase_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, purchase_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPersist()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest other = (com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest) obj; + + if (!getPurchase() + .equals(other.getPurchase())) return false; + if (hasPersist() != other.hasPersist()) return false; + if (hasPersist()) { + if (!getPersist() + .equals(other.getPersist())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PURCHASE_FIELD_NUMBER; + hash = (53 * hash) + getPurchase().hashCode(); + if (hasPersist()) { + hash = (37 * hash) + PERSIST_FIELD_NUMBER; + hash = (53 * hash) + getPersist().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Google IAP Purchase validation request
+   * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseGoogleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidatePurchaseGoogleRequest) + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPersistFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + purchase_ = ""; + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseGoogleRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest build() { + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest buildPartial() { + com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest result = new com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.purchase_ = purchase_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.persist_ = persistBuilder_ == null + ? persist_ + : persistBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest other) { + if (other == com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest.getDefaultInstance()) return this; + if (!other.getPurchase().isEmpty()) { + purchase_ = other.purchase_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPersist()) { + mergePersist(other.getPersist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + purchase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPersistFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object purchase_ = ""; + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The purchase. + */ + public java.lang.String getPurchase() { + java.lang.Object ref = purchase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The bytes for purchase. + */ + public com.google.protobuf.ByteString + getPurchaseBytes() { + java.lang.Object ref = purchase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + purchase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @param value The purchase to set. + * @return This builder for chaining. + */ + public Builder setPurchase( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + purchase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return This builder for chaining. + */ + public Builder clearPurchase() { + purchase_ = getDefaultInstance().getPurchase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @param value The bytes for purchase to set. + * @return This builder for chaining. + */ + public Builder setPurchaseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + purchase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue persist_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistBuilder_; + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + public boolean hasPersist() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + public com.google.protobuf.BoolValue getPersist() { + if (persistBuilder_ == null) { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } else { + return persistBuilder_.getMessage(); + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persist_ = value; + } else { + persistBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistBuilder_ == null) { + persist_ = builderForValue.build(); + } else { + persistBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder mergePersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + persist_ != null && + persist_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistBuilder().mergeFrom(value); + } else { + persist_ = value; + } + } else { + persistBuilder_.mergeFrom(value); + } + if (persist_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder clearPersist() { + bitField0_ = (bitField0_ & ~0x00000002); + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPersistFieldBuilder().getBuilder(); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + if (persistBuilder_ != null) { + return persistBuilder_.getMessageOrBuilder(); + } else { + return persist_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistFieldBuilder() { + if (persistBuilder_ == null) { + persistBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersist(), + getParentForChildren(), + isClean()); + persist_ = null; + } + return persistBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidatePurchaseGoogleRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidatePurchaseGoogleRequest) + private static final com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest(); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatePurchaseGoogleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseGoogleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequestOrBuilder.java new file mode 100644 index 00000000..d613025d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseGoogleRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidatePurchaseGoogleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidatePurchaseGoogleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The purchase. + */ + java.lang.String getPurchase(); + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The bytes for purchase. + */ + com.google.protobuf.ByteString + getPurchaseBytes(); + + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + boolean hasPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + com.google.protobuf.BoolValue getPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequest.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequest.java new file mode 100644 index 00000000..18a1ed5b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequest.java @@ -0,0 +1,942 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Huawei IAP Purchase validation request
+ * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseHuaweiRequest} + */ +public final class ValidatePurchaseHuaweiRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidatePurchaseHuaweiRequest) + ValidatePurchaseHuaweiRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidatePurchaseHuaweiRequest.class.getName()); + } + // Use ValidatePurchaseHuaweiRequest.newBuilder() to construct. + private ValidatePurchaseHuaweiRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidatePurchaseHuaweiRequest() { + purchase_ = ""; + signature_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseHuaweiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseHuaweiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.Builder.class); + } + + private int bitField0_; + public static final int PURCHASE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object purchase_ = ""; + /** + *
+   * JSON encoded Huawei InAppPurchaseData.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The purchase. + */ + @java.lang.Override + public java.lang.String getPurchase() { + java.lang.Object ref = purchase_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchase_ = s; + return s; + } + } + /** + *
+   * JSON encoded Huawei InAppPurchaseData.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The bytes for purchase. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPurchaseBytes() { + java.lang.Object ref = purchase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + purchase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object signature_ = ""; + /** + *
+   * InAppPurchaseData signature.
+   * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + *
+   * InAppPurchaseData signature.
+   * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSIST_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue persist_; + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + @java.lang.Override + public boolean hasPersist() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + * @return The persist. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersist() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(purchase_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, purchase_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, signature_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPersist()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(purchase_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, purchase_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, signature_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPersist()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest other = (com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest) obj; + + if (!getPurchase() + .equals(other.getPurchase())) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (hasPersist() != other.hasPersist()) return false; + if (hasPersist()) { + if (!getPersist() + .equals(other.getPersist())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PURCHASE_FIELD_NUMBER; + hash = (53 * hash) + getPurchase().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + if (hasPersist()) { + hash = (37 * hash) + PERSIST_FIELD_NUMBER; + hash = (53 * hash) + getPersist().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Huawei IAP Purchase validation request
+   * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseHuaweiRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidatePurchaseHuaweiRequest) + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseHuaweiRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseHuaweiRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.class, com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPersistFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + purchase_ = ""; + signature_ = ""; + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseHuaweiRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest build() { + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest buildPartial() { + com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest result = new com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.purchase_ = purchase_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.signature_ = signature_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.persist_ = persistBuilder_ == null + ? persist_ + : persistBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest other) { + if (other == com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest.getDefaultInstance()) return this; + if (!other.getPurchase().isEmpty()) { + purchase_ = other.purchase_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPersist()) { + mergePersist(other.getPersist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + purchase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + signature_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getPersistFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object purchase_ = ""; + /** + *
+     * JSON encoded Huawei InAppPurchaseData.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The purchase. + */ + public java.lang.String getPurchase() { + java.lang.Object ref = purchase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * JSON encoded Huawei InAppPurchaseData.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The bytes for purchase. + */ + public com.google.protobuf.ByteString + getPurchaseBytes() { + java.lang.Object ref = purchase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + purchase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * JSON encoded Huawei InAppPurchaseData.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @param value The purchase to set. + * @return This builder for chaining. + */ + public Builder setPurchase( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + purchase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * JSON encoded Huawei InAppPurchaseData.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return This builder for chaining. + */ + public Builder clearPurchase() { + purchase_ = getDefaultInstance().getPurchase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * JSON encoded Huawei InAppPurchaseData.
+     * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @param value The bytes for purchase to set. + * @return This builder for chaining. + */ + public Builder setPurchaseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + purchase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object signature_ = ""; + /** + *
+     * InAppPurchaseData signature.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * InAppPurchaseData signature.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * InAppPurchaseData signature.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + signature_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * InAppPurchaseData signature.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + signature_ = getDefaultInstance().getSignature(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * InAppPurchaseData signature.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + signature_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue persist_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistBuilder_; + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + public boolean hasPersist() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + * @return The persist. + */ + public com.google.protobuf.BoolValue getPersist() { + if (persistBuilder_ == null) { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } else { + return persistBuilder_.getMessage(); + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + public Builder setPersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persist_ = value; + } else { + persistBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + public Builder setPersist( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistBuilder_ == null) { + persist_ = builderForValue.build(); + } else { + persistBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + public Builder mergePersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + persist_ != null && + persist_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistBuilder().mergeFrom(value); + } else { + persist_ = value; + } + } else { + persistBuilder_.mergeFrom(value); + } + if (persist_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + public Builder clearPersist() { + bitField0_ = (bitField0_ & ~0x00000004); + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPersistFieldBuilder().getBuilder(); + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + if (persistBuilder_ != null) { + return persistBuilder_.getMessageOrBuilder(); + } else { + return persist_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + } + /** + *
+     * Persist the purchase
+     * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistFieldBuilder() { + if (persistBuilder_ == null) { + persistBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersist(), + getParentForChildren(), + isClean()); + persist_ = null; + } + return persistBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidatePurchaseHuaweiRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidatePurchaseHuaweiRequest) + private static final com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest(); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatePurchaseHuaweiRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseHuaweiRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequestOrBuilder.java new file mode 100644 index 00000000..17515e7d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseHuaweiRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidatePurchaseHuaweiRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidatePurchaseHuaweiRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * JSON encoded Huawei InAppPurchaseData.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The purchase. + */ + java.lang.String getPurchase(); + /** + *
+   * JSON encoded Huawei InAppPurchaseData.
+   * 
+ * + * string purchase = 1 [json_name = "purchase"]; + * @return The bytes for purchase. + */ + com.google.protobuf.ByteString + getPurchaseBytes(); + + /** + *
+   * InAppPurchaseData signature.
+   * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The signature. + */ + java.lang.String getSignature(); + /** + *
+   * InAppPurchaseData signature.
+   * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + boolean hasPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + * @return The persist. + */ + com.google.protobuf.BoolValue getPersist(); + /** + *
+   * Persist the purchase
+   * 
+ * + * .google.protobuf.BoolValue persist = 3 [json_name = "persist"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponse.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponse.java new file mode 100644 index 00000000..f4618cf0 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponse.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Validate IAP response.
+ * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseResponse} + */ +public final class ValidatePurchaseResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidatePurchaseResponse) + ValidatePurchaseResponseOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidatePurchaseResponse.class.getName()); + } + // Use ValidatePurchaseResponse.newBuilder() to construct. + private ValidatePurchaseResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidatePurchaseResponse() { + validatedPurchases_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseResponse.class, com.heroiclabs.nakama.api.ValidatePurchaseResponse.Builder.class); + } + + public static final int VALIDATED_PURCHASES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List validatedPurchases_; + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public java.util.List getValidatedPurchasesList() { + return validatedPurchases_; + } + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public java.util.List + getValidatedPurchasesOrBuilderList() { + return validatedPurchases_; + } + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public int getValidatedPurchasesCount() { + return validatedPurchases_.size(); + } + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchase getValidatedPurchases(int index) { + return validatedPurchases_.get(index); + } + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder getValidatedPurchasesOrBuilder( + int index) { + return validatedPurchases_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < validatedPurchases_.size(); i++) { + output.writeMessage(1, validatedPurchases_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < validatedPurchases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, validatedPurchases_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidatePurchaseResponse)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidatePurchaseResponse other = (com.heroiclabs.nakama.api.ValidatePurchaseResponse) obj; + + if (!getValidatedPurchasesList() + .equals(other.getValidatedPurchasesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValidatedPurchasesCount() > 0) { + hash = (37 * hash) + VALIDATED_PURCHASES_FIELD_NUMBER; + hash = (53 * hash) + getValidatedPurchasesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidatePurchaseResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Validate IAP response.
+   * 
+ * + * Protobuf type {@code nakama.api.ValidatePurchaseResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidatePurchaseResponse) + com.heroiclabs.nakama.api.ValidatePurchaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatePurchaseResponse.class, com.heroiclabs.nakama.api.ValidatePurchaseResponse.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidatePurchaseResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (validatedPurchasesBuilder_ == null) { + validatedPurchases_ = java.util.Collections.emptyList(); + } else { + validatedPurchases_ = null; + validatedPurchasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatePurchaseResponse_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseResponse getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidatePurchaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseResponse build() { + com.heroiclabs.nakama.api.ValidatePurchaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseResponse buildPartial() { + com.heroiclabs.nakama.api.ValidatePurchaseResponse result = new com.heroiclabs.nakama.api.ValidatePurchaseResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.ValidatePurchaseResponse result) { + if (validatedPurchasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + validatedPurchases_ = java.util.Collections.unmodifiableList(validatedPurchases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.validatedPurchases_ = validatedPurchases_; + } else { + result.validatedPurchases_ = validatedPurchasesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidatePurchaseResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidatePurchaseResponse) { + return mergeFrom((com.heroiclabs.nakama.api.ValidatePurchaseResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidatePurchaseResponse other) { + if (other == com.heroiclabs.nakama.api.ValidatePurchaseResponse.getDefaultInstance()) return this; + if (validatedPurchasesBuilder_ == null) { + if (!other.validatedPurchases_.isEmpty()) { + if (validatedPurchases_.isEmpty()) { + validatedPurchases_ = other.validatedPurchases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.addAll(other.validatedPurchases_); + } + onChanged(); + } + } else { + if (!other.validatedPurchases_.isEmpty()) { + if (validatedPurchasesBuilder_.isEmpty()) { + validatedPurchasesBuilder_.dispose(); + validatedPurchasesBuilder_ = null; + validatedPurchases_ = other.validatedPurchases_; + bitField0_ = (bitField0_ & ~0x00000001); + validatedPurchasesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValidatedPurchasesFieldBuilder() : null; + } else { + validatedPurchasesBuilder_.addAllMessages(other.validatedPurchases_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.ValidatedPurchase m = + input.readMessage( + com.heroiclabs.nakama.api.ValidatedPurchase.parser(), + extensionRegistry); + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(m); + } else { + validatedPurchasesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List validatedPurchases_ = + java.util.Collections.emptyList(); + private void ensureValidatedPurchasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + validatedPurchases_ = new java.util.ArrayList(validatedPurchases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedPurchase, com.heroiclabs.nakama.api.ValidatedPurchase.Builder, com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder> validatedPurchasesBuilder_; + + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public java.util.List getValidatedPurchasesList() { + if (validatedPurchasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(validatedPurchases_); + } else { + return validatedPurchasesBuilder_.getMessageList(); + } + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public int getValidatedPurchasesCount() { + if (validatedPurchasesBuilder_ == null) { + return validatedPurchases_.size(); + } else { + return validatedPurchasesBuilder_.getCount(); + } + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase getValidatedPurchases(int index) { + if (validatedPurchasesBuilder_ == null) { + return validatedPurchases_.get(index); + } else { + return validatedPurchasesBuilder_.getMessage(index); + } + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder setValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase value) { + if (validatedPurchasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.set(index, value); + onChanged(); + } else { + validatedPurchasesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder setValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase.Builder builderForValue) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.set(index, builderForValue.build()); + onChanged(); + } else { + validatedPurchasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases(com.heroiclabs.nakama.api.ValidatedPurchase value) { + if (validatedPurchasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(value); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase value) { + if (validatedPurchasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(index, value); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases( + com.heroiclabs.nakama.api.ValidatedPurchase.Builder builderForValue) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(builderForValue.build()); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addValidatedPurchases( + int index, com.heroiclabs.nakama.api.ValidatedPurchase.Builder builderForValue) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.add(index, builderForValue.build()); + onChanged(); + } else { + validatedPurchasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder addAllValidatedPurchases( + java.lang.Iterable values) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, validatedPurchases_); + onChanged(); + } else { + validatedPurchasesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder clearValidatedPurchases() { + if (validatedPurchasesBuilder_ == null) { + validatedPurchases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + validatedPurchasesBuilder_.clear(); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public Builder removeValidatedPurchases(int index) { + if (validatedPurchasesBuilder_ == null) { + ensureValidatedPurchasesIsMutable(); + validatedPurchases_.remove(index); + onChanged(); + } else { + validatedPurchasesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase.Builder getValidatedPurchasesBuilder( + int index) { + return getValidatedPurchasesFieldBuilder().getBuilder(index); + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder getValidatedPurchasesOrBuilder( + int index) { + if (validatedPurchasesBuilder_ == null) { + return validatedPurchases_.get(index); } else { + return validatedPurchasesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public java.util.List + getValidatedPurchasesOrBuilderList() { + if (validatedPurchasesBuilder_ != null) { + return validatedPurchasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(validatedPurchases_); + } + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase.Builder addValidatedPurchasesBuilder() { + return getValidatedPurchasesFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.ValidatedPurchase.getDefaultInstance()); + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public com.heroiclabs.nakama.api.ValidatedPurchase.Builder addValidatedPurchasesBuilder( + int index) { + return getValidatedPurchasesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.ValidatedPurchase.getDefaultInstance()); + } + /** + *
+     * Newly seen validated purchases.
+     * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + public java.util.List + getValidatedPurchasesBuilderList() { + return getValidatedPurchasesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedPurchase, com.heroiclabs.nakama.api.ValidatedPurchase.Builder, com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder> + getValidatedPurchasesFieldBuilder() { + if (validatedPurchasesBuilder_ == null) { + validatedPurchasesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.ValidatedPurchase, com.heroiclabs.nakama.api.ValidatedPurchase.Builder, com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder>( + validatedPurchases_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + validatedPurchases_ = null; + } + return validatedPurchasesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidatePurchaseResponse) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidatePurchaseResponse) + private static final com.heroiclabs.nakama.api.ValidatePurchaseResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidatePurchaseResponse(); + } + + public static com.heroiclabs.nakama.api.ValidatePurchaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatePurchaseResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatePurchaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponseOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponseOrBuilder.java new file mode 100644 index 00000000..0801ddde --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatePurchaseResponseOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidatePurchaseResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidatePurchaseResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + java.util.List + getValidatedPurchasesList(); + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + com.heroiclabs.nakama.api.ValidatedPurchase getValidatedPurchases(int index); + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + int getValidatedPurchasesCount(); + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + java.util.List + getValidatedPurchasesOrBuilderList(); + /** + *
+   * Newly seen validated purchases.
+   * 
+ * + * repeated .nakama.api.ValidatedPurchase validated_purchases = 1 [json_name = "validatedPurchases"]; + */ + com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder getValidatedPurchasesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequest.java b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequest.java new file mode 100644 index 00000000..34d67e73 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Apple Subscription validation request
+ * 
+ * + * Protobuf type {@code nakama.api.ValidateSubscriptionAppleRequest} + */ +public final class ValidateSubscriptionAppleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidateSubscriptionAppleRequest) + ValidateSubscriptionAppleRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidateSubscriptionAppleRequest.class.getName()); + } + // Use ValidateSubscriptionAppleRequest.newBuilder() to construct. + private ValidateSubscriptionAppleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidateSubscriptionAppleRequest() { + receipt_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionAppleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionAppleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.class, com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.Builder.class); + } + + private int bitField0_; + public static final int RECEIPT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object receipt_ = ""; + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + @java.lang.Override + public java.lang.String getReceipt() { + java.lang.Object ref = receipt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receipt_ = s; + return s; + } + } + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiptBytes() { + java.lang.Object ref = receipt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receipt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSIST_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue persist_; + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + @java.lang.Override + public boolean hasPersist() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersist() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receipt_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, receipt_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPersist()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receipt_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, receipt_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPersist()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest other = (com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest) obj; + + if (!getReceipt() + .equals(other.getReceipt())) return false; + if (hasPersist() != other.hasPersist()) return false; + if (hasPersist()) { + if (!getPersist() + .equals(other.getPersist())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RECEIPT_FIELD_NUMBER; + hash = (53 * hash) + getReceipt().hashCode(); + if (hasPersist()) { + hash = (37 * hash) + PERSIST_FIELD_NUMBER; + hash = (53 * hash) + getPersist().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Apple Subscription validation request
+   * 
+ * + * Protobuf type {@code nakama.api.ValidateSubscriptionAppleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidateSubscriptionAppleRequest) + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionAppleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionAppleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.class, com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPersistFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + receipt_ = ""; + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionAppleRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest build() { + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest buildPartial() { + com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest result = new com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.receipt_ = receipt_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.persist_ = persistBuilder_ == null + ? persist_ + : persistBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest other) { + if (other == com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest.getDefaultInstance()) return this; + if (!other.getReceipt().isEmpty()) { + receipt_ = other.receipt_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPersist()) { + mergePersist(other.getPersist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + receipt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPersistFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object receipt_ = ""; + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + public java.lang.String getReceipt() { + java.lang.Object ref = receipt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receipt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + public com.google.protobuf.ByteString + getReceiptBytes() { + java.lang.Object ref = receipt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receipt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @param value The receipt to set. + * @return This builder for chaining. + */ + public Builder setReceipt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + receipt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return This builder for chaining. + */ + public Builder clearReceipt() { + receipt_ = getDefaultInstance().getReceipt(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Base64 encoded Apple receipt data payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @param value The bytes for receipt to set. + * @return This builder for chaining. + */ + public Builder setReceiptBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + receipt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue persist_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistBuilder_; + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + public boolean hasPersist() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + public com.google.protobuf.BoolValue getPersist() { + if (persistBuilder_ == null) { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } else { + return persistBuilder_.getMessage(); + } + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persist_ = value; + } else { + persistBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistBuilder_ == null) { + persist_ = builderForValue.build(); + } else { + persistBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder mergePersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + persist_ != null && + persist_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistBuilder().mergeFrom(value); + } else { + persist_ = value; + } + } else { + persistBuilder_.mergeFrom(value); + } + if (persist_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder clearPersist() { + bitField0_ = (bitField0_ & ~0x00000002); + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPersistFieldBuilder().getBuilder(); + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + if (persistBuilder_ != null) { + return persistBuilder_.getMessageOrBuilder(); + } else { + return persist_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistFieldBuilder() { + if (persistBuilder_ == null) { + persistBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersist(), + getParentForChildren(), + isClean()); + persist_ = null; + } + return persistBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidateSubscriptionAppleRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidateSubscriptionAppleRequest) + private static final com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest(); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateSubscriptionAppleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionAppleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequestOrBuilder.java new file mode 100644 index 00000000..03401a8c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionAppleRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidateSubscriptionAppleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidateSubscriptionAppleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + java.lang.String getReceipt(); + /** + *
+   * Base64 encoded Apple receipt data payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + com.google.protobuf.ByteString + getReceiptBytes(); + + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + boolean hasPersist(); + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + com.google.protobuf.BoolValue getPersist(); + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequest.java b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequest.java new file mode 100644 index 00000000..1083a8fa --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequest.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Google Subscription validation request
+ * 
+ * + * Protobuf type {@code nakama.api.ValidateSubscriptionGoogleRequest} + */ +public final class ValidateSubscriptionGoogleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidateSubscriptionGoogleRequest) + ValidateSubscriptionGoogleRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidateSubscriptionGoogleRequest.class.getName()); + } + // Use ValidateSubscriptionGoogleRequest.newBuilder() to construct. + private ValidateSubscriptionGoogleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidateSubscriptionGoogleRequest() { + receipt_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.class, com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.Builder.class); + } + + private int bitField0_; + public static final int RECEIPT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object receipt_ = ""; + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + @java.lang.Override + public java.lang.String getReceipt() { + java.lang.Object ref = receipt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receipt_ = s; + return s; + } + } + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiptBytes() { + java.lang.Object ref = receipt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receipt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSIST_FIELD_NUMBER = 2; + private com.google.protobuf.BoolValue persist_; + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + @java.lang.Override + public boolean hasPersist() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersist() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receipt_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, receipt_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPersist()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(receipt_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, receipt_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPersist()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest other = (com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest) obj; + + if (!getReceipt() + .equals(other.getReceipt())) return false; + if (hasPersist() != other.hasPersist()) return false; + if (hasPersist()) { + if (!getPersist() + .equals(other.getPersist())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RECEIPT_FIELD_NUMBER; + hash = (53 * hash) + getReceipt().hashCode(); + if (hasPersist()) { + hash = (37 * hash) + PERSIST_FIELD_NUMBER; + hash = (53 * hash) + getPersist().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Google Subscription validation request
+   * 
+ * + * Protobuf type {@code nakama.api.ValidateSubscriptionGoogleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidateSubscriptionGoogleRequest) + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.class, com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPersistFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + receipt_ = ""; + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionGoogleRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest build() { + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest buildPartial() { + com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest result = new com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.receipt_ = receipt_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.persist_ = persistBuilder_ == null + ? persist_ + : persistBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest) { + return mergeFrom((com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest other) { + if (other == com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest.getDefaultInstance()) return this; + if (!other.getReceipt().isEmpty()) { + receipt_ = other.receipt_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPersist()) { + mergePersist(other.getPersist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + receipt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPersistFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object receipt_ = ""; + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + public java.lang.String getReceipt() { + java.lang.Object ref = receipt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receipt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + public com.google.protobuf.ByteString + getReceiptBytes() { + java.lang.Object ref = receipt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receipt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @param value The receipt to set. + * @return This builder for chaining. + */ + public Builder setReceipt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + receipt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return This builder for chaining. + */ + public Builder clearReceipt() { + receipt_ = getDefaultInstance().getReceipt(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * JSON encoded Google purchase payload.
+     * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @param value The bytes for receipt to set. + * @return This builder for chaining. + */ + public Builder setReceiptBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + receipt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue persist_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistBuilder_; + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + public boolean hasPersist() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + public com.google.protobuf.BoolValue getPersist() { + if (persistBuilder_ == null) { + return persist_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } else { + return persistBuilder_.getMessage(); + } + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persist_ = value; + } else { + persistBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder setPersist( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistBuilder_ == null) { + persist_ = builderForValue.build(); + } else { + persistBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder mergePersist(com.google.protobuf.BoolValue value) { + if (persistBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + persist_ != null && + persist_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistBuilder().mergeFrom(value); + } else { + persist_ = value; + } + } else { + persistBuilder_.mergeFrom(value); + } + if (persist_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public Builder clearPersist() { + bitField0_ = (bitField0_ & ~0x00000002); + persist_ = null; + if (persistBuilder_ != null) { + persistBuilder_.dispose(); + persistBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPersistFieldBuilder().getBuilder(); + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder() { + if (persistBuilder_ != null) { + return persistBuilder_.getMessageOrBuilder(); + } else { + return persist_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persist_; + } + } + /** + *
+     * Persist the subscription.
+     * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistFieldBuilder() { + if (persistBuilder_ == null) { + persistBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersist(), + getParentForChildren(), + isClean()); + persist_ = null; + } + return persistBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidateSubscriptionGoogleRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidateSubscriptionGoogleRequest) + private static final com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest(); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateSubscriptionGoogleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionGoogleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequestOrBuilder.java new file mode 100644 index 00000000..1818f849 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionGoogleRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidateSubscriptionGoogleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidateSubscriptionGoogleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The receipt. + */ + java.lang.String getReceipt(); + /** + *
+   * JSON encoded Google purchase payload.
+   * 
+ * + * string receipt = 1 [json_name = "receipt"]; + * @return The bytes for receipt. + */ + com.google.protobuf.ByteString + getReceiptBytes(); + + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return Whether the persist field is set. + */ + boolean hasPersist(); + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + * @return The persist. + */ + com.google.protobuf.BoolValue getPersist(); + /** + *
+   * Persist the subscription.
+   * 
+ * + * .google.protobuf.BoolValue persist = 2 [json_name = "persist"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponse.java b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponse.java new file mode 100644 index 00000000..03a5e373 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponse.java @@ -0,0 +1,566 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Validate Subscription response.
+ * 
+ * + * Protobuf type {@code nakama.api.ValidateSubscriptionResponse} + */ +public final class ValidateSubscriptionResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidateSubscriptionResponse) + ValidateSubscriptionResponseOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidateSubscriptionResponse.class.getName()); + } + // Use ValidateSubscriptionResponse.newBuilder() to construct. + private ValidateSubscriptionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidateSubscriptionResponse() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidateSubscriptionResponse.class, com.heroiclabs.nakama.api.ValidateSubscriptionResponse.Builder.class); + } + + private int bitField0_; + public static final int VALIDATED_SUBSCRIPTION_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.api.ValidatedSubscription validatedSubscription_; + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + * @return Whether the validatedSubscription field is set. + */ + @java.lang.Override + public boolean hasValidatedSubscription() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + * @return The validatedSubscription. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscription getValidatedSubscription() { + return validatedSubscription_ == null ? com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance() : validatedSubscription_; + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder getValidatedSubscriptionOrBuilder() { + return validatedSubscription_ == null ? com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance() : validatedSubscription_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValidatedSubscription()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValidatedSubscription()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidateSubscriptionResponse)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidateSubscriptionResponse other = (com.heroiclabs.nakama.api.ValidateSubscriptionResponse) obj; + + if (hasValidatedSubscription() != other.hasValidatedSubscription()) return false; + if (hasValidatedSubscription()) { + if (!getValidatedSubscription() + .equals(other.getValidatedSubscription())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValidatedSubscription()) { + hash = (37 * hash) + VALIDATED_SUBSCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getValidatedSubscription().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidateSubscriptionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Validate Subscription response.
+   * 
+ * + * Protobuf type {@code nakama.api.ValidateSubscriptionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidateSubscriptionResponse) + com.heroiclabs.nakama.api.ValidateSubscriptionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidateSubscriptionResponse.class, com.heroiclabs.nakama.api.ValidateSubscriptionResponse.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidateSubscriptionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValidatedSubscriptionFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + validatedSubscription_ = null; + if (validatedSubscriptionBuilder_ != null) { + validatedSubscriptionBuilder_.dispose(); + validatedSubscriptionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidateSubscriptionResponse_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionResponse getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidateSubscriptionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionResponse build() { + com.heroiclabs.nakama.api.ValidateSubscriptionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionResponse buildPartial() { + com.heroiclabs.nakama.api.ValidateSubscriptionResponse result = new com.heroiclabs.nakama.api.ValidateSubscriptionResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidateSubscriptionResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.validatedSubscription_ = validatedSubscriptionBuilder_ == null + ? validatedSubscription_ + : validatedSubscriptionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidateSubscriptionResponse) { + return mergeFrom((com.heroiclabs.nakama.api.ValidateSubscriptionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidateSubscriptionResponse other) { + if (other == com.heroiclabs.nakama.api.ValidateSubscriptionResponse.getDefaultInstance()) return this; + if (other.hasValidatedSubscription()) { + mergeValidatedSubscription(other.getValidatedSubscription()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValidatedSubscriptionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.api.ValidatedSubscription validatedSubscription_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.ValidatedSubscription, com.heroiclabs.nakama.api.ValidatedSubscription.Builder, com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder> validatedSubscriptionBuilder_; + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + * @return Whether the validatedSubscription field is set. + */ + public boolean hasValidatedSubscription() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + * @return The validatedSubscription. + */ + public com.heroiclabs.nakama.api.ValidatedSubscription getValidatedSubscription() { + if (validatedSubscriptionBuilder_ == null) { + return validatedSubscription_ == null ? com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance() : validatedSubscription_; + } else { + return validatedSubscriptionBuilder_.getMessage(); + } + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + public Builder setValidatedSubscription(com.heroiclabs.nakama.api.ValidatedSubscription value) { + if (validatedSubscriptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + validatedSubscription_ = value; + } else { + validatedSubscriptionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + public Builder setValidatedSubscription( + com.heroiclabs.nakama.api.ValidatedSubscription.Builder builderForValue) { + if (validatedSubscriptionBuilder_ == null) { + validatedSubscription_ = builderForValue.build(); + } else { + validatedSubscriptionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + public Builder mergeValidatedSubscription(com.heroiclabs.nakama.api.ValidatedSubscription value) { + if (validatedSubscriptionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + validatedSubscription_ != null && + validatedSubscription_ != com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance()) { + getValidatedSubscriptionBuilder().mergeFrom(value); + } else { + validatedSubscription_ = value; + } + } else { + validatedSubscriptionBuilder_.mergeFrom(value); + } + if (validatedSubscription_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + public Builder clearValidatedSubscription() { + bitField0_ = (bitField0_ & ~0x00000001); + validatedSubscription_ = null; + if (validatedSubscriptionBuilder_ != null) { + validatedSubscriptionBuilder_.dispose(); + validatedSubscriptionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + public com.heroiclabs.nakama.api.ValidatedSubscription.Builder getValidatedSubscriptionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValidatedSubscriptionFieldBuilder().getBuilder(); + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + public com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder getValidatedSubscriptionOrBuilder() { + if (validatedSubscriptionBuilder_ != null) { + return validatedSubscriptionBuilder_.getMessageOrBuilder(); + } else { + return validatedSubscription_ == null ? + com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance() : validatedSubscription_; + } + } + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.ValidatedSubscription, com.heroiclabs.nakama.api.ValidatedSubscription.Builder, com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder> + getValidatedSubscriptionFieldBuilder() { + if (validatedSubscriptionBuilder_ == null) { + validatedSubscriptionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.ValidatedSubscription, com.heroiclabs.nakama.api.ValidatedSubscription.Builder, com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder>( + getValidatedSubscription(), + getParentForChildren(), + isClean()); + validatedSubscription_ = null; + } + return validatedSubscriptionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidateSubscriptionResponse) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidateSubscriptionResponse) + private static final com.heroiclabs.nakama.api.ValidateSubscriptionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidateSubscriptionResponse(); + } + + public static com.heroiclabs.nakama.api.ValidateSubscriptionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateSubscriptionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidateSubscriptionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponseOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponseOrBuilder.java new file mode 100644 index 00000000..8291092b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidateSubscriptionResponseOrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidateSubscriptionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidateSubscriptionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + * @return Whether the validatedSubscription field is set. + */ + boolean hasValidatedSubscription(); + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + * @return The validatedSubscription. + */ + com.heroiclabs.nakama.api.ValidatedSubscription getValidatedSubscription(); + /** + * .nakama.api.ValidatedSubscription validated_subscription = 1 [json_name = "validatedSubscription"]; + */ + com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder getValidatedSubscriptionOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatedPurchase.java b/src/main/java/com/heroiclabs/nakama/api/ValidatedPurchase.java new file mode 100644 index 00000000..94e5f577 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatedPurchase.java @@ -0,0 +1,2296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Validated Purchase stored by Nakama.
+ * 
+ * + * Protobuf type {@code nakama.api.ValidatedPurchase} + */ +public final class ValidatedPurchase extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidatedPurchase) + ValidatedPurchaseOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidatedPurchase.class.getName()); + } + // Use ValidatedPurchase.newBuilder() to construct. + private ValidatedPurchase(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidatedPurchase() { + userId_ = ""; + productId_ = ""; + transactionId_ = ""; + store_ = 0; + providerResponse_ = ""; + environment_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatedPurchase.class, com.heroiclabs.nakama.api.ValidatedPurchase.Builder.class); + } + + private int bitField0_; + public static final int USER_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * Purchase User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * Purchase User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object productId_ = ""; + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The productId. + */ + @java.lang.Override + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } + } + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The bytes for productId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object transactionId_ = ""; + /** + *
+   * Purchase Transaction ID.
+   * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @return The transactionId. + */ + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } + } + /** + *
+   * Purchase Transaction ID.
+   * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STORE_FIELD_NUMBER = 4; + private int store_ = 0; + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The enum numeric value on the wire for store. + */ + @java.lang.Override public int getStoreValue() { + return store_; + } + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The store. + */ + @java.lang.Override public com.heroiclabs.nakama.api.StoreProvider getStore() { + com.heroiclabs.nakama.api.StoreProvider result = com.heroiclabs.nakama.api.StoreProvider.forNumber(store_); + return result == null ? com.heroiclabs.nakama.api.StoreProvider.UNRECOGNIZED : result; + } + + public static final int PURCHASE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp purchaseTime_; + /** + *
+   * Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return Whether the purchaseTime field is set. + */ + @java.lang.Override + public boolean hasPurchaseTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return The purchaseTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPurchaseTime() { + return purchaseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } + /** + *
+   * Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPurchaseTimeOrBuilder() { + return purchaseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int REFUND_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp refundTime_; + /** + *
+   * Timestamp when the purchase was refunded. Set to UNIX
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + * @return Whether the refundTime field is set. + */ + @java.lang.Override + public boolean hasRefundTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * Timestamp when the purchase was refunded. Set to UNIX
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + * @return The refundTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRefundTime() { + return refundTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } + /** + *
+   * Timestamp when the purchase was refunded. Set to UNIX
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRefundTimeOrBuilder() { + return refundTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } + + public static final int PROVIDER_RESPONSE_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object providerResponse_ = ""; + /** + *
+   * Raw provider validation response.
+   * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @return The providerResponse. + */ + @java.lang.Override + public java.lang.String getProviderResponse() { + java.lang.Object ref = providerResponse_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerResponse_ = s; + return s; + } + } + /** + *
+   * Raw provider validation response.
+   * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @return The bytes for providerResponse. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProviderResponseBytes() { + java.lang.Object ref = providerResponse_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerResponse_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 10; + private int environment_ = 0; + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @return The enum numeric value on the wire for environment. + */ + @java.lang.Override public int getEnvironmentValue() { + return environment_; + } + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @return The environment. + */ + @java.lang.Override public com.heroiclabs.nakama.api.StoreEnvironment getEnvironment() { + com.heroiclabs.nakama.api.StoreEnvironment result = com.heroiclabs.nakama.api.StoreEnvironment.forNumber(environment_); + return result == null ? com.heroiclabs.nakama.api.StoreEnvironment.UNRECOGNIZED : result; + } + + public static final int SEEN_BEFORE_FIELD_NUMBER = 11; + private boolean seenBefore_ = false; + /** + *
+   * Whether the purchase had already been validated by Nakama before.
+   * 
+ * + * bool seen_before = 11 [json_name = "seenBefore"]; + * @return The seenBefore. + */ + @java.lang.Override + public boolean getSeenBefore() { + return seenBefore_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, productId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, transactionId_); + } + if (store_ != com.heroiclabs.nakama.api.StoreProvider.APPLE_APP_STORE.getNumber()) { + output.writeEnum(4, store_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getPurchaseTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(8, getRefundTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerResponse_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, providerResponse_); + } + if (environment_ != com.heroiclabs.nakama.api.StoreEnvironment.UNKNOWN.getNumber()) { + output.writeEnum(10, environment_); + } + if (seenBefore_ != false) { + output.writeBool(11, seenBefore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, productId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, transactionId_); + } + if (store_ != com.heroiclabs.nakama.api.StoreProvider.APPLE_APP_STORE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, store_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getPurchaseTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getRefundTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerResponse_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, providerResponse_); + } + if (environment_ != com.heroiclabs.nakama.api.StoreEnvironment.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, environment_); + } + if (seenBefore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, seenBefore_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidatedPurchase)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidatedPurchase other = (com.heroiclabs.nakama.api.ValidatedPurchase) obj; + + if (!getUserId() + .equals(other.getUserId())) return false; + if (!getProductId() + .equals(other.getProductId())) return false; + if (!getTransactionId() + .equals(other.getTransactionId())) return false; + if (store_ != other.store_) return false; + if (hasPurchaseTime() != other.hasPurchaseTime()) return false; + if (hasPurchaseTime()) { + if (!getPurchaseTime() + .equals(other.getPurchaseTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasRefundTime() != other.hasRefundTime()) return false; + if (hasRefundTime()) { + if (!getRefundTime() + .equals(other.getRefundTime())) return false; + } + if (!getProviderResponse() + .equals(other.getProviderResponse())) return false; + if (environment_ != other.environment_) return false; + if (getSeenBefore() + != other.getSeenBefore()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductId().hashCode(); + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + hash = (37 * hash) + STORE_FIELD_NUMBER; + hash = (53 * hash) + store_; + if (hasPurchaseTime()) { + hash = (37 * hash) + PURCHASE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPurchaseTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasRefundTime()) { + hash = (37 * hash) + REFUND_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRefundTime().hashCode(); + } + hash = (37 * hash) + PROVIDER_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getProviderResponse().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + environment_; + hash = (37 * hash) + SEEN_BEFORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSeenBefore()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidatedPurchase parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidatedPurchase parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatedPurchase parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidatedPurchase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Validated Purchase stored by Nakama.
+   * 
+ * + * Protobuf type {@code nakama.api.ValidatedPurchase} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidatedPurchase) + com.heroiclabs.nakama.api.ValidatedPurchaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatedPurchase.class, com.heroiclabs.nakama.api.ValidatedPurchase.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidatedPurchase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPurchaseTimeFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getRefundTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = ""; + productId_ = ""; + transactionId_ = ""; + store_ = 0; + purchaseTime_ = null; + if (purchaseTimeBuilder_ != null) { + purchaseTimeBuilder_.dispose(); + purchaseTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + refundTime_ = null; + if (refundTimeBuilder_ != null) { + refundTimeBuilder_.dispose(); + refundTimeBuilder_ = null; + } + providerResponse_ = ""; + environment_ = 0; + seenBefore_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedPurchase_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchase getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidatedPurchase.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchase build() { + com.heroiclabs.nakama.api.ValidatedPurchase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchase buildPartial() { + com.heroiclabs.nakama.api.ValidatedPurchase result = new com.heroiclabs.nakama.api.ValidatedPurchase(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidatedPurchase result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.productId_ = productId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.transactionId_ = transactionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.store_ = store_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.purchaseTime_ = purchaseTimeBuilder_ == null + ? purchaseTime_ + : purchaseTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.refundTime_ = refundTimeBuilder_ == null + ? refundTime_ + : refundTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.providerResponse_ = providerResponse_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.seenBefore_ = seenBefore_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidatedPurchase) { + return mergeFrom((com.heroiclabs.nakama.api.ValidatedPurchase)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidatedPurchase other) { + if (other == com.heroiclabs.nakama.api.ValidatedPurchase.getDefaultInstance()) return this; + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProductId().isEmpty()) { + productId_ = other.productId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTransactionId().isEmpty()) { + transactionId_ = other.transactionId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.store_ != 0) { + setStoreValue(other.getStoreValue()); + } + if (other.hasPurchaseTime()) { + mergePurchaseTime(other.getPurchaseTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasRefundTime()) { + mergeRefundTime(other.getRefundTime()); + } + if (!other.getProviderResponse().isEmpty()) { + providerResponse_ = other.providerResponse_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.environment_ != 0) { + setEnvironmentValue(other.getEnvironmentValue()); + } + if (other.getSeenBefore() != false) { + setSeenBefore(other.getSeenBefore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + productId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + transactionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + store_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getPurchaseTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getRefundTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + providerResponse_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: { + environment_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + seenBefore_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object userId_ = ""; + /** + *
+     * Purchase User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Purchase User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Purchase User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Purchase User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Purchase User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object productId_ = ""; + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The productId. + */ + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The bytes for productId. + */ + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @param value The productId to set. + * @return This builder for chaining. + */ + public Builder setProductId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + productId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return This builder for chaining. + */ + public Builder clearProductId() { + productId_ = getDefaultInstance().getProductId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @param value The bytes for productId to set. + * @return This builder for chaining. + */ + public Builder setProductIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + productId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + *
+     * Purchase Transaction ID.
+     * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @return The transactionId. + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Purchase Transaction ID.
+     * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Purchase Transaction ID.
+     * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @param value The transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + transactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Purchase Transaction ID.
+     * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @return This builder for chaining. + */ + public Builder clearTransactionId() { + transactionId_ = getDefaultInstance().getTransactionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Purchase Transaction ID.
+     * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @param value The bytes for transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + transactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int store_ = 0; + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The enum numeric value on the wire for store. + */ + @java.lang.Override public int getStoreValue() { + return store_; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @param value The enum numeric value on the wire for store to set. + * @return This builder for chaining. + */ + public Builder setStoreValue(int value) { + store_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The store. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StoreProvider getStore() { + com.heroiclabs.nakama.api.StoreProvider result = com.heroiclabs.nakama.api.StoreProvider.forNumber(store_); + return result == null ? com.heroiclabs.nakama.api.StoreProvider.UNRECOGNIZED : result; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @param value The store to set. + * @return This builder for chaining. + */ + public Builder setStore(com.heroiclabs.nakama.api.StoreProvider value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + store_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return This builder for chaining. + */ + public Builder clearStore() { + bitField0_ = (bitField0_ & ~0x00000008); + store_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp purchaseTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> purchaseTimeBuilder_; + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return Whether the purchaseTime field is set. + */ + public boolean hasPurchaseTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return The purchaseTime. + */ + public com.google.protobuf.Timestamp getPurchaseTime() { + if (purchaseTimeBuilder_ == null) { + return purchaseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } else { + return purchaseTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder setPurchaseTime(com.google.protobuf.Timestamp value) { + if (purchaseTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purchaseTime_ = value; + } else { + purchaseTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder setPurchaseTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (purchaseTimeBuilder_ == null) { + purchaseTime_ = builderForValue.build(); + } else { + purchaseTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder mergePurchaseTime(com.google.protobuf.Timestamp value) { + if (purchaseTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + purchaseTime_ != null && + purchaseTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPurchaseTimeBuilder().mergeFrom(value); + } else { + purchaseTime_ = value; + } + } else { + purchaseTimeBuilder_.mergeFrom(value); + } + if (purchaseTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder clearPurchaseTime() { + bitField0_ = (bitField0_ & ~0x00000010); + purchaseTime_ = null; + if (purchaseTimeBuilder_ != null) { + purchaseTimeBuilder_.dispose(); + purchaseTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public com.google.protobuf.Timestamp.Builder getPurchaseTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPurchaseTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getPurchaseTimeOrBuilder() { + if (purchaseTimeBuilder_ != null) { + return purchaseTimeBuilder_.getMessageOrBuilder(); + } else { + return purchaseTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } + } + /** + *
+     * Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getPurchaseTimeFieldBuilder() { + if (purchaseTimeBuilder_ == null) { + purchaseTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getPurchaseTime(), + getParentForChildren(), + isClean()); + purchaseTime_ = null; + } + return purchaseTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp refundTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> refundTimeBuilder_; + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + * @return Whether the refundTime field is set. + */ + public boolean hasRefundTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + * @return The refundTime. + */ + public com.google.protobuf.Timestamp getRefundTime() { + if (refundTimeBuilder_ == null) { + return refundTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } else { + return refundTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + public Builder setRefundTime(com.google.protobuf.Timestamp value) { + if (refundTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + refundTime_ = value; + } else { + refundTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + public Builder setRefundTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (refundTimeBuilder_ == null) { + refundTime_ = builderForValue.build(); + } else { + refundTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + public Builder mergeRefundTime(com.google.protobuf.Timestamp value) { + if (refundTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + refundTime_ != null && + refundTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRefundTimeBuilder().mergeFrom(value); + } else { + refundTime_ = value; + } + } else { + refundTimeBuilder_.mergeFrom(value); + } + if (refundTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + public Builder clearRefundTime() { + bitField0_ = (bitField0_ & ~0x00000080); + refundTime_ = null; + if (refundTimeBuilder_ != null) { + refundTimeBuilder_.dispose(); + refundTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + public com.google.protobuf.Timestamp.Builder getRefundTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getRefundTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getRefundTimeOrBuilder() { + if (refundTimeBuilder_ != null) { + return refundTimeBuilder_.getMessageOrBuilder(); + } else { + return refundTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } + } + /** + *
+     * Timestamp when the purchase was refunded. Set to UNIX
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getRefundTimeFieldBuilder() { + if (refundTimeBuilder_ == null) { + refundTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getRefundTime(), + getParentForChildren(), + isClean()); + refundTime_ = null; + } + return refundTimeBuilder_; + } + + private java.lang.Object providerResponse_ = ""; + /** + *
+     * Raw provider validation response.
+     * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @return The providerResponse. + */ + public java.lang.String getProviderResponse() { + java.lang.Object ref = providerResponse_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerResponse_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Raw provider validation response.
+     * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @return The bytes for providerResponse. + */ + public com.google.protobuf.ByteString + getProviderResponseBytes() { + java.lang.Object ref = providerResponse_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerResponse_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Raw provider validation response.
+     * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @param value The providerResponse to set. + * @return This builder for chaining. + */ + public Builder setProviderResponse( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + providerResponse_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Raw provider validation response.
+     * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @return This builder for chaining. + */ + public Builder clearProviderResponse() { + providerResponse_ = getDefaultInstance().getProviderResponse(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * Raw provider validation response.
+     * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @param value The bytes for providerResponse to set. + * @return This builder for chaining. + */ + public Builder setProviderResponseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + providerResponse_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int environment_ = 0; + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @return The enum numeric value on the wire for environment. + */ + @java.lang.Override public int getEnvironmentValue() { + return environment_; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @param value The enum numeric value on the wire for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentValue(int value) { + environment_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @return The environment. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StoreEnvironment getEnvironment() { + com.heroiclabs.nakama.api.StoreEnvironment result = com.heroiclabs.nakama.api.StoreEnvironment.forNumber(environment_); + return result == null ? com.heroiclabs.nakama.api.StoreEnvironment.UNRECOGNIZED : result; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(com.heroiclabs.nakama.api.StoreEnvironment value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + environment_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000200); + environment_ = 0; + onChanged(); + return this; + } + + private boolean seenBefore_ ; + /** + *
+     * Whether the purchase had already been validated by Nakama before.
+     * 
+ * + * bool seen_before = 11 [json_name = "seenBefore"]; + * @return The seenBefore. + */ + @java.lang.Override + public boolean getSeenBefore() { + return seenBefore_; + } + /** + *
+     * Whether the purchase had already been validated by Nakama before.
+     * 
+ * + * bool seen_before = 11 [json_name = "seenBefore"]; + * @param value The seenBefore to set. + * @return This builder for chaining. + */ + public Builder setSeenBefore(boolean value) { + + seenBefore_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Whether the purchase had already been validated by Nakama before.
+     * 
+ * + * bool seen_before = 11 [json_name = "seenBefore"]; + * @return This builder for chaining. + */ + public Builder clearSeenBefore() { + bitField0_ = (bitField0_ & ~0x00000400); + seenBefore_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidatedPurchase) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidatedPurchase) + private static final com.heroiclabs.nakama.api.ValidatedPurchase DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidatedPurchase(); + } + + public static com.heroiclabs.nakama.api.ValidatedPurchase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatedPurchase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedPurchase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatedPurchaseOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidatedPurchaseOrBuilder.java new file mode 100644 index 00000000..cc092b94 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatedPurchaseOrBuilder.java @@ -0,0 +1,247 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidatedPurchaseOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidatedPurchase) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Purchase User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * Purchase User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The productId. + */ + java.lang.String getProductId(); + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The bytes for productId. + */ + com.google.protobuf.ByteString + getProductIdBytes(); + + /** + *
+   * Purchase Transaction ID.
+   * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @return The transactionId. + */ + java.lang.String getTransactionId(); + /** + *
+   * Purchase Transaction ID.
+   * 
+ * + * string transaction_id = 3 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The enum numeric value on the wire for store. + */ + int getStoreValue(); + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The store. + */ + com.heroiclabs.nakama.api.StoreProvider getStore(); + + /** + *
+   * Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return Whether the purchaseTime field is set. + */ + boolean hasPurchaseTime(); + /** + *
+   * Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return The purchaseTime. + */ + com.google.protobuf.Timestamp getPurchaseTime(); + /** + *
+   * Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + com.google.protobuf.TimestampOrBuilder getPurchaseTimeOrBuilder(); + + /** + *
+   * Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Timestamp when the purchase was refunded. Set to UNIX
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + * @return Whether the refundTime field is set. + */ + boolean hasRefundTime(); + /** + *
+   * Timestamp when the purchase was refunded. Set to UNIX
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + * @return The refundTime. + */ + com.google.protobuf.Timestamp getRefundTime(); + /** + *
+   * Timestamp when the purchase was refunded. Set to UNIX
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 8 [json_name = "refundTime"]; + */ + com.google.protobuf.TimestampOrBuilder getRefundTimeOrBuilder(); + + /** + *
+   * Raw provider validation response.
+   * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @return The providerResponse. + */ + java.lang.String getProviderResponse(); + /** + *
+   * Raw provider validation response.
+   * 
+ * + * string provider_response = 9 [json_name = "providerResponse"]; + * @return The bytes for providerResponse. + */ + com.google.protobuf.ByteString + getProviderResponseBytes(); + + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @return The enum numeric value on the wire for environment. + */ + int getEnvironmentValue(); + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 10 [json_name = "environment"]; + * @return The environment. + */ + com.heroiclabs.nakama.api.StoreEnvironment getEnvironment(); + + /** + *
+   * Whether the purchase had already been validated by Nakama before.
+   * 
+ * + * bool seen_before = 11 [json_name = "seenBefore"]; + * @return The seenBefore. + */ + boolean getSeenBefore(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatedSubscription.java b/src/main/java/com/heroiclabs/nakama/api/ValidatedSubscription.java new file mode 100644 index 00000000..358d4a7f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatedSubscription.java @@ -0,0 +1,2685 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + * Protobuf type {@code nakama.api.ValidatedSubscription} + */ +public final class ValidatedSubscription extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.ValidatedSubscription) + ValidatedSubscriptionOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ValidatedSubscription.class.getName()); + } + // Use ValidatedSubscription.newBuilder() to construct. + private ValidatedSubscription(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ValidatedSubscription() { + userId_ = ""; + productId_ = ""; + originalTransactionId_ = ""; + store_ = 0; + environment_ = 0; + providerResponse_ = ""; + providerNotification_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedSubscription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedSubscription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatedSubscription.class, com.heroiclabs.nakama.api.ValidatedSubscription.Builder.class); + } + + private int bitField0_; + public static final int USER_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * Subscription User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * Subscription User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object productId_ = ""; + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The productId. + */ + @java.lang.Override + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } + } + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The bytes for productId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORIGINAL_TRANSACTION_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object originalTransactionId_ = ""; + /** + *
+   * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+   * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @return The originalTransactionId. + */ + @java.lang.Override + public java.lang.String getOriginalTransactionId() { + java.lang.Object ref = originalTransactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalTransactionId_ = s; + return s; + } + } + /** + *
+   * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+   * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @return The bytes for originalTransactionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOriginalTransactionIdBytes() { + java.lang.Object ref = originalTransactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + originalTransactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STORE_FIELD_NUMBER = 4; + private int store_ = 0; + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The enum numeric value on the wire for store. + */ + @java.lang.Override public int getStoreValue() { + return store_; + } + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The store. + */ + @java.lang.Override public com.heroiclabs.nakama.api.StoreProvider getStore() { + com.heroiclabs.nakama.api.StoreProvider result = com.heroiclabs.nakama.api.StoreProvider.forNumber(store_); + return result == null ? com.heroiclabs.nakama.api.StoreProvider.UNRECOGNIZED : result; + } + + public static final int PURCHASE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp purchaseTime_; + /** + *
+   * UNIX Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return Whether the purchaseTime field is set. + */ + @java.lang.Override + public boolean hasPurchaseTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * UNIX Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return The purchaseTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPurchaseTime() { + return purchaseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } + /** + *
+   * UNIX Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPurchaseTimeOrBuilder() { + return purchaseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * UNIX Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * UNIX Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * UNIX Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * UNIX Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * UNIX Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * UNIX Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 8; + private int environment_ = 0; + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @return The enum numeric value on the wire for environment. + */ + @java.lang.Override public int getEnvironmentValue() { + return environment_; + } + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @return The environment. + */ + @java.lang.Override public com.heroiclabs.nakama.api.StoreEnvironment getEnvironment() { + com.heroiclabs.nakama.api.StoreEnvironment result = com.heroiclabs.nakama.api.StoreEnvironment.forNumber(environment_); + return result == null ? com.heroiclabs.nakama.api.StoreEnvironment.UNRECOGNIZED : result; + } + + public static final int EXPIRY_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp expiryTime_; + /** + *
+   * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + * @return Whether the expiryTime field is set. + */ + @java.lang.Override + public boolean hasExpiryTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + * @return The expiryTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpiryTime() { + return expiryTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } + /** + *
+   * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpiryTimeOrBuilder() { + return expiryTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } + + public static final int REFUND_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp refundTime_; + /** + *
+   * Subscription refund time. If this time is set, the subscription was refunded.
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + * @return Whether the refundTime field is set. + */ + @java.lang.Override + public boolean hasRefundTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+   * Subscription refund time. If this time is set, the subscription was refunded.
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + * @return The refundTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRefundTime() { + return refundTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } + /** + *
+   * Subscription refund time. If this time is set, the subscription was refunded.
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRefundTimeOrBuilder() { + return refundTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } + + public static final int PROVIDER_RESPONSE_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object providerResponse_ = ""; + /** + *
+   * Raw provider validation response body.
+   * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @return The providerResponse. + */ + @java.lang.Override + public java.lang.String getProviderResponse() { + java.lang.Object ref = providerResponse_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerResponse_ = s; + return s; + } + } + /** + *
+   * Raw provider validation response body.
+   * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @return The bytes for providerResponse. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProviderResponseBytes() { + java.lang.Object ref = providerResponse_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerResponse_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVIDER_NOTIFICATION_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object providerNotification_ = ""; + /** + *
+   * Raw provider notification body.
+   * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @return The providerNotification. + */ + @java.lang.Override + public java.lang.String getProviderNotification() { + java.lang.Object ref = providerNotification_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerNotification_ = s; + return s; + } + } + /** + *
+   * Raw provider notification body.
+   * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @return The bytes for providerNotification. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProviderNotificationBytes() { + java.lang.Object ref = providerNotification_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerNotification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_FIELD_NUMBER = 13; + private boolean active_ = false; + /** + *
+   * Whether the subscription is currently active or not.
+   * 
+ * + * bool active = 13 [json_name = "active"]; + * @return The active. + */ + @java.lang.Override + public boolean getActive() { + return active_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, productId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(originalTransactionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, originalTransactionId_); + } + if (store_ != com.heroiclabs.nakama.api.StoreProvider.APPLE_APP_STORE.getNumber()) { + output.writeEnum(4, store_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getPurchaseTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (environment_ != com.heroiclabs.nakama.api.StoreEnvironment.UNKNOWN.getNumber()) { + output.writeEnum(8, environment_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getExpiryTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(10, getRefundTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerResponse_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, providerResponse_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerNotification_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, providerNotification_); + } + if (active_ != false) { + output.writeBool(13, active_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, productId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(originalTransactionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, originalTransactionId_); + } + if (store_ != com.heroiclabs.nakama.api.StoreProvider.APPLE_APP_STORE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, store_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getPurchaseTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getUpdateTime()); + } + if (environment_ != com.heroiclabs.nakama.api.StoreEnvironment.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, environment_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getExpiryTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getRefundTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerResponse_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, providerResponse_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerNotification_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, providerNotification_); + } + if (active_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(13, active_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.ValidatedSubscription)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.ValidatedSubscription other = (com.heroiclabs.nakama.api.ValidatedSubscription) obj; + + if (!getUserId() + .equals(other.getUserId())) return false; + if (!getProductId() + .equals(other.getProductId())) return false; + if (!getOriginalTransactionId() + .equals(other.getOriginalTransactionId())) return false; + if (store_ != other.store_) return false; + if (hasPurchaseTime() != other.hasPurchaseTime()) return false; + if (hasPurchaseTime()) { + if (!getPurchaseTime() + .equals(other.getPurchaseTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (environment_ != other.environment_) return false; + if (hasExpiryTime() != other.hasExpiryTime()) return false; + if (hasExpiryTime()) { + if (!getExpiryTime() + .equals(other.getExpiryTime())) return false; + } + if (hasRefundTime() != other.hasRefundTime()) return false; + if (hasRefundTime()) { + if (!getRefundTime() + .equals(other.getRefundTime())) return false; + } + if (!getProviderResponse() + .equals(other.getProviderResponse())) return false; + if (!getProviderNotification() + .equals(other.getProviderNotification())) return false; + if (getActive() + != other.getActive()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductId().hashCode(); + hash = (37 * hash) + ORIGINAL_TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getOriginalTransactionId().hashCode(); + hash = (37 * hash) + STORE_FIELD_NUMBER; + hash = (53 * hash) + store_; + if (hasPurchaseTime()) { + hash = (37 * hash) + PURCHASE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPurchaseTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + environment_; + if (hasExpiryTime()) { + hash = (37 * hash) + EXPIRY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpiryTime().hashCode(); + } + if (hasRefundTime()) { + hash = (37 * hash) + REFUND_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRefundTime().hashCode(); + } + hash = (37 * hash) + PROVIDER_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getProviderResponse().hashCode(); + hash = (37 * hash) + PROVIDER_NOTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getProviderNotification().hashCode(); + hash = (37 * hash) + ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getActive()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.ValidatedSubscription parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.ValidatedSubscription parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.ValidatedSubscription parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.ValidatedSubscription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code nakama.api.ValidatedSubscription} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.ValidatedSubscription) + com.heroiclabs.nakama.api.ValidatedSubscriptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedSubscription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedSubscription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.ValidatedSubscription.class, com.heroiclabs.nakama.api.ValidatedSubscription.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.ValidatedSubscription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPurchaseTimeFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getExpiryTimeFieldBuilder(); + getRefundTimeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = ""; + productId_ = ""; + originalTransactionId_ = ""; + store_ = 0; + purchaseTime_ = null; + if (purchaseTimeBuilder_ != null) { + purchaseTimeBuilder_.dispose(); + purchaseTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + environment_ = 0; + expiryTime_ = null; + if (expiryTimeBuilder_ != null) { + expiryTimeBuilder_.dispose(); + expiryTimeBuilder_ = null; + } + refundTime_ = null; + if (refundTimeBuilder_ != null) { + refundTimeBuilder_.dispose(); + refundTimeBuilder_ = null; + } + providerResponse_ = ""; + providerNotification_ = ""; + active_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_ValidatedSubscription_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscription getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscription build() { + com.heroiclabs.nakama.api.ValidatedSubscription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscription buildPartial() { + com.heroiclabs.nakama.api.ValidatedSubscription result = new com.heroiclabs.nakama.api.ValidatedSubscription(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.ValidatedSubscription result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.productId_ = productId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.originalTransactionId_ = originalTransactionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.store_ = store_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.purchaseTime_ = purchaseTimeBuilder_ == null + ? purchaseTime_ + : purchaseTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.expiryTime_ = expiryTimeBuilder_ == null + ? expiryTime_ + : expiryTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.refundTime_ = refundTimeBuilder_ == null + ? refundTime_ + : refundTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.providerResponse_ = providerResponse_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.providerNotification_ = providerNotification_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.active_ = active_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.ValidatedSubscription) { + return mergeFrom((com.heroiclabs.nakama.api.ValidatedSubscription)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.ValidatedSubscription other) { + if (other == com.heroiclabs.nakama.api.ValidatedSubscription.getDefaultInstance()) return this; + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProductId().isEmpty()) { + productId_ = other.productId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOriginalTransactionId().isEmpty()) { + originalTransactionId_ = other.originalTransactionId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.store_ != 0) { + setStoreValue(other.getStoreValue()); + } + if (other.hasPurchaseTime()) { + mergePurchaseTime(other.getPurchaseTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.environment_ != 0) { + setEnvironmentValue(other.getEnvironmentValue()); + } + if (other.hasExpiryTime()) { + mergeExpiryTime(other.getExpiryTime()); + } + if (other.hasRefundTime()) { + mergeRefundTime(other.getRefundTime()); + } + if (!other.getProviderResponse().isEmpty()) { + providerResponse_ = other.providerResponse_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getProviderNotification().isEmpty()) { + providerNotification_ = other.providerNotification_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.getActive() != false) { + setActive(other.getActive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + productId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + originalTransactionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + store_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getPurchaseTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + environment_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: { + input.readMessage( + getExpiryTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getRefundTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + providerResponse_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + providerNotification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 104: { + active_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object userId_ = ""; + /** + *
+     * Subscription User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Subscription User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Subscription User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Subscription User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Subscription User ID.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object productId_ = ""; + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The productId. + */ + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The bytes for productId. + */ + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @param value The productId to set. + * @return This builder for chaining. + */ + public Builder setProductId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + productId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return This builder for chaining. + */ + public Builder clearProductId() { + productId_ = getDefaultInstance().getProductId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Purchase Product ID.
+     * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @param value The bytes for productId to set. + * @return This builder for chaining. + */ + public Builder setProductIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + productId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object originalTransactionId_ = ""; + /** + *
+     * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+     * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @return The originalTransactionId. + */ + public java.lang.String getOriginalTransactionId() { + java.lang.Object ref = originalTransactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalTransactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+     * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @return The bytes for originalTransactionId. + */ + public com.google.protobuf.ByteString + getOriginalTransactionIdBytes() { + java.lang.Object ref = originalTransactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + originalTransactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+     * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @param value The originalTransactionId to set. + * @return This builder for chaining. + */ + public Builder setOriginalTransactionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + originalTransactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+     * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @return This builder for chaining. + */ + public Builder clearOriginalTransactionId() { + originalTransactionId_ = getDefaultInstance().getOriginalTransactionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+     * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @param value The bytes for originalTransactionId to set. + * @return This builder for chaining. + */ + public Builder setOriginalTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + originalTransactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int store_ = 0; + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The enum numeric value on the wire for store. + */ + @java.lang.Override public int getStoreValue() { + return store_; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @param value The enum numeric value on the wire for store to set. + * @return This builder for chaining. + */ + public Builder setStoreValue(int value) { + store_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The store. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StoreProvider getStore() { + com.heroiclabs.nakama.api.StoreProvider result = com.heroiclabs.nakama.api.StoreProvider.forNumber(store_); + return result == null ? com.heroiclabs.nakama.api.StoreProvider.UNRECOGNIZED : result; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @param value The store to set. + * @return This builder for chaining. + */ + public Builder setStore(com.heroiclabs.nakama.api.StoreProvider value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + store_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Store identifier
+     * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return This builder for chaining. + */ + public Builder clearStore() { + bitField0_ = (bitField0_ & ~0x00000008); + store_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp purchaseTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> purchaseTimeBuilder_; + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return Whether the purchaseTime field is set. + */ + public boolean hasPurchaseTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return The purchaseTime. + */ + public com.google.protobuf.Timestamp getPurchaseTime() { + if (purchaseTimeBuilder_ == null) { + return purchaseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } else { + return purchaseTimeBuilder_.getMessage(); + } + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder setPurchaseTime(com.google.protobuf.Timestamp value) { + if (purchaseTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purchaseTime_ = value; + } else { + purchaseTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder setPurchaseTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (purchaseTimeBuilder_ == null) { + purchaseTime_ = builderForValue.build(); + } else { + purchaseTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder mergePurchaseTime(com.google.protobuf.Timestamp value) { + if (purchaseTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + purchaseTime_ != null && + purchaseTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPurchaseTimeBuilder().mergeFrom(value); + } else { + purchaseTime_ = value; + } + } else { + purchaseTimeBuilder_.mergeFrom(value); + } + if (purchaseTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public Builder clearPurchaseTime() { + bitField0_ = (bitField0_ & ~0x00000010); + purchaseTime_ = null; + if (purchaseTimeBuilder_ != null) { + purchaseTimeBuilder_.dispose(); + purchaseTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public com.google.protobuf.Timestamp.Builder getPurchaseTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPurchaseTimeFieldBuilder().getBuilder(); + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getPurchaseTimeOrBuilder() { + if (purchaseTimeBuilder_ != null) { + return purchaseTimeBuilder_.getMessageOrBuilder(); + } else { + return purchaseTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : purchaseTime_; + } + } + /** + *
+     * UNIX Timestamp when the purchase was done.
+     * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getPurchaseTimeFieldBuilder() { + if (purchaseTimeBuilder_ == null) { + purchaseTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getPurchaseTime(), + getParentForChildren(), + isClean()); + purchaseTime_ = null; + } + return purchaseTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * UNIX Timestamp when the receipt validation was stored in DB.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * UNIX Timestamp when the receipt validation was updated in DB.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int environment_ = 0; + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @return The enum numeric value on the wire for environment. + */ + @java.lang.Override public int getEnvironmentValue() { + return environment_; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @param value The enum numeric value on the wire for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentValue(int value) { + environment_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @return The environment. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.StoreEnvironment getEnvironment() { + com.heroiclabs.nakama.api.StoreEnvironment result = com.heroiclabs.nakama.api.StoreEnvironment.forNumber(environment_); + return result == null ? com.heroiclabs.nakama.api.StoreEnvironment.UNRECOGNIZED : result; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(com.heroiclabs.nakama.api.StoreEnvironment value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + environment_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Whether the purchase was done in production or sandbox environment.
+     * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + bitField0_ = (bitField0_ & ~0x00000080); + environment_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expiryTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expiryTimeBuilder_; + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + * @return Whether the expiryTime field is set. + */ + public boolean hasExpiryTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + * @return The expiryTime. + */ + public com.google.protobuf.Timestamp getExpiryTime() { + if (expiryTimeBuilder_ == null) { + return expiryTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } else { + return expiryTimeBuilder_.getMessage(); + } + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + public Builder setExpiryTime(com.google.protobuf.Timestamp value) { + if (expiryTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expiryTime_ = value; + } else { + expiryTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + public Builder setExpiryTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (expiryTimeBuilder_ == null) { + expiryTime_ = builderForValue.build(); + } else { + expiryTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + public Builder mergeExpiryTime(com.google.protobuf.Timestamp value) { + if (expiryTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + expiryTime_ != null && + expiryTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpiryTimeBuilder().mergeFrom(value); + } else { + expiryTime_ = value; + } + } else { + expiryTimeBuilder_.mergeFrom(value); + } + if (expiryTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + public Builder clearExpiryTime() { + bitField0_ = (bitField0_ & ~0x00000100); + expiryTime_ = null; + if (expiryTimeBuilder_ != null) { + expiryTimeBuilder_.dispose(); + expiryTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + public com.google.protobuf.Timestamp.Builder getExpiryTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getExpiryTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getExpiryTimeOrBuilder() { + if (expiryTimeBuilder_ != null) { + return expiryTimeBuilder_.getMessageOrBuilder(); + } else { + return expiryTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : expiryTime_; + } + } + /** + *
+     * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+     * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getExpiryTimeFieldBuilder() { + if (expiryTimeBuilder_ == null) { + expiryTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getExpiryTime(), + getParentForChildren(), + isClean()); + expiryTime_ = null; + } + return expiryTimeBuilder_; + } + + private com.google.protobuf.Timestamp refundTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> refundTimeBuilder_; + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + * @return Whether the refundTime field is set. + */ + public boolean hasRefundTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + * @return The refundTime. + */ + public com.google.protobuf.Timestamp getRefundTime() { + if (refundTimeBuilder_ == null) { + return refundTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } else { + return refundTimeBuilder_.getMessage(); + } + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + public Builder setRefundTime(com.google.protobuf.Timestamp value) { + if (refundTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + refundTime_ = value; + } else { + refundTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + public Builder setRefundTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (refundTimeBuilder_ == null) { + refundTime_ = builderForValue.build(); + } else { + refundTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + public Builder mergeRefundTime(com.google.protobuf.Timestamp value) { + if (refundTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + refundTime_ != null && + refundTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRefundTimeBuilder().mergeFrom(value); + } else { + refundTime_ = value; + } + } else { + refundTimeBuilder_.mergeFrom(value); + } + if (refundTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + public Builder clearRefundTime() { + bitField0_ = (bitField0_ & ~0x00000200); + refundTime_ = null; + if (refundTimeBuilder_ != null) { + refundTimeBuilder_.dispose(); + refundTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + public com.google.protobuf.Timestamp.Builder getRefundTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getRefundTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getRefundTimeOrBuilder() { + if (refundTimeBuilder_ != null) { + return refundTimeBuilder_.getMessageOrBuilder(); + } else { + return refundTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : refundTime_; + } + } + /** + *
+     * Subscription refund time. If this time is set, the subscription was refunded.
+     * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getRefundTimeFieldBuilder() { + if (refundTimeBuilder_ == null) { + refundTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getRefundTime(), + getParentForChildren(), + isClean()); + refundTime_ = null; + } + return refundTimeBuilder_; + } + + private java.lang.Object providerResponse_ = ""; + /** + *
+     * Raw provider validation response body.
+     * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @return The providerResponse. + */ + public java.lang.String getProviderResponse() { + java.lang.Object ref = providerResponse_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerResponse_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Raw provider validation response body.
+     * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @return The bytes for providerResponse. + */ + public com.google.protobuf.ByteString + getProviderResponseBytes() { + java.lang.Object ref = providerResponse_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerResponse_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Raw provider validation response body.
+     * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @param value The providerResponse to set. + * @return This builder for chaining. + */ + public Builder setProviderResponse( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + providerResponse_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * Raw provider validation response body.
+     * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @return This builder for chaining. + */ + public Builder clearProviderResponse() { + providerResponse_ = getDefaultInstance().getProviderResponse(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * Raw provider validation response body.
+     * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @param value The bytes for providerResponse to set. + * @return This builder for chaining. + */ + public Builder setProviderResponseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + providerResponse_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object providerNotification_ = ""; + /** + *
+     * Raw provider notification body.
+     * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @return The providerNotification. + */ + public java.lang.String getProviderNotification() { + java.lang.Object ref = providerNotification_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerNotification_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Raw provider notification body.
+     * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @return The bytes for providerNotification. + */ + public com.google.protobuf.ByteString + getProviderNotificationBytes() { + java.lang.Object ref = providerNotification_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + providerNotification_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Raw provider notification body.
+     * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @param value The providerNotification to set. + * @return This builder for chaining. + */ + public Builder setProviderNotification( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + providerNotification_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+     * Raw provider notification body.
+     * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @return This builder for chaining. + */ + public Builder clearProviderNotification() { + providerNotification_ = getDefaultInstance().getProviderNotification(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + *
+     * Raw provider notification body.
+     * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @param value The bytes for providerNotification to set. + * @return This builder for chaining. + */ + public Builder setProviderNotificationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + providerNotification_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private boolean active_ ; + /** + *
+     * Whether the subscription is currently active or not.
+     * 
+ * + * bool active = 13 [json_name = "active"]; + * @return The active. + */ + @java.lang.Override + public boolean getActive() { + return active_; + } + /** + *
+     * Whether the subscription is currently active or not.
+     * 
+ * + * bool active = 13 [json_name = "active"]; + * @param value The active to set. + * @return This builder for chaining. + */ + public Builder setActive(boolean value) { + + active_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+     * Whether the subscription is currently active or not.
+     * 
+ * + * bool active = 13 [json_name = "active"]; + * @return This builder for chaining. + */ + public Builder clearActive() { + bitField0_ = (bitField0_ & ~0x00001000); + active_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.ValidatedSubscription) + } + + // @@protoc_insertion_point(class_scope:nakama.api.ValidatedSubscription) + private static final com.heroiclabs.nakama.api.ValidatedSubscription DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.ValidatedSubscription(); + } + + public static com.heroiclabs.nakama.api.ValidatedSubscription getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatedSubscription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.ValidatedSubscription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/ValidatedSubscriptionOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/ValidatedSubscriptionOrBuilder.java new file mode 100644 index 00000000..24b71a06 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/ValidatedSubscriptionOrBuilder.java @@ -0,0 +1,294 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface ValidatedSubscriptionOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.ValidatedSubscription) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Subscription User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * Subscription User ID.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The productId. + */ + java.lang.String getProductId(); + /** + *
+   * Purchase Product ID.
+   * 
+ * + * string product_id = 2 [json_name = "productId"]; + * @return The bytes for productId. + */ + com.google.protobuf.ByteString + getProductIdBytes(); + + /** + *
+   * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+   * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @return The originalTransactionId. + */ + java.lang.String getOriginalTransactionId(); + /** + *
+   * Purchase Original transaction ID (we only keep track of the original subscription, not subsequent renewals).
+   * 
+ * + * string original_transaction_id = 3 [json_name = "originalTransactionId"]; + * @return The bytes for originalTransactionId. + */ + com.google.protobuf.ByteString + getOriginalTransactionIdBytes(); + + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The enum numeric value on the wire for store. + */ + int getStoreValue(); + /** + *
+   * Store identifier
+   * 
+ * + * .nakama.api.StoreProvider store = 4 [json_name = "store"]; + * @return The store. + */ + com.heroiclabs.nakama.api.StoreProvider getStore(); + + /** + *
+   * UNIX Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return Whether the purchaseTime field is set. + */ + boolean hasPurchaseTime(); + /** + *
+   * UNIX Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + * @return The purchaseTime. + */ + com.google.protobuf.Timestamp getPurchaseTime(); + /** + *
+   * UNIX Timestamp when the purchase was done.
+   * 
+ * + * .google.protobuf.Timestamp purchase_time = 5 [json_name = "purchaseTime"]; + */ + com.google.protobuf.TimestampOrBuilder getPurchaseTimeOrBuilder(); + + /** + *
+   * UNIX Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * UNIX Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * UNIX Timestamp when the receipt validation was stored in DB.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * UNIX Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * UNIX Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * UNIX Timestamp when the receipt validation was updated in DB.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @return The enum numeric value on the wire for environment. + */ + int getEnvironmentValue(); + /** + *
+   * Whether the purchase was done in production or sandbox environment.
+   * 
+ * + * .nakama.api.StoreEnvironment environment = 8 [json_name = "environment"]; + * @return The environment. + */ + com.heroiclabs.nakama.api.StoreEnvironment getEnvironment(); + + /** + *
+   * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + * @return Whether the expiryTime field is set. + */ + boolean hasExpiryTime(); + /** + *
+   * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + * @return The expiryTime. + */ + com.google.protobuf.Timestamp getExpiryTime(); + /** + *
+   * Subscription expiration time. The subscription can still be auto-renewed to extend the expiration time further.
+   * 
+ * + * .google.protobuf.Timestamp expiry_time = 9 [json_name = "expiryTime"]; + */ + com.google.protobuf.TimestampOrBuilder getExpiryTimeOrBuilder(); + + /** + *
+   * Subscription refund time. If this time is set, the subscription was refunded.
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + * @return Whether the refundTime field is set. + */ + boolean hasRefundTime(); + /** + *
+   * Subscription refund time. If this time is set, the subscription was refunded.
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + * @return The refundTime. + */ + com.google.protobuf.Timestamp getRefundTime(); + /** + *
+   * Subscription refund time. If this time is set, the subscription was refunded.
+   * 
+ * + * .google.protobuf.Timestamp refund_time = 10 [json_name = "refundTime"]; + */ + com.google.protobuf.TimestampOrBuilder getRefundTimeOrBuilder(); + + /** + *
+   * Raw provider validation response body.
+   * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @return The providerResponse. + */ + java.lang.String getProviderResponse(); + /** + *
+   * Raw provider validation response body.
+   * 
+ * + * string provider_response = 11 [json_name = "providerResponse"]; + * @return The bytes for providerResponse. + */ + com.google.protobuf.ByteString + getProviderResponseBytes(); + + /** + *
+   * Raw provider notification body.
+   * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @return The providerNotification. + */ + java.lang.String getProviderNotification(); + /** + *
+   * Raw provider notification body.
+   * 
+ * + * string provider_notification = 12 [json_name = "providerNotification"]; + * @return The bytes for providerNotification. + */ + com.google.protobuf.ByteString + getProviderNotificationBytes(); + + /** + *
+   * Whether the subscription is currently active or not.
+   * 
+ * + * bool active = 13 [json_name = "active"]; + * @return The active. + */ + boolean getActive(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequest.java b/src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequest.java new file mode 100644 index 00000000..b429299b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequest.java @@ -0,0 +1,1659 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A request to submit a score to a leaderboard.
+ * 
+ * + * Protobuf type {@code nakama.api.WriteLeaderboardRecordRequest} + */ +public final class WriteLeaderboardRecordRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.WriteLeaderboardRecordRequest) + WriteLeaderboardRecordRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + WriteLeaderboardRecordRequest.class.getName()); + } + // Use WriteLeaderboardRecordRequest.newBuilder() to construct. + private WriteLeaderboardRecordRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WriteLeaderboardRecordRequest() { + leaderboardId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.class, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.Builder.class); + } + + public interface LeaderboardRecordWriteOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The score value to submit.
+     * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return The score. + */ + long getScore(); + + /** + *
+     * An optional secondary value.
+     * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return The subscore. + */ + long getSubscore(); + + /** + *
+     * Optional record metadata.
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The metadata. + */ + java.lang.String getMetadata(); + /** + *
+     * Optional record metadata.
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + com.google.protobuf.ByteString + getMetadataBytes(); + + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + int getOperatorValue(); + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The operator. + */ + com.heroiclabs.nakama.api.Operator getOperator(); + } + /** + *
+   * Record values to write.
+   * 
+ * + * Protobuf type {@code nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite} + */ + public static final class LeaderboardRecordWrite extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite) + LeaderboardRecordWriteOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LeaderboardRecordWrite.class.getName()); + } + // Use LeaderboardRecordWrite.newBuilder() to construct. + private LeaderboardRecordWrite(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LeaderboardRecordWrite() { + metadata_ = ""; + operator_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.class, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.Builder.class); + } + + public static final int SCORE_FIELD_NUMBER = 1; + private long score_ = 0L; + /** + *
+     * The score value to submit.
+     * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + + public static final int SUBSCORE_FIELD_NUMBER = 2; + private long subscore_ = 0L; + /** + *
+     * An optional secondary value.
+     * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return The subscore. + */ + @java.lang.Override + public long getSubscore() { + return subscore_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object metadata_ = ""; + /** + *
+     * Optional record metadata.
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } + } + /** + *
+     * Optional record metadata.
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATOR_FIELD_NUMBER = 4; + private int operator_ = 0; + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (score_ != 0L) { + output.writeInt64(1, score_); + } + if (subscore_ != 0L) { + output.writeInt64(2, subscore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, metadata_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + output.writeEnum(4, operator_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (score_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, score_); + } + if (subscore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, subscore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, metadata_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, operator_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite other = (com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite) obj; + + if (getScore() + != other.getScore()) return false; + if (getSubscore() + != other.getSubscore()) return false; + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (operator_ != other.operator_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScore()); + hash = (37 * hash) + SUBSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSubscore()); + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + operator_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Record values to write.
+     * 
+ * + * Protobuf type {@code nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite) + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWriteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.class, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + score_ = 0L; + subscore_ = 0L; + metadata_ = ""; + operator_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_LeaderboardRecordWrite_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite build() { + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite buildPartial() { + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite result = new com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subscore_ = subscore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadata_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.operator_ = operator_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite) { + return mergeFrom((com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite other) { + if (other == com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.getDefaultInstance()) return this; + if (other.getScore() != 0L) { + setScore(other.getScore()); + } + if (other.getSubscore() != 0L) { + setSubscore(other.getSubscore()); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.operator_ != 0) { + setOperatorValue(other.getOperatorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + score_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + subscore_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + operator_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long score_ ; + /** + *
+       * The score value to submit.
+       * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + /** + *
+       * The score value to submit.
+       * 
+ * + * int64 score = 1 [json_name = "score"]; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(long value) { + + score_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The score value to submit.
+       * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000001); + score_ = 0L; + onChanged(); + return this; + } + + private long subscore_ ; + /** + *
+       * An optional secondary value.
+       * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return The subscore. + */ + @java.lang.Override + public long getSubscore() { + return subscore_; + } + /** + *
+       * An optional secondary value.
+       * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @param value The subscore to set. + * @return This builder for chaining. + */ + public Builder setSubscore(long value) { + + subscore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * An optional secondary value.
+       * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return This builder for chaining. + */ + public Builder clearSubscore() { + bitField0_ = (bitField0_ & ~0x00000002); + subscore_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object metadata_ = ""; + /** + *
+       * Optional record metadata.
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The metadata. + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Optional record metadata.
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Optional record metadata.
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @param value The metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadata_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Optional record metadata.
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return This builder for chaining. + */ + public Builder clearMetadata() { + metadata_ = getDefaultInstance().getMetadata(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * Optional record metadata.
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @param value The bytes for metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadata_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int operator_ = 0; + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @param value The enum numeric value on the wire for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorValue(int value) { + operator_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(com.heroiclabs.nakama.api.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + operator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return This builder for chaining. + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000008); + operator_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite) + } + + // @@protoc_insertion_point(class_scope:nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite) + private static final com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite(); + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LeaderboardRecordWrite parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int LEADERBOARD_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object leaderboardId_ = ""; + /** + *
+   * The ID of the leaderboard to write to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + @java.lang.Override + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } + } + /** + *
+   * The ID of the leaderboard to write to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECORD_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record_; + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + * @return Whether the record field is set. + */ + @java.lang.Override + public boolean hasRecord() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + * @return The record. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite getRecord() { + return record_ == null ? com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.getDefaultInstance() : record_; + } + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWriteOrBuilder getRecordOrBuilder() { + return record_ == null ? com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.getDefaultInstance() : record_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, leaderboardId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRecord()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(leaderboardId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, leaderboardId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRecord()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest other = (com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest) obj; + + if (!getLeaderboardId() + .equals(other.getLeaderboardId())) return false; + if (hasRecord() != other.hasRecord()) return false; + if (hasRecord()) { + if (!getRecord() + .equals(other.getRecord())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEADERBOARD_ID_FIELD_NUMBER; + hash = (53 * hash) + getLeaderboardId().hashCode(); + if (hasRecord()) { + hash = (37 * hash) + RECORD_FIELD_NUMBER; + hash = (53 * hash) + getRecord().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A request to submit a score to a leaderboard.
+   * 
+ * + * Protobuf type {@code nakama.api.WriteLeaderboardRecordRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.WriteLeaderboardRecordRequest) + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.class, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getRecordFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + leaderboardId_ = ""; + record_ = null; + if (recordBuilder_ != null) { + recordBuilder_.dispose(); + recordBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteLeaderboardRecordRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest build() { + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest buildPartial() { + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest result = new com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.leaderboardId_ = leaderboardId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.record_ = recordBuilder_ == null + ? record_ + : recordBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest) { + return mergeFrom((com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest other) { + if (other == com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.getDefaultInstance()) return this; + if (!other.getLeaderboardId().isEmpty()) { + leaderboardId_ = other.leaderboardId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRecord()) { + mergeRecord(other.getRecord()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + leaderboardId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRecordFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object leaderboardId_ = ""; + /** + *
+     * The ID of the leaderboard to write to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + public java.lang.String getLeaderboardId() { + java.lang.Object ref = leaderboardId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaderboardId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the leaderboard to write to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + public com.google.protobuf.ByteString + getLeaderboardIdBytes() { + java.lang.Object ref = leaderboardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leaderboardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the leaderboard to write to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard to write to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return This builder for chaining. + */ + public Builder clearLeaderboardId() { + leaderboardId_ = getDefaultInstance().getLeaderboardId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the leaderboard to write to.
+     * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @param value The bytes for leaderboardId to set. + * @return This builder for chaining. + */ + public Builder setLeaderboardIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + leaderboardId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.Builder, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWriteOrBuilder> recordBuilder_; + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + * @return Whether the record field is set. + */ + public boolean hasRecord() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + * @return The record. + */ + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite getRecord() { + if (recordBuilder_ == null) { + return record_ == null ? com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.getDefaultInstance() : record_; + } else { + return recordBuilder_.getMessage(); + } + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + public Builder setRecord(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite value) { + if (recordBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + record_ = value; + } else { + recordBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + public Builder setRecord( + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.Builder builderForValue) { + if (recordBuilder_ == null) { + record_ = builderForValue.build(); + } else { + recordBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + public Builder mergeRecord(com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite value) { + if (recordBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + record_ != null && + record_ != com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.getDefaultInstance()) { + getRecordBuilder().mergeFrom(value); + } else { + record_ = value; + } + } else { + recordBuilder_.mergeFrom(value); + } + if (record_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + public Builder clearRecord() { + bitField0_ = (bitField0_ & ~0x00000002); + record_ = null; + if (recordBuilder_ != null) { + recordBuilder_.dispose(); + recordBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.Builder getRecordBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRecordFieldBuilder().getBuilder(); + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWriteOrBuilder getRecordOrBuilder() { + if (recordBuilder_ != null) { + return recordBuilder_.getMessageOrBuilder(); + } else { + return record_ == null ? + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.getDefaultInstance() : record_; + } + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.Builder, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWriteOrBuilder> + getRecordFieldBuilder() { + if (recordBuilder_ == null) { + recordBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite.Builder, com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWriteOrBuilder>( + getRecord(), + getParentForChildren(), + isClean()); + record_ = null; + } + return recordBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.WriteLeaderboardRecordRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.WriteLeaderboardRecordRequest) + private static final com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest(); + } + + public static com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteLeaderboardRecordRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequestOrBuilder.java new file mode 100644 index 00000000..e1169a92 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteLeaderboardRecordRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface WriteLeaderboardRecordRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.WriteLeaderboardRecordRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the leaderboard to write to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The leaderboardId. + */ + java.lang.String getLeaderboardId(); + /** + *
+   * The ID of the leaderboard to write to.
+   * 
+ * + * string leaderboard_id = 1 [json_name = "leaderboardId"]; + * @return The bytes for leaderboardId. + */ + com.google.protobuf.ByteString + getLeaderboardIdBytes(); + + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + * @return Whether the record field is set. + */ + boolean hasRecord(); + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + * @return The record. + */ + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite getRecord(); + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWrite record = 2 [json_name = "record"]; + */ + com.heroiclabs.nakama.api.WriteLeaderboardRecordRequest.LeaderboardRecordWriteOrBuilder getRecordOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteStorageObject.java b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObject.java new file mode 100644 index 00000000..fa873897 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObject.java @@ -0,0 +1,1503 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * The object to store.
+ * 
+ * + * Protobuf type {@code nakama.api.WriteStorageObject} + */ +public final class WriteStorageObject extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.WriteStorageObject) + WriteStorageObjectOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + WriteStorageObject.class.getName()); + } + // Use WriteStorageObject.newBuilder() to construct. + private WriteStorageObject(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WriteStorageObject() { + collection_ = ""; + key_ = ""; + value_ = ""; + version_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteStorageObject.class, com.heroiclabs.nakama.api.WriteStorageObject.Builder.class); + } + + private int bitField0_; + public static final int COLLECTION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + *
+   * The collection to store the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + *
+   * The collection to store the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + *
+   * The key for the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+   * The key for the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + *
+   * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+   * 
+ * + * string version = 4 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+   * 
+ * + * string version = 4 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_READ_FIELD_NUMBER = 5; + private com.google.protobuf.Int32Value permissionRead_; + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + * @return Whether the permissionRead field is set. + */ + @java.lang.Override + public boolean hasPermissionRead() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + * @return The permissionRead. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getPermissionRead() { + return permissionRead_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : permissionRead_; + } + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getPermissionReadOrBuilder() { + return permissionRead_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : permissionRead_; + } + + public static final int PERMISSION_WRITE_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value permissionWrite_; + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + * @return Whether the permissionWrite field is set. + */ + @java.lang.Override + public boolean hasPermissionWrite() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + * @return The permissionWrite. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getPermissionWrite() { + return permissionWrite_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : permissionWrite_; + } + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getPermissionWriteOrBuilder() { + return permissionWrite_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : permissionWrite_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, value_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, version_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getPermissionRead()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getPermissionWrite()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, collection_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, value_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, version_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getPermissionRead()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getPermissionWrite()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.WriteStorageObject)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.WriteStorageObject other = (com.heroiclabs.nakama.api.WriteStorageObject) obj; + + if (!getCollection() + .equals(other.getCollection())) return false; + if (!getKey() + .equals(other.getKey())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (hasPermissionRead() != other.hasPermissionRead()) return false; + if (hasPermissionRead()) { + if (!getPermissionRead() + .equals(other.getPermissionRead())) return false; + } + if (hasPermissionWrite() != other.hasPermissionWrite()) return false; + if (hasPermissionWrite()) { + if (!getPermissionWrite() + .equals(other.getPermissionWrite())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasPermissionRead()) { + hash = (37 * hash) + PERMISSION_READ_FIELD_NUMBER; + hash = (53 * hash) + getPermissionRead().hashCode(); + } + if (hasPermissionWrite()) { + hash = (37 * hash) + PERMISSION_WRITE_FIELD_NUMBER; + hash = (53 * hash) + getPermissionWrite().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.WriteStorageObject parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.WriteStorageObject parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteStorageObject parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.WriteStorageObject prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The object to store.
+   * 
+ * + * Protobuf type {@code nakama.api.WriteStorageObject} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.WriteStorageObject) + com.heroiclabs.nakama.api.WriteStorageObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteStorageObject.class, com.heroiclabs.nakama.api.WriteStorageObject.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.WriteStorageObject.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPermissionReadFieldBuilder(); + getPermissionWriteFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + collection_ = ""; + key_ = ""; + value_ = ""; + version_ = ""; + permissionRead_ = null; + if (permissionReadBuilder_ != null) { + permissionReadBuilder_.dispose(); + permissionReadBuilder_ = null; + } + permissionWrite_ = null; + if (permissionWriteBuilder_ != null) { + permissionWriteBuilder_.dispose(); + permissionWriteBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObject_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObject getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.WriteStorageObject.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObject build() { + com.heroiclabs.nakama.api.WriteStorageObject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObject buildPartial() { + com.heroiclabs.nakama.api.WriteStorageObject result = new com.heroiclabs.nakama.api.WriteStorageObject(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.WriteStorageObject result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.version_ = version_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.permissionRead_ = permissionReadBuilder_ == null + ? permissionRead_ + : permissionReadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.permissionWrite_ = permissionWriteBuilder_ == null + ? permissionWrite_ + : permissionWriteBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.WriteStorageObject) { + return mergeFrom((com.heroiclabs.nakama.api.WriteStorageObject)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.WriteStorageObject other) { + if (other == com.heroiclabs.nakama.api.WriteStorageObject.getDefaultInstance()) return this; + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasPermissionRead()) { + mergePermissionRead(other.getPermissionRead()); + } + if (other.hasPermissionWrite()) { + mergePermissionWrite(other.getPermissionWrite()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getPermissionReadFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getPermissionWriteFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object collection_ = ""; + /** + *
+     * The collection to store the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The collection to store the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The collection to store the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The collection to store the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The collection to store the object.
+     * 
+ * + * string collection = 1 [json_name = "collection"]; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+     * The key for the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The key for the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The key for the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The key for the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The key for the object within the collection.
+     * 
+ * + * string key = 2 [json_name = "key"]; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The value of the object.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+     * 
+ * + * string version = 4 [json_name = "version"]; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+     * 
+ * + * string version = 4 [json_name = "version"]; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+     * 
+ * + * string version = 4 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + version_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+     * 
+ * + * string version = 4 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+     * 
+ * + * string version = 4 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value permissionRead_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> permissionReadBuilder_; + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + * @return Whether the permissionRead field is set. + */ + public boolean hasPermissionRead() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + * @return The permissionRead. + */ + public com.google.protobuf.Int32Value getPermissionRead() { + if (permissionReadBuilder_ == null) { + return permissionRead_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : permissionRead_; + } else { + return permissionReadBuilder_.getMessage(); + } + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + public Builder setPermissionRead(com.google.protobuf.Int32Value value) { + if (permissionReadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + permissionRead_ = value; + } else { + permissionReadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + public Builder setPermissionRead( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (permissionReadBuilder_ == null) { + permissionRead_ = builderForValue.build(); + } else { + permissionReadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + public Builder mergePermissionRead(com.google.protobuf.Int32Value value) { + if (permissionReadBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + permissionRead_ != null && + permissionRead_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getPermissionReadBuilder().mergeFrom(value); + } else { + permissionRead_ = value; + } + } else { + permissionReadBuilder_.mergeFrom(value); + } + if (permissionRead_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + public Builder clearPermissionRead() { + bitField0_ = (bitField0_ & ~0x00000010); + permissionRead_ = null; + if (permissionReadBuilder_ != null) { + permissionReadBuilder_.dispose(); + permissionReadBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + public com.google.protobuf.Int32Value.Builder getPermissionReadBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getPermissionReadFieldBuilder().getBuilder(); + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getPermissionReadOrBuilder() { + if (permissionReadBuilder_ != null) { + return permissionReadBuilder_.getMessageOrBuilder(); + } else { + return permissionRead_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : permissionRead_; + } + } + /** + *
+     * The read access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getPermissionReadFieldBuilder() { + if (permissionReadBuilder_ == null) { + permissionReadBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getPermissionRead(), + getParentForChildren(), + isClean()); + permissionRead_ = null; + } + return permissionReadBuilder_; + } + + private com.google.protobuf.Int32Value permissionWrite_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> permissionWriteBuilder_; + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + * @return Whether the permissionWrite field is set. + */ + public boolean hasPermissionWrite() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + * @return The permissionWrite. + */ + public com.google.protobuf.Int32Value getPermissionWrite() { + if (permissionWriteBuilder_ == null) { + return permissionWrite_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : permissionWrite_; + } else { + return permissionWriteBuilder_.getMessage(); + } + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + public Builder setPermissionWrite(com.google.protobuf.Int32Value value) { + if (permissionWriteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + permissionWrite_ = value; + } else { + permissionWriteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + public Builder setPermissionWrite( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (permissionWriteBuilder_ == null) { + permissionWrite_ = builderForValue.build(); + } else { + permissionWriteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + public Builder mergePermissionWrite(com.google.protobuf.Int32Value value) { + if (permissionWriteBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + permissionWrite_ != null && + permissionWrite_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getPermissionWriteBuilder().mergeFrom(value); + } else { + permissionWrite_ = value; + } + } else { + permissionWriteBuilder_.mergeFrom(value); + } + if (permissionWrite_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + public Builder clearPermissionWrite() { + bitField0_ = (bitField0_ & ~0x00000020); + permissionWrite_ = null; + if (permissionWriteBuilder_ != null) { + permissionWriteBuilder_.dispose(); + permissionWriteBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + public com.google.protobuf.Int32Value.Builder getPermissionWriteBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPermissionWriteFieldBuilder().getBuilder(); + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getPermissionWriteOrBuilder() { + if (permissionWriteBuilder_ != null) { + return permissionWriteBuilder_.getMessageOrBuilder(); + } else { + return permissionWrite_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : permissionWrite_; + } + } + /** + *
+     * The write access permissions for the object.
+     * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getPermissionWriteFieldBuilder() { + if (permissionWriteBuilder_ == null) { + permissionWriteBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getPermissionWrite(), + getParentForChildren(), + isClean()); + permissionWrite_ = null; + } + return permissionWriteBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.WriteStorageObject) + } + + // @@protoc_insertion_point(class_scope:nakama.api.WriteStorageObject) + private static final com.heroiclabs.nakama.api.WriteStorageObject DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.WriteStorageObject(); + } + + public static com.heroiclabs.nakama.api.WriteStorageObject getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteStorageObject parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectOrBuilder.java new file mode 100644 index 00000000..014c81c2 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectOrBuilder.java @@ -0,0 +1,145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface WriteStorageObjectOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.WriteStorageObject) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The collection to store the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The collection. + */ + java.lang.String getCollection(); + /** + *
+   * The collection to store the object.
+   * 
+ * + * string collection = 1 [json_name = "collection"]; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + *
+   * The key for the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+   * The key for the object within the collection.
+   * 
+ * + * string key = 2 [json_name = "key"]; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * The value of the object.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+   * 
+ * + * string version = 4 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The version hash of the object to check. Possible values are: ["", "*", "#hash#"].
+   * 
+ * + * string version = 4 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + * @return Whether the permissionRead field is set. + */ + boolean hasPermissionRead(); + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + * @return The permissionRead. + */ + com.google.protobuf.Int32Value getPermissionRead(); + /** + *
+   * The read access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_read = 5 [json_name = "permissionRead"]; + */ + com.google.protobuf.Int32ValueOrBuilder getPermissionReadOrBuilder(); + + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + * @return Whether the permissionWrite field is set. + */ + boolean hasPermissionWrite(); + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + * @return The permissionWrite. + */ + com.google.protobuf.Int32Value getPermissionWrite(); + /** + *
+   * The write access permissions for the object.
+   * 
+ * + * .google.protobuf.Int32Value permission_write = 6 [json_name = "permissionWrite"]; + */ + com.google.protobuf.Int32ValueOrBuilder getPermissionWriteOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequest.java b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequest.java new file mode 100644 index 00000000..6dc20d7b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequest.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * Write objects to the storage engine.
+ * 
+ * + * Protobuf type {@code nakama.api.WriteStorageObjectsRequest} + */ +public final class WriteStorageObjectsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.WriteStorageObjectsRequest) + WriteStorageObjectsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + WriteStorageObjectsRequest.class.getName()); + } + // Use WriteStorageObjectsRequest.newBuilder() to construct. + private WriteStorageObjectsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WriteStorageObjectsRequest() { + objects_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteStorageObjectsRequest.class, com.heroiclabs.nakama.api.WriteStorageObjectsRequest.Builder.class); + } + + public static final int OBJECTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List objects_; + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public java.util.List getObjectsList() { + return objects_; + } + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public java.util.List + getObjectsOrBuilderList() { + return objects_; + } + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public int getObjectsCount() { + return objects_.size(); + } + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObject getObjects(int index) { + return objects_.get(index); + } + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObjectOrBuilder getObjectsOrBuilder( + int index) { + return objects_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < objects_.size(); i++) { + output.writeMessage(1, objects_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < objects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, objects_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.WriteStorageObjectsRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.WriteStorageObjectsRequest other = (com.heroiclabs.nakama.api.WriteStorageObjectsRequest) obj; + + if (!getObjectsList() + .equals(other.getObjectsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getObjectsCount() > 0) { + hash = (37 * hash) + OBJECTS_FIELD_NUMBER; + hash = (53 * hash) + getObjectsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.WriteStorageObjectsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Write objects to the storage engine.
+   * 
+ * + * Protobuf type {@code nakama.api.WriteStorageObjectsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.WriteStorageObjectsRequest) + com.heroiclabs.nakama.api.WriteStorageObjectsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObjectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObjectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteStorageObjectsRequest.class, com.heroiclabs.nakama.api.WriteStorageObjectsRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.WriteStorageObjectsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + } else { + objects_ = null; + objectsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteStorageObjectsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObjectsRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.WriteStorageObjectsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObjectsRequest build() { + com.heroiclabs.nakama.api.WriteStorageObjectsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObjectsRequest buildPartial() { + com.heroiclabs.nakama.api.WriteStorageObjectsRequest result = new com.heroiclabs.nakama.api.WriteStorageObjectsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.api.WriteStorageObjectsRequest result) { + if (objectsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + objects_ = java.util.Collections.unmodifiableList(objects_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.objects_ = objects_; + } else { + result.objects_ = objectsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.api.WriteStorageObjectsRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.WriteStorageObjectsRequest) { + return mergeFrom((com.heroiclabs.nakama.api.WriteStorageObjectsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.WriteStorageObjectsRequest other) { + if (other == com.heroiclabs.nakama.api.WriteStorageObjectsRequest.getDefaultInstance()) return this; + if (objectsBuilder_ == null) { + if (!other.objects_.isEmpty()) { + if (objects_.isEmpty()) { + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureObjectsIsMutable(); + objects_.addAll(other.objects_); + } + onChanged(); + } + } else { + if (!other.objects_.isEmpty()) { + if (objectsBuilder_.isEmpty()) { + objectsBuilder_.dispose(); + objectsBuilder_ = null; + objects_ = other.objects_; + bitField0_ = (bitField0_ & ~0x00000001); + objectsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getObjectsFieldBuilder() : null; + } else { + objectsBuilder_.addAllMessages(other.objects_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.WriteStorageObject m = + input.readMessage( + com.heroiclabs.nakama.api.WriteStorageObject.parser(), + extensionRegistry); + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(m); + } else { + objectsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List objects_ = + java.util.Collections.emptyList(); + private void ensureObjectsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + objects_ = new java.util.ArrayList(objects_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.WriteStorageObject, com.heroiclabs.nakama.api.WriteStorageObject.Builder, com.heroiclabs.nakama.api.WriteStorageObjectOrBuilder> objectsBuilder_; + + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List getObjectsList() { + if (objectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objects_); + } else { + return objectsBuilder_.getMessageList(); + } + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public int getObjectsCount() { + if (objectsBuilder_ == null) { + return objects_.size(); + } else { + return objectsBuilder_.getCount(); + } + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.WriteStorageObject getObjects(int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); + } else { + return objectsBuilder_.getMessage(index); + } + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder setObjects( + int index, com.heroiclabs.nakama.api.WriteStorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.set(index, value); + onChanged(); + } else { + objectsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder setObjects( + int index, com.heroiclabs.nakama.api.WriteStorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.set(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects(com.heroiclabs.nakama.api.WriteStorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(value); + onChanged(); + } else { + objectsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + int index, com.heroiclabs.nakama.api.WriteStorageObject value) { + if (objectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectsIsMutable(); + objects_.add(index, value); + onChanged(); + } else { + objectsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + com.heroiclabs.nakama.api.WriteStorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addObjects( + int index, com.heroiclabs.nakama.api.WriteStorageObject.Builder builderForValue) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.add(index, builderForValue.build()); + onChanged(); + } else { + objectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder addAllObjects( + java.lang.Iterable values) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objects_); + onChanged(); + } else { + objectsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder clearObjects() { + if (objectsBuilder_ == null) { + objects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + objectsBuilder_.clear(); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public Builder removeObjects(int index) { + if (objectsBuilder_ == null) { + ensureObjectsIsMutable(); + objects_.remove(index); + onChanged(); + } else { + objectsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.WriteStorageObject.Builder getObjectsBuilder( + int index) { + return getObjectsFieldBuilder().getBuilder(index); + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.WriteStorageObjectOrBuilder getObjectsOrBuilder( + int index) { + if (objectsBuilder_ == null) { + return objects_.get(index); } else { + return objectsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List + getObjectsOrBuilderList() { + if (objectsBuilder_ != null) { + return objectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objects_); + } + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.WriteStorageObject.Builder addObjectsBuilder() { + return getObjectsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.WriteStorageObject.getDefaultInstance()); + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public com.heroiclabs.nakama.api.WriteStorageObject.Builder addObjectsBuilder( + int index) { + return getObjectsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.WriteStorageObject.getDefaultInstance()); + } + /** + *
+     * The objects to store on the server.
+     * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + public java.util.List + getObjectsBuilderList() { + return getObjectsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.WriteStorageObject, com.heroiclabs.nakama.api.WriteStorageObject.Builder, com.heroiclabs.nakama.api.WriteStorageObjectOrBuilder> + getObjectsFieldBuilder() { + if (objectsBuilder_ == null) { + objectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.WriteStorageObject, com.heroiclabs.nakama.api.WriteStorageObject.Builder, com.heroiclabs.nakama.api.WriteStorageObjectOrBuilder>( + objects_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + objects_ = null; + } + return objectsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.WriteStorageObjectsRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.WriteStorageObjectsRequest) + private static final com.heroiclabs.nakama.api.WriteStorageObjectsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.WriteStorageObjectsRequest(); + } + + public static com.heroiclabs.nakama.api.WriteStorageObjectsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteStorageObjectsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteStorageObjectsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequestOrBuilder.java new file mode 100644 index 00000000..e43ffc9d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteStorageObjectsRequestOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface WriteStorageObjectsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.WriteStorageObjectsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + java.util.List + getObjectsList(); + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + com.heroiclabs.nakama.api.WriteStorageObject getObjects(int index); + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + int getObjectsCount(); + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + java.util.List + getObjectsOrBuilderList(); + /** + *
+   * The objects to store on the server.
+   * 
+ * + * repeated .nakama.api.WriteStorageObject objects = 1 [json_name = "objects"]; + */ + com.heroiclabs.nakama.api.WriteStorageObjectOrBuilder getObjectsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequest.java b/src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequest.java new file mode 100644 index 00000000..bc978d83 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequest.java @@ -0,0 +1,1659 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +/** + *
+ * A request to submit a score to a tournament.
+ * 
+ * + * Protobuf type {@code nakama.api.WriteTournamentRecordRequest} + */ +public final class WriteTournamentRecordRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.WriteTournamentRecordRequest) + WriteTournamentRecordRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + WriteTournamentRecordRequest.class.getName()); + } + // Use WriteTournamentRecordRequest.newBuilder() to construct. + private WriteTournamentRecordRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WriteTournamentRecordRequest() { + tournamentId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.class, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.Builder.class); + } + + public interface TournamentRecordWriteOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The score value to submit.
+     * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return The score. + */ + long getScore(); + + /** + *
+     * An optional secondary value.
+     * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return The subscore. + */ + long getSubscore(); + + /** + *
+     * A JSON object of additional properties (optional).
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The metadata. + */ + java.lang.String getMetadata(); + /** + *
+     * A JSON object of additional properties (optional).
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + com.google.protobuf.ByteString + getMetadataBytes(); + + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + int getOperatorValue(); + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The operator. + */ + com.heroiclabs.nakama.api.Operator getOperator(); + } + /** + *
+   * Record values to write.
+   * 
+ * + * Protobuf type {@code nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite} + */ + public static final class TournamentRecordWrite extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite) + TournamentRecordWriteOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + TournamentRecordWrite.class.getName()); + } + // Use TournamentRecordWrite.newBuilder() to construct. + private TournamentRecordWrite(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TournamentRecordWrite() { + metadata_ = ""; + operator_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.class, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.Builder.class); + } + + public static final int SCORE_FIELD_NUMBER = 1; + private long score_ = 0L; + /** + *
+     * The score value to submit.
+     * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + + public static final int SUBSCORE_FIELD_NUMBER = 2; + private long subscore_ = 0L; + /** + *
+     * An optional secondary value.
+     * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return The subscore. + */ + @java.lang.Override + public long getSubscore() { + return subscore_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object metadata_ = ""; + /** + *
+     * A JSON object of additional properties (optional).
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The metadata. + */ + @java.lang.Override + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } + } + /** + *
+     * A JSON object of additional properties (optional).
+     * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATOR_FIELD_NUMBER = 4; + private int operator_ = 0; + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+     * Operator override.
+     * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (score_ != 0L) { + output.writeInt64(1, score_); + } + if (subscore_ != 0L) { + output.writeInt64(2, subscore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, metadata_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + output.writeEnum(4, operator_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (score_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, score_); + } + if (subscore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, subscore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadata_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, metadata_); + } + if (operator_ != com.heroiclabs.nakama.api.Operator.NO_OVERRIDE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, operator_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite other = (com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite) obj; + + if (getScore() + != other.getScore()) return false; + if (getSubscore() + != other.getSubscore()) return false; + if (!getMetadata() + .equals(other.getMetadata())) return false; + if (operator_ != other.operator_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScore()); + hash = (37 * hash) + SUBSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSubscore()); + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + operator_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Record values to write.
+     * 
+ * + * Protobuf type {@code nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite) + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWriteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.class, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + score_ = 0L; + subscore_ = 0L; + metadata_ = ""; + operator_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_TournamentRecordWrite_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite build() { + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite buildPartial() { + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite result = new com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subscore_ = subscore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadata_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.operator_ = operator_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite) { + return mergeFrom((com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite other) { + if (other == com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.getDefaultInstance()) return this; + if (other.getScore() != 0L) { + setScore(other.getScore()); + } + if (other.getSubscore() != 0L) { + setSubscore(other.getSubscore()); + } + if (!other.getMetadata().isEmpty()) { + metadata_ = other.metadata_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.operator_ != 0) { + setOperatorValue(other.getOperatorValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + score_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + subscore_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + operator_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long score_ ; + /** + *
+       * The score value to submit.
+       * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + /** + *
+       * The score value to submit.
+       * 
+ * + * int64 score = 1 [json_name = "score"]; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(long value) { + + score_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The score value to submit.
+       * 
+ * + * int64 score = 1 [json_name = "score"]; + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000001); + score_ = 0L; + onChanged(); + return this; + } + + private long subscore_ ; + /** + *
+       * An optional secondary value.
+       * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return The subscore. + */ + @java.lang.Override + public long getSubscore() { + return subscore_; + } + /** + *
+       * An optional secondary value.
+       * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @param value The subscore to set. + * @return This builder for chaining. + */ + public Builder setSubscore(long value) { + + subscore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * An optional secondary value.
+       * 
+ * + * int64 subscore = 2 [json_name = "subscore"]; + * @return This builder for chaining. + */ + public Builder clearSubscore() { + bitField0_ = (bitField0_ & ~0x00000002); + subscore_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object metadata_ = ""; + /** + *
+       * A JSON object of additional properties (optional).
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The metadata. + */ + public java.lang.String getMetadata() { + java.lang.Object ref = metadata_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadata_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A JSON object of additional properties (optional).
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return The bytes for metadata. + */ + public com.google.protobuf.ByteString + getMetadataBytes() { + java.lang.Object ref = metadata_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadata_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A JSON object of additional properties (optional).
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @param value The metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadata( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadata_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * A JSON object of additional properties (optional).
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @return This builder for chaining. + */ + public Builder clearMetadata() { + metadata_ = getDefaultInstance().getMetadata(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * A JSON object of additional properties (optional).
+       * 
+ * + * string metadata = 3 [json_name = "metadata"]; + * @param value The bytes for metadata to set. + * @return This builder for chaining. + */ + public Builder setMetadataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadata_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int operator_ = 0; + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @param value The enum numeric value on the wire for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorValue(int value) { + operator_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return The operator. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Operator getOperator() { + com.heroiclabs.nakama.api.Operator result = com.heroiclabs.nakama.api.Operator.forNumber(operator_); + return result == null ? com.heroiclabs.nakama.api.Operator.UNRECOGNIZED : result; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(com.heroiclabs.nakama.api.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + operator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Operator override.
+       * 
+ * + * .nakama.api.Operator operator = 4 [json_name = "operator"]; + * @return This builder for chaining. + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000008); + operator_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite) + } + + // @@protoc_insertion_point(class_scope:nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite) + private static final com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite(); + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TournamentRecordWrite parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int TOURNAMENT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object tournamentId_ = ""; + /** + *
+   * The tournament ID to write the record for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + @java.lang.Override + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } + } + /** + *
+   * The tournament ID to write the record for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECORD_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record_; + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + * @return Whether the record field is set. + */ + @java.lang.Override + public boolean hasRecord() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + * @return The record. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite getRecord() { + return record_ == null ? com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.getDefaultInstance() : record_; + } + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWriteOrBuilder getRecordOrBuilder() { + return record_ == null ? com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.getDefaultInstance() : record_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tournamentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRecord()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tournamentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tournamentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRecord()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.api.WriteTournamentRecordRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.api.WriteTournamentRecordRequest other = (com.heroiclabs.nakama.api.WriteTournamentRecordRequest) obj; + + if (!getTournamentId() + .equals(other.getTournamentId())) return false; + if (hasRecord() != other.hasRecord()) return false; + if (hasRecord()) { + if (!getRecord() + .equals(other.getRecord())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOURNAMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTournamentId().hashCode(); + if (hasRecord()) { + hash = (37 * hash) + RECORD_FIELD_NUMBER; + hash = (53 * hash) + getRecord().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.api.WriteTournamentRecordRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A request to submit a score to a tournament.
+   * 
+ * + * Protobuf type {@code nakama.api.WriteTournamentRecordRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.api.WriteTournamentRecordRequest) + com.heroiclabs.nakama.api.WriteTournamentRecordRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.class, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.api.WriteTournamentRecordRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getRecordFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tournamentId_ = ""; + record_ = null; + if (recordBuilder_ != null) { + recordBuilder_.dispose(); + recordBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.api.ApiProto.internal_static_nakama_api_WriteTournamentRecordRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.api.WriteTournamentRecordRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest build() { + com.heroiclabs.nakama.api.WriteTournamentRecordRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest buildPartial() { + com.heroiclabs.nakama.api.WriteTournamentRecordRequest result = new com.heroiclabs.nakama.api.WriteTournamentRecordRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.api.WriteTournamentRecordRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tournamentId_ = tournamentId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.record_ = recordBuilder_ == null + ? record_ + : recordBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.api.WriteTournamentRecordRequest) { + return mergeFrom((com.heroiclabs.nakama.api.WriteTournamentRecordRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.api.WriteTournamentRecordRequest other) { + if (other == com.heroiclabs.nakama.api.WriteTournamentRecordRequest.getDefaultInstance()) return this; + if (!other.getTournamentId().isEmpty()) { + tournamentId_ = other.tournamentId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRecord()) { + mergeRecord(other.getRecord()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tournamentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getRecordFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object tournamentId_ = ""; + /** + *
+     * The tournament ID to write the record for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + public java.lang.String getTournamentId() { + java.lang.Object ref = tournamentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tournamentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The tournament ID to write the record for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + public com.google.protobuf.ByteString + getTournamentIdBytes() { + java.lang.Object ref = tournamentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tournamentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The tournament ID to write the record for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The tournament ID to write the record for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return This builder for chaining. + */ + public Builder clearTournamentId() { + tournamentId_ = getDefaultInstance().getTournamentId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The tournament ID to write the record for.
+     * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @param value The bytes for tournamentId to set. + * @return This builder for chaining. + */ + public Builder setTournamentIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tournamentId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.Builder, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWriteOrBuilder> recordBuilder_; + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + * @return Whether the record field is set. + */ + public boolean hasRecord() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + * @return The record. + */ + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite getRecord() { + if (recordBuilder_ == null) { + return record_ == null ? com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.getDefaultInstance() : record_; + } else { + return recordBuilder_.getMessage(); + } + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + public Builder setRecord(com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite value) { + if (recordBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + record_ = value; + } else { + recordBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + public Builder setRecord( + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.Builder builderForValue) { + if (recordBuilder_ == null) { + record_ = builderForValue.build(); + } else { + recordBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + public Builder mergeRecord(com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite value) { + if (recordBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + record_ != null && + record_ != com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.getDefaultInstance()) { + getRecordBuilder().mergeFrom(value); + } else { + record_ = value; + } + } else { + recordBuilder_.mergeFrom(value); + } + if (record_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + public Builder clearRecord() { + bitField0_ = (bitField0_ & ~0x00000002); + record_ = null; + if (recordBuilder_ != null) { + recordBuilder_.dispose(); + recordBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.Builder getRecordBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRecordFieldBuilder().getBuilder(); + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWriteOrBuilder getRecordOrBuilder() { + if (recordBuilder_ != null) { + return recordBuilder_.getMessageOrBuilder(); + } else { + return record_ == null ? + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.getDefaultInstance() : record_; + } + } + /** + *
+     * Record input.
+     * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.Builder, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWriteOrBuilder> + getRecordFieldBuilder() { + if (recordBuilder_ == null) { + recordBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite.Builder, com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWriteOrBuilder>( + getRecord(), + getParentForChildren(), + isClean()); + record_ = null; + } + return recordBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.api.WriteTournamentRecordRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.api.WriteTournamentRecordRequest) + private static final com.heroiclabs.nakama.api.WriteTournamentRecordRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.api.WriteTournamentRecordRequest(); + } + + public static com.heroiclabs.nakama.api.WriteTournamentRecordRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteTournamentRecordRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.api.WriteTournamentRecordRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequestOrBuilder.java new file mode 100644 index 00000000..2fe5ab49 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/api/WriteTournamentRecordRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/api/api.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.api; + +public interface WriteTournamentRecordRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.api.WriteTournamentRecordRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The tournament ID to write the record for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The tournamentId. + */ + java.lang.String getTournamentId(); + /** + *
+   * The tournament ID to write the record for.
+   * 
+ * + * string tournament_id = 1 [json_name = "tournamentId"]; + * @return The bytes for tournamentId. + */ + com.google.protobuf.ByteString + getTournamentIdBytes(); + + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + * @return Whether the record field is set. + */ + boolean hasRecord(); + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + * @return The record. + */ + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite getRecord(); + /** + *
+   * Record input.
+   * 
+ * + * .nakama.api.WriteTournamentRecordRequest.TournamentRecordWrite record = 2 [json_name = "record"]; + */ + com.heroiclabs.nakama.api.WriteTournamentRecordRequest.TournamentRecordWriteOrBuilder getRecordOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Channel.java b/src/main/java/com/heroiclabs/nakama/rtapi/Channel.java new file mode 100644 index 00000000..d3cb4cbc --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Channel.java @@ -0,0 +1,1881 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A realtime chat channel.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Channel} + */ +public final class Channel extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Channel) + ChannelOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Channel.class.getName()); + } + // Use Channel.newBuilder() to construct. + private Channel(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Channel() { + id_ = ""; + presences_ = java.util.Collections.emptyList(); + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Channel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Channel.class, com.heroiclabs.nakama.rtapi.Channel.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The ID of the channel.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The ID of the channel.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List presences_; + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List getPresencesList() { + return presences_; + } + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List + getPresencesOrBuilderList() { + return presences_; + } + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public int getPresencesCount() { + return presences_.size(); + } + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + return presences_.get(index); + } + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + return presences_.get(index); + } + + public static final int SELF_FIELD_NUMBER = 3; + private com.heroiclabs.nakama.rtapi.UserPresence self_; + /** + *
+   * A reference to the current user's presence in the channel.
+   * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + * @return Whether the self field is set. + */ + @java.lang.Override + public boolean hasSelf() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * A reference to the current user's presence in the channel.
+   * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + * @return The self. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getSelf() { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + /** + *
+   * A reference to the current user's presence in the channel.
+   * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder() { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + + public static final int ROOM_NAME_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object roomName_ = ""; + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The roomName. + */ + @java.lang.Override + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } + } + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_ONE_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdOne_ = ""; + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + @java.lang.Override + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } + } + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_TWO_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdTwo_ = ""; + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + @java.lang.Override + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } + } + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + for (int i = 0; i < presences_.size(); i++) { + output.writeMessage(2, presences_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSelf()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, userIdTwo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + for (int i = 0; i < presences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, presences_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getSelf()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, userIdTwo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Channel)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Channel other = (com.heroiclabs.nakama.rtapi.Channel) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getPresencesList() + .equals(other.getPresencesList())) return false; + if (hasSelf() != other.hasSelf()) return false; + if (hasSelf()) { + if (!getSelf() + .equals(other.getSelf())) return false; + } + if (!getRoomName() + .equals(other.getRoomName())) return false; + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdOne() + .equals(other.getUserIdOne())) return false; + if (!getUserIdTwo() + .equals(other.getUserIdTwo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getPresencesCount() > 0) { + hash = (37 * hash) + PRESENCES_FIELD_NUMBER; + hash = (53 * hash) + getPresencesList().hashCode(); + } + if (hasSelf()) { + hash = (37 * hash) + SELF_FIELD_NUMBER; + hash = (53 * hash) + getSelf().hashCode(); + } + hash = (37 * hash) + ROOM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRoomName().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + USER_ID_ONE_FIELD_NUMBER; + hash = (53 * hash) + getUserIdOne().hashCode(); + hash = (37 * hash) + USER_ID_TWO_FIELD_NUMBER; + hash = (53 * hash) + getUserIdTwo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Channel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Channel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Channel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Channel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A realtime chat channel.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Channel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Channel) + com.heroiclabs.nakama.rtapi.ChannelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Channel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Channel.class, com.heroiclabs.nakama.rtapi.Channel.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Channel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresencesFieldBuilder(); + getSelfFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + } else { + presences_ = null; + presencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Channel_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Channel getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Channel build() { + com.heroiclabs.nakama.rtapi.Channel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Channel buildPartial() { + com.heroiclabs.nakama.rtapi.Channel result = new com.heroiclabs.nakama.rtapi.Channel(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.Channel result) { + if (presencesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + presences_ = java.util.Collections.unmodifiableList(presences_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.presences_ = presences_; + } else { + result.presences_ = presencesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Channel result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.self_ = selfBuilder_ == null + ? self_ + : selfBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.roomName_ = roomName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.userIdOne_ = userIdOne_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userIdTwo_ = userIdTwo_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Channel) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Channel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Channel other) { + if (other == com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (presencesBuilder_ == null) { + if (!other.presences_.isEmpty()) { + if (presences_.isEmpty()) { + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePresencesIsMutable(); + presences_.addAll(other.presences_); + } + onChanged(); + } + } else { + if (!other.presences_.isEmpty()) { + if (presencesBuilder_.isEmpty()) { + presencesBuilder_.dispose(); + presencesBuilder_ = null; + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000002); + presencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPresencesFieldBuilder() : null; + } else { + presencesBuilder_.addAllMessages(other.presences_); + } + } + } + if (other.hasSelf()) { + mergeSelf(other.getSelf()); + } + if (!other.getRoomName().isEmpty()) { + roomName_ = other.roomName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUserIdOne().isEmpty()) { + userIdOne_ = other.userIdOne_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getUserIdTwo().isEmpty()) { + userIdTwo_ = other.userIdTwo_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(m); + } else { + presencesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + input.readMessage( + getSelfFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + roomName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + userIdOne_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + userIdTwo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The ID of the channel.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the channel.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the channel.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the channel.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the channel.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List presences_ = + java.util.Collections.emptyList(); + private void ensurePresencesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + presences_ = new java.util.ArrayList(presences_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presencesBuilder_; + + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public java.util.List getPresencesList() { + if (presencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(presences_); + } else { + return presencesBuilder_.getMessageList(); + } + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public int getPresencesCount() { + if (presencesBuilder_ == null) { + return presences_.size(); + } else { + return presencesBuilder_.getCount(); + } + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); + } else { + return presencesBuilder_.getMessage(index); + } + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.set(index, value); + onChanged(); + } else { + presencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.set(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(value); + onChanged(); + } else { + presencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(index, value); + onChanged(); + } else { + presencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addAllPresences( + java.lang.Iterable values) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, presences_); + onChanged(); + } else { + presencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder clearPresences() { + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + presencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder removePresences(int index) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.remove(index); + onChanged(); + } else { + presencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresencesBuilder( + int index) { + return getPresencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); } else { + return presencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public java.util.List + getPresencesOrBuilderList() { + if (presencesBuilder_ != null) { + return presencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(presences_); + } + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder() { + return getPresencesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder( + int index) { + return getPresencesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * The users currently in the channel.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public java.util.List + getPresencesBuilderList() { + return getPresencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresencesFieldBuilder() { + if (presencesBuilder_ == null) { + presencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + presences_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + presences_ = null; + } + return presencesBuilder_; + } + + private com.heroiclabs.nakama.rtapi.UserPresence self_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> selfBuilder_; + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + * @return Whether the self field is set. + */ + public boolean hasSelf() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + * @return The self. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getSelf() { + if (selfBuilder_ == null) { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } else { + return selfBuilder_.getMessage(); + } + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + public Builder setSelf(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (selfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + self_ = value; + } else { + selfBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + public Builder setSelf( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (selfBuilder_ == null) { + self_ = builderForValue.build(); + } else { + selfBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + public Builder mergeSelf(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (selfBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + self_ != null && + self_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getSelfBuilder().mergeFrom(value); + } else { + self_ = value; + } + } else { + selfBuilder_.mergeFrom(value); + } + if (self_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + public Builder clearSelf() { + bitField0_ = (bitField0_ & ~0x00000004); + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getSelfBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSelfFieldBuilder().getBuilder(); + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder() { + if (selfBuilder_ != null) { + return selfBuilder_.getMessageOrBuilder(); + } else { + return self_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + } + /** + *
+     * A reference to the current user's presence in the channel.
+     * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getSelfFieldBuilder() { + if (selfBuilder_ == null) { + selfBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getSelf(), + getParentForChildren(), + isClean()); + self_ = null; + } + return selfBuilder_; + } + + private java.lang.Object roomName_ = ""; + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The roomName. + */ + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @param value The roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + roomName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return This builder for chaining. + */ + public Builder clearRoomName() { + roomName_ = getDefaultInstance().getRoomName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @param value The bytes for roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + roomName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object userIdOne_ = ""; + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @param value The userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOne( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdOne_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return This builder for chaining. + */ + public Builder clearUserIdOne() { + userIdOne_ = getDefaultInstance().getUserIdOne(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @param value The bytes for userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdOne_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object userIdTwo_ = ""; + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @param value The userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdTwo_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return This builder for chaining. + */ + public Builder clearUserIdTwo() { + userIdTwo_ = getDefaultInstance().getUserIdTwo(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @param value The bytes for userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdTwo_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Channel) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Channel) + private static final com.heroiclabs.nakama.rtapi.Channel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Channel(); + } + + public static com.heroiclabs.nakama.rtapi.Channel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Channel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Channel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoin.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoin.java new file mode 100644 index 00000000..7d150aff --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoin.java @@ -0,0 +1,1264 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Join operation for a realtime chat channel.
+ * 
+ * + * Protobuf type {@code nakama.realtime.ChannelJoin} + */ +public final class ChannelJoin extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.ChannelJoin) + ChannelJoinOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelJoin.class.getName()); + } + // Use ChannelJoin.newBuilder() to construct. + private ChannelJoin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelJoin() { + target_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelJoin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelJoin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelJoin.class, com.heroiclabs.nakama.rtapi.ChannelJoin.Builder.class); + } + + /** + *
+   * The type of chat channel.
+   * 
+ * + * Protobuf enum {@code nakama.realtime.ChannelJoin.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Default case. Assumed as ROOM type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * A room which anyone can join to chat.
+     * 
+ * + * ROOM = 1; + */ + ROOM(1), + /** + *
+     * A private channel for 1-on-1 chat.
+     * 
+ * + * DIRECT_MESSAGE = 2; + */ + DIRECT_MESSAGE(2), + /** + *
+     * A channel for group chat.
+     * 
+ * + * GROUP = 3; + */ + GROUP(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Type.class.getName()); + } + /** + *
+     * Default case. Assumed as ROOM type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * A room which anyone can join to chat.
+     * 
+ * + * ROOM = 1; + */ + public static final int ROOM_VALUE = 1; + /** + *
+     * A private channel for 1-on-1 chat.
+     * 
+ * + * DIRECT_MESSAGE = 2; + */ + public static final int DIRECT_MESSAGE_VALUE = 2; + /** + *
+     * A channel for group chat.
+     * 
+ * + * GROUP = 3; + */ + public static final int GROUP_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return ROOM; + case 2: return DIRECT_MESSAGE; + case 3: return GROUP; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.ChannelJoin.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.realtime.ChannelJoin.Type) + } + + private int bitField0_; + public static final int TARGET_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + *
+   * The user ID to DM with, group ID to chat with, or room channel name to join.
+   * 
+ * + * string target = 1 [json_name = "target"]; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + *
+   * The user ID to DM with, group ID to chat with, or room channel name to join.
+   * 
+ * + * string target = 1 [json_name = "target"]; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_ = 0; + /** + *
+   * The type of the chat channel.
+   * 
+ * + * int32 type = 2 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + + public static final int PERSISTENCE_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue persistence_; + /** + *
+   * Whether messages sent on this channel should be persistent.
+   * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + * @return Whether the persistence field is set. + */ + @java.lang.Override + public boolean hasPersistence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Whether messages sent on this channel should be persistent.
+   * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + * @return The persistence. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersistence() { + return persistence_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistence_; + } + /** + *
+   * Whether messages sent on this channel should be persistent.
+   * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistenceOrBuilder() { + return persistence_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistence_; + } + + public static final int HIDDEN_FIELD_NUMBER = 4; + private com.google.protobuf.BoolValue hidden_; + /** + *
+   * Whether the user should appear in the channel's presence list and events.
+   * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + * @return Whether the hidden field is set. + */ + @java.lang.Override + public boolean hasHidden() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Whether the user should appear in the channel's presence list and events.
+   * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + * @return The hidden. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getHidden() { + return hidden_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : hidden_; + } + /** + *
+   * Whether the user should appear in the channel's presence list and events.
+   * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getHiddenOrBuilder() { + return hidden_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : hidden_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, target_); + } + if (type_ != 0) { + output.writeInt32(2, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPersistence()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getHidden()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, target_); + } + if (type_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPersistence()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getHidden()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.ChannelJoin)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.ChannelJoin other = (com.heroiclabs.nakama.rtapi.ChannelJoin) obj; + + if (!getTarget() + .equals(other.getTarget())) return false; + if (getType() + != other.getType()) return false; + if (hasPersistence() != other.hasPersistence()) return false; + if (hasPersistence()) { + if (!getPersistence() + .equals(other.getPersistence())) return false; + } + if (hasHidden() != other.hasHidden()) return false; + if (hasHidden()) { + if (!getHidden() + .equals(other.getHidden())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType(); + if (hasPersistence()) { + hash = (37 * hash) + PERSISTENCE_FIELD_NUMBER; + hash = (53 * hash) + getPersistence().hashCode(); + } + if (hasHidden()) { + hash = (37 * hash) + HIDDEN_FIELD_NUMBER; + hash = (53 * hash) + getHidden().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelJoin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.ChannelJoin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Join operation for a realtime chat channel.
+   * 
+ * + * Protobuf type {@code nakama.realtime.ChannelJoin} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.ChannelJoin) + com.heroiclabs.nakama.rtapi.ChannelJoinOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelJoin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelJoin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelJoin.class, com.heroiclabs.nakama.rtapi.ChannelJoin.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.ChannelJoin.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPersistenceFieldBuilder(); + getHiddenFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + target_ = ""; + type_ = 0; + persistence_ = null; + if (persistenceBuilder_ != null) { + persistenceBuilder_.dispose(); + persistenceBuilder_ = null; + } + hidden_ = null; + if (hiddenBuilder_ != null) { + hiddenBuilder_.dispose(); + hiddenBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelJoin_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoin getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoin build() { + com.heroiclabs.nakama.rtapi.ChannelJoin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoin buildPartial() { + com.heroiclabs.nakama.rtapi.ChannelJoin result = new com.heroiclabs.nakama.rtapi.ChannelJoin(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.ChannelJoin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.persistence_ = persistenceBuilder_ == null + ? persistence_ + : persistenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.hidden_ = hiddenBuilder_ == null + ? hidden_ + : hiddenBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.ChannelJoin) { + return mergeFrom((com.heroiclabs.nakama.rtapi.ChannelJoin)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.ChannelJoin other) { + if (other == com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance()) return this; + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getType() != 0) { + setType(other.getType()); + } + if (other.hasPersistence()) { + mergePersistence(other.getPersistence()); + } + if (other.hasHidden()) { + mergeHidden(other.getHidden()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + type_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getPersistenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getHiddenFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object target_ = ""; + /** + *
+     * The user ID to DM with, group ID to chat with, or room channel name to join.
+     * 
+ * + * string target = 1 [json_name = "target"]; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user ID to DM with, group ID to chat with, or room channel name to join.
+     * 
+ * + * string target = 1 [json_name = "target"]; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user ID to DM with, group ID to chat with, or room channel name to join.
+     * 
+ * + * string target = 1 [json_name = "target"]; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The user ID to DM with, group ID to chat with, or room channel name to join.
+     * 
+ * + * string target = 1 [json_name = "target"]; + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The user ID to DM with, group ID to chat with, or room channel name to join.
+     * 
+ * + * string target = 1 [json_name = "target"]; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int type_ ; + /** + *
+     * The type of the chat channel.
+     * 
+ * + * int32 type = 2 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + /** + *
+     * The type of the chat channel.
+     * 
+ * + * int32 type = 2 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(int value) { + + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The type of the chat channel.
+     * 
+ * + * int32 type = 2 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue persistence_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistenceBuilder_; + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + * @return Whether the persistence field is set. + */ + public boolean hasPersistence() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + * @return The persistence. + */ + public com.google.protobuf.BoolValue getPersistence() { + if (persistenceBuilder_ == null) { + return persistence_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistence_; + } else { + return persistenceBuilder_.getMessage(); + } + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + public Builder setPersistence(com.google.protobuf.BoolValue value) { + if (persistenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistence_ = value; + } else { + persistenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + public Builder setPersistence( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistenceBuilder_ == null) { + persistence_ = builderForValue.build(); + } else { + persistenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + public Builder mergePersistence(com.google.protobuf.BoolValue value) { + if (persistenceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + persistence_ != null && + persistence_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistenceBuilder().mergeFrom(value); + } else { + persistence_ = value; + } + } else { + persistenceBuilder_.mergeFrom(value); + } + if (persistence_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + public Builder clearPersistence() { + bitField0_ = (bitField0_ & ~0x00000004); + persistence_ = null; + if (persistenceBuilder_ != null) { + persistenceBuilder_.dispose(); + persistenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistenceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPersistenceFieldBuilder().getBuilder(); + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistenceOrBuilder() { + if (persistenceBuilder_ != null) { + return persistenceBuilder_.getMessageOrBuilder(); + } else { + return persistence_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persistence_; + } + } + /** + *
+     * Whether messages sent on this channel should be persistent.
+     * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistenceFieldBuilder() { + if (persistenceBuilder_ == null) { + persistenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersistence(), + getParentForChildren(), + isClean()); + persistence_ = null; + } + return persistenceBuilder_; + } + + private com.google.protobuf.BoolValue hidden_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> hiddenBuilder_; + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + * @return Whether the hidden field is set. + */ + public boolean hasHidden() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + * @return The hidden. + */ + public com.google.protobuf.BoolValue getHidden() { + if (hiddenBuilder_ == null) { + return hidden_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : hidden_; + } else { + return hiddenBuilder_.getMessage(); + } + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + public Builder setHidden(com.google.protobuf.BoolValue value) { + if (hiddenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hidden_ = value; + } else { + hiddenBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + public Builder setHidden( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (hiddenBuilder_ == null) { + hidden_ = builderForValue.build(); + } else { + hiddenBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + public Builder mergeHidden(com.google.protobuf.BoolValue value) { + if (hiddenBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + hidden_ != null && + hidden_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getHiddenBuilder().mergeFrom(value); + } else { + hidden_ = value; + } + } else { + hiddenBuilder_.mergeFrom(value); + } + if (hidden_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + public Builder clearHidden() { + bitField0_ = (bitField0_ & ~0x00000008); + hidden_ = null; + if (hiddenBuilder_ != null) { + hiddenBuilder_.dispose(); + hiddenBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + public com.google.protobuf.BoolValue.Builder getHiddenBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getHiddenFieldBuilder().getBuilder(); + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + public com.google.protobuf.BoolValueOrBuilder getHiddenOrBuilder() { + if (hiddenBuilder_ != null) { + return hiddenBuilder_.getMessageOrBuilder(); + } else { + return hidden_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : hidden_; + } + } + /** + *
+     * Whether the user should appear in the channel's presence list and events.
+     * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getHiddenFieldBuilder() { + if (hiddenBuilder_ == null) { + hiddenBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getHidden(), + getParentForChildren(), + isClean()); + hidden_ = null; + } + return hiddenBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.ChannelJoin) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.ChannelJoin) + private static final com.heroiclabs.nakama.rtapi.ChannelJoin DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.ChannelJoin(); + } + + public static com.heroiclabs.nakama.rtapi.ChannelJoin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelJoin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoinOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoinOrBuilder.java new file mode 100644 index 00000000..379c38b9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelJoinOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelJoinOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.ChannelJoin) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The user ID to DM with, group ID to chat with, or room channel name to join.
+   * 
+ * + * string target = 1 [json_name = "target"]; + * @return The target. + */ + java.lang.String getTarget(); + /** + *
+   * The user ID to DM with, group ID to chat with, or room channel name to join.
+   * 
+ * + * string target = 1 [json_name = "target"]; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + *
+   * The type of the chat channel.
+   * 
+ * + * int32 type = 2 [json_name = "type"]; + * @return The type. + */ + int getType(); + + /** + *
+   * Whether messages sent on this channel should be persistent.
+   * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + * @return Whether the persistence field is set. + */ + boolean hasPersistence(); + /** + *
+   * Whether messages sent on this channel should be persistent.
+   * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + * @return The persistence. + */ + com.google.protobuf.BoolValue getPersistence(); + /** + *
+   * Whether messages sent on this channel should be persistent.
+   * 
+ * + * .google.protobuf.BoolValue persistence = 3 [json_name = "persistence"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistenceOrBuilder(); + + /** + *
+   * Whether the user should appear in the channel's presence list and events.
+   * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + * @return Whether the hidden field is set. + */ + boolean hasHidden(); + /** + *
+   * Whether the user should appear in the channel's presence list and events.
+   * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + * @return The hidden. + */ + com.google.protobuf.BoolValue getHidden(); + /** + *
+   * Whether the user should appear in the channel's presence list and events.
+   * 
+ * + * .google.protobuf.BoolValue hidden = 4 [json_name = "hidden"]; + */ + com.google.protobuf.BoolValueOrBuilder getHiddenOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeave.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeave.java new file mode 100644 index 00000000..abaafe95 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeave.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Leave a realtime channel.
+ * 
+ * + * Protobuf type {@code nakama.realtime.ChannelLeave} + */ +public final class ChannelLeave extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.ChannelLeave) + ChannelLeaveOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelLeave.class.getName()); + } + // Use ChannelLeave.newBuilder() to construct. + private ChannelLeave(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelLeave() { + channelId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelLeave_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelLeave_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelLeave.class, com.heroiclabs.nakama.rtapi.ChannelLeave.Builder.class); + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The ID of the channel to leave.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The ID of the channel to leave.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.ChannelLeave)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.ChannelLeave other = (com.heroiclabs.nakama.rtapi.ChannelLeave) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelLeave parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.ChannelLeave prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Leave a realtime channel.
+   * 
+ * + * Protobuf type {@code nakama.realtime.ChannelLeave} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.ChannelLeave) + com.heroiclabs.nakama.rtapi.ChannelLeaveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelLeave_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelLeave_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelLeave.class, com.heroiclabs.nakama.rtapi.ChannelLeave.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.ChannelLeave.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelLeave_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeave getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeave build() { + com.heroiclabs.nakama.rtapi.ChannelLeave result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeave buildPartial() { + com.heroiclabs.nakama.rtapi.ChannelLeave result = new com.heroiclabs.nakama.rtapi.ChannelLeave(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.ChannelLeave result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.ChannelLeave) { + return mergeFrom((com.heroiclabs.nakama.rtapi.ChannelLeave)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.ChannelLeave other) { + if (other == com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The ID of the channel to leave.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the channel to leave.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the channel to leave.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ID of the channel to leave.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ID of the channel to leave.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.ChannelLeave) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.ChannelLeave) + private static final com.heroiclabs.nakama.rtapi.ChannelLeave DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.ChannelLeave(); + } + + public static com.heroiclabs.nakama.rtapi.ChannelLeave getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelLeave parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeave getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeaveOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeaveOrBuilder.java new file mode 100644 index 00000000..dc4eb549 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelLeaveOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelLeaveOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.ChannelLeave) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the channel to leave.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The ID of the channel to leave.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAck.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAck.java new file mode 100644 index 00000000..a49fba9f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAck.java @@ -0,0 +1,2461 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A receipt reply from a channel message send operation.
+ * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageAck} + */ +public final class ChannelMessageAck extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.ChannelMessageAck) + ChannelMessageAckOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelMessageAck.class.getName()); + } + // Use ChannelMessageAck.newBuilder() to construct. + private ChannelMessageAck(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelMessageAck() { + channelId_ = ""; + messageId_ = ""; + username_ = ""; + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageAck.class, com.heroiclabs.nakama.rtapi.ChannelMessageAck.Builder.class); + } + + private int bitField0_; + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object messageId_ = ""; + /** + *
+   * The unique ID assigned to the message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } + } + /** + *
+   * The unique ID assigned to the message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 3; + private com.google.protobuf.Int32Value code_; + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return Whether the code field is set. + */ + @java.lang.Override + public boolean hasCode() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return The code. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getCode() { + return code_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getCodeOrBuilder() { + return code_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } + + public static final int USERNAME_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * Username of the message sender.
+   * 
+ * + * string username = 4 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * Username of the message sender.
+   * 
+ * + * string username = 4 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int PERSISTENT_FIELD_NUMBER = 7; + private com.google.protobuf.BoolValue persistent_; + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + * @return Whether the persistent field is set. + */ + @java.lang.Override + public boolean hasPersistent() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + * @return The persistent. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getPersistent() { + return persistent_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getPersistentOrBuilder() { + return persistent_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } + + public static final int ROOM_NAME_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object roomName_ = ""; + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @return The roomName. + */ + @java.lang.Override + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } + } + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_ONE_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdOne_ = ""; + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + @java.lang.Override + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } + } + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_TWO_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdTwo_ = ""; + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + @java.lang.Override + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } + } + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, messageId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCode()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, username_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getPersistent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, userIdTwo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, messageId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCode()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, username_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getPersistent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, userIdTwo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.ChannelMessageAck)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.ChannelMessageAck other = (com.heroiclabs.nakama.rtapi.ChannelMessageAck) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (!getMessageId() + .equals(other.getMessageId())) return false; + if (hasCode() != other.hasCode()) return false; + if (hasCode()) { + if (!getCode() + .equals(other.getCode())) return false; + } + if (!getUsername() + .equals(other.getUsername())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasPersistent() != other.hasPersistent()) return false; + if (hasPersistent()) { + if (!getPersistent() + .equals(other.getPersistent())) return false; + } + if (!getRoomName() + .equals(other.getRoomName())) return false; + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdOne() + .equals(other.getUserIdOne())) return false; + if (!getUserIdTwo() + .equals(other.getUserIdTwo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + hash = (37 * hash) + MESSAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMessageId().hashCode(); + if (hasCode()) { + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasPersistent()) { + hash = (37 * hash) + PERSISTENT_FIELD_NUMBER; + hash = (53 * hash) + getPersistent().hashCode(); + } + hash = (37 * hash) + ROOM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRoomName().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + USER_ID_ONE_FIELD_NUMBER; + hash = (53 * hash) + getUserIdOne().hashCode(); + hash = (37 * hash) + USER_ID_TWO_FIELD_NUMBER; + hash = (53 * hash) + getUserIdTwo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.ChannelMessageAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A receipt reply from a channel message send operation.
+   * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.ChannelMessageAck) + com.heroiclabs.nakama.rtapi.ChannelMessageAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageAck.class, com.heroiclabs.nakama.rtapi.ChannelMessageAck.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.ChannelMessageAck.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCodeFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getPersistentFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + messageId_ = ""; + code_ = null; + if (codeBuilder_ != null) { + codeBuilder_.dispose(); + codeBuilder_ = null; + } + username_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + persistent_ = null; + if (persistentBuilder_ != null) { + persistentBuilder_.dispose(); + persistentBuilder_ = null; + } + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageAck_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAck getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAck build() { + com.heroiclabs.nakama.rtapi.ChannelMessageAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAck buildPartial() { + com.heroiclabs.nakama.rtapi.ChannelMessageAck result = new com.heroiclabs.nakama.rtapi.ChannelMessageAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.ChannelMessageAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messageId_ = messageId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.code_ = codeBuilder_ == null + ? code_ + : codeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null + ? createTime_ + : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null + ? updateTime_ + : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.persistent_ = persistentBuilder_ == null + ? persistent_ + : persistentBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.roomName_ = roomName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.userIdOne_ = userIdOne_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.userIdTwo_ = userIdTwo_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.ChannelMessageAck) { + return mergeFrom((com.heroiclabs.nakama.rtapi.ChannelMessageAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.ChannelMessageAck other) { + if (other == com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMessageId().isEmpty()) { + messageId_ = other.messageId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCode()) { + mergeCode(other.getCode()); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasPersistent()) { + mergePersistent(other.getPersistent()); + } + if (!other.getRoomName().isEmpty()) { + roomName_ = other.roomName_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getUserIdOne().isEmpty()) { + userIdOne_ = other.userIdOne_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getUserIdTwo().isEmpty()) { + userIdTwo_ = other.userIdTwo_; + bitField0_ |= 0x00000400; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + messageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getCodeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getCreateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getPersistentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + roomName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + userIdOne_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + userIdTwo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object messageId_ = ""; + /** + *
+     * The unique ID assigned to the message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unique ID assigned to the message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unique ID assigned to the message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The unique ID assigned to the message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return This builder for chaining. + */ + public Builder clearMessageId() { + messageId_ = getDefaultInstance().getMessageId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The unique ID assigned to the message.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Int32Value code_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> codeBuilder_; + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return Whether the code field is set. + */ + public boolean hasCode() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return The code. + */ + public com.google.protobuf.Int32Value getCode() { + if (codeBuilder_ == null) { + return code_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } else { + return codeBuilder_.getMessage(); + } + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder setCode(com.google.protobuf.Int32Value value) { + if (codeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + } else { + codeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder setCode( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (codeBuilder_ == null) { + code_ = builderForValue.build(); + } else { + codeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder mergeCode(com.google.protobuf.Int32Value value) { + if (codeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + code_ != null && + code_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getCodeBuilder().mergeFrom(value); + } else { + code_ = value; + } + } else { + codeBuilder_.mergeFrom(value); + } + if (code_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000004); + code_ = null; + if (codeBuilder_ != null) { + codeBuilder_.dispose(); + codeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public com.google.protobuf.Int32Value.Builder getCodeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCodeFieldBuilder().getBuilder(); + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getCodeOrBuilder() { + if (codeBuilder_ != null) { + return codeBuilder_.getMessageOrBuilder(); + } else { + return code_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : code_; + } + } + /** + *
+     * The code representing a message type or category.
+     * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getCodeFieldBuilder() { + if (codeBuilder_ == null) { + codeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getCode(), + getParentForChildren(), + isClean()); + code_ = null; + } + return codeBuilder_; + } + + private java.lang.Object username_ = ""; + /** + *
+     * Username of the message sender.
+     * 
+ * + * string username = 4 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Username of the message sender.
+     * 
+ * + * string username = 4 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Username of the message sender.
+     * 
+ * + * string username = 4 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Username of the message sender.
+     * 
+ * + * string username = 4 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Username of the message sender.
+     * 
+ * + * string username = 4 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + createTime_ != null && + createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + updateTime_ != null && + updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.BoolValue persistent_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> persistentBuilder_; + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + * @return Whether the persistent field is set. + */ + public boolean hasPersistent() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + * @return The persistent. + */ + public com.google.protobuf.BoolValue getPersistent() { + if (persistentBuilder_ == null) { + return persistent_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } else { + return persistentBuilder_.getMessage(); + } + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + public Builder setPersistent(com.google.protobuf.BoolValue value) { + if (persistentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + persistent_ = value; + } else { + persistentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + public Builder setPersistent( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (persistentBuilder_ == null) { + persistent_ = builderForValue.build(); + } else { + persistentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + public Builder mergePersistent(com.google.protobuf.BoolValue value) { + if (persistentBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + persistent_ != null && + persistent_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getPersistentBuilder().mergeFrom(value); + } else { + persistent_ = value; + } + } else { + persistentBuilder_.mergeFrom(value); + } + if (persistent_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + public Builder clearPersistent() { + bitField0_ = (bitField0_ & ~0x00000040); + persistent_ = null; + if (persistentBuilder_ != null) { + persistentBuilder_.dispose(); + persistentBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + public com.google.protobuf.BoolValue.Builder getPersistentBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getPersistentFieldBuilder().getBuilder(); + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + public com.google.protobuf.BoolValueOrBuilder getPersistentOrBuilder() { + if (persistentBuilder_ != null) { + return persistentBuilder_.getMessageOrBuilder(); + } else { + return persistent_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : persistent_; + } + } + /** + *
+     * True if the message was persisted to the channel's history, false otherwise.
+     * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getPersistentFieldBuilder() { + if (persistentBuilder_ == null) { + persistentBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getPersistent(), + getParentForChildren(), + isClean()); + persistent_ = null; + } + return persistentBuilder_; + } + + private java.lang.Object roomName_ = ""; + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @return The roomName. + */ + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @param value The roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + roomName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @return This builder for chaining. + */ + public Builder clearRoomName() { + roomName_ = getDefaultInstance().getRoomName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @param value The bytes for roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + roomName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object userIdOne_ = ""; + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @param value The userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOne( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdOne_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @return This builder for chaining. + */ + public Builder clearUserIdOne() { + userIdOne_ = getDefaultInstance().getUserIdOne(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @param value The bytes for userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdOne_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object userIdTwo_ = ""; + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @param value The userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdTwo_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @return This builder for chaining. + */ + public Builder clearUserIdTwo() { + userIdTwo_ = getDefaultInstance().getUserIdTwo(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @param value The bytes for userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdTwo_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.ChannelMessageAck) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.ChannelMessageAck) + private static final com.heroiclabs.nakama.rtapi.ChannelMessageAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.ChannelMessageAck(); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelMessageAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAckOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAckOrBuilder.java new file mode 100644 index 00000000..8f02b4cb --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageAckOrBuilder.java @@ -0,0 +1,259 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelMessageAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.ChannelMessageAck) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * The unique ID assigned to the message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + java.lang.String getMessageId(); + /** + *
+   * The unique ID assigned to the message.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString + getMessageIdBytes(); + + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return Whether the code field is set. + */ + boolean hasCode(); + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + * @return The code. + */ + com.google.protobuf.Int32Value getCode(); + /** + *
+   * The code representing a message type or category.
+   * 
+ * + * .google.protobuf.Int32Value code = 3 [json_name = "code"]; + */ + com.google.protobuf.Int32ValueOrBuilder getCodeOrBuilder(); + + /** + *
+   * Username of the message sender.
+   * 
+ * + * string username = 4 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * Username of the message sender.
+   * 
+ * + * string username = 4 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [json_name = "createTime"]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [json_name = "updateTime"]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + * @return Whether the persistent field is set. + */ + boolean hasPersistent(); + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + * @return The persistent. + */ + com.google.protobuf.BoolValue getPersistent(); + /** + *
+   * True if the message was persisted to the channel's history, false otherwise.
+   * 
+ * + * .google.protobuf.BoolValue persistent = 7 [json_name = "persistent"]; + */ + com.google.protobuf.BoolValueOrBuilder getPersistentOrBuilder(); + + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @return The roomName. + */ + java.lang.String getRoomName(); + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 8 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + com.google.protobuf.ByteString + getRoomNameBytes(); + + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 9 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + java.lang.String getUserIdOne(); + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 10 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + com.google.protobuf.ByteString + getUserIdOneBytes(); + + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + java.lang.String getUserIdTwo(); + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 11 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + com.google.protobuf.ByteString + getUserIdTwoBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemove.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemove.java new file mode 100644 index 00000000..f4205a26 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemove.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Remove a message previously sent to a realtime channel.
+ * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageRemove} + */ +public final class ChannelMessageRemove extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.ChannelMessageRemove) + ChannelMessageRemoveOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelMessageRemove.class.getName()); + } + // Use ChannelMessageRemove.newBuilder() to construct. + private ChannelMessageRemove(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelMessageRemove() { + channelId_ = ""; + messageId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageRemove.class, com.heroiclabs.nakama.rtapi.ChannelMessageRemove.Builder.class); + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object messageId_ = ""; + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } + } + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, messageId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, messageId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.ChannelMessageRemove)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.ChannelMessageRemove other = (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (!getMessageId() + .equals(other.getMessageId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + hash = (37 * hash) + MESSAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMessageId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.ChannelMessageRemove prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Remove a message previously sent to a realtime channel.
+   * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageRemove} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.ChannelMessageRemove) + com.heroiclabs.nakama.rtapi.ChannelMessageRemoveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageRemove.class, com.heroiclabs.nakama.rtapi.ChannelMessageRemove.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.ChannelMessageRemove.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + messageId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageRemove_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemove getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemove build() { + com.heroiclabs.nakama.rtapi.ChannelMessageRemove result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemove buildPartial() { + com.heroiclabs.nakama.rtapi.ChannelMessageRemove result = new com.heroiclabs.nakama.rtapi.ChannelMessageRemove(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.ChannelMessageRemove result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messageId_ = messageId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.ChannelMessageRemove) { + return mergeFrom((com.heroiclabs.nakama.rtapi.ChannelMessageRemove)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.ChannelMessageRemove other) { + if (other == com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMessageId().isEmpty()) { + messageId_ = other.messageId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + messageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object messageId_ = ""; + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return This builder for chaining. + */ + public Builder clearMessageId() { + messageId_ = getDefaultInstance().getMessageId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.ChannelMessageRemove) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.ChannelMessageRemove) + private static final com.heroiclabs.nakama.rtapi.ChannelMessageRemove DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.ChannelMessageRemove(); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageRemove getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelMessageRemove parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemove getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemoveOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemoveOrBuilder.java new file mode 100644 index 00000000..b8394540 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageRemoveOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelMessageRemoveOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.ChannelMessageRemove) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + java.lang.String getMessageId(); + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString + getMessageIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSend.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSend.java new file mode 100644 index 00000000..140eebc1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSend.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Send a message to a realtime channel.
+ * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageSend} + */ +public final class ChannelMessageSend extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.ChannelMessageSend) + ChannelMessageSendOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelMessageSend.class.getName()); + } + // Use ChannelMessageSend.newBuilder() to construct. + private ChannelMessageSend(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelMessageSend() { + channelId_ = ""; + content_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageSend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageSend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageSend.class, com.heroiclabs.nakama.rtapi.ChannelMessageSend.Builder.class); + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The channel to sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The channel to sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + *
+   * Message content.
+   * 
+ * + * string content = 2 [json_name = "content"]; + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + *
+   * Message content.
+   * 
+ * + * string content = 2 [json_name = "content"]; + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.ChannelMessageSend)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.ChannelMessageSend other = (com.heroiclabs.nakama.rtapi.ChannelMessageSend) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.ChannelMessageSend prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send a message to a realtime channel.
+   * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageSend} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.ChannelMessageSend) + com.heroiclabs.nakama.rtapi.ChannelMessageSendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageSend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageSend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageSend.class, com.heroiclabs.nakama.rtapi.ChannelMessageSend.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.ChannelMessageSend.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageSend_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSend getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSend build() { + com.heroiclabs.nakama.rtapi.ChannelMessageSend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSend buildPartial() { + com.heroiclabs.nakama.rtapi.ChannelMessageSend result = new com.heroiclabs.nakama.rtapi.ChannelMessageSend(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.ChannelMessageSend result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.ChannelMessageSend) { + return mergeFrom((com.heroiclabs.nakama.rtapi.ChannelMessageSend)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.ChannelMessageSend other) { + if (other == com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The channel to sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The channel to sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The channel to sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The channel to sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The channel to sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + *
+     * Message content.
+     * 
+ * + * string content = 2 [json_name = "content"]; + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Message content.
+     * 
+ * + * string content = 2 [json_name = "content"]; + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Message content.
+     * 
+ * + * string content = 2 [json_name = "content"]; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Message content.
+     * 
+ * + * string content = 2 [json_name = "content"]; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Message content.
+     * 
+ * + * string content = 2 [json_name = "content"]; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.ChannelMessageSend) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.ChannelMessageSend) + private static final com.heroiclabs.nakama.rtapi.ChannelMessageSend DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.ChannelMessageSend(); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageSend getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelMessageSend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSend getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSendOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSendOrBuilder.java new file mode 100644 index 00000000..74321814 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageSendOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelMessageSendOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.ChannelMessageSend) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel to sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The channel to sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * Message content.
+   * 
+ * + * string content = 2 [json_name = "content"]; + * @return The content. + */ + java.lang.String getContent(); + /** + *
+   * Message content.
+   * 
+ * + * string content = 2 [json_name = "content"]; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdate.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdate.java new file mode 100644 index 00000000..670284d9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdate.java @@ -0,0 +1,865 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Update a message previously sent to a realtime channel.
+ * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageUpdate} + */ +public final class ChannelMessageUpdate extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.ChannelMessageUpdate) + ChannelMessageUpdateOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelMessageUpdate.class.getName()); + } + // Use ChannelMessageUpdate.newBuilder() to construct. + private ChannelMessageUpdate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelMessageUpdate() { + channelId_ = ""; + messageId_ = ""; + content_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.class, com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.Builder.class); + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object messageId_ = ""; + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } + } + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + *
+   * New message content.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + *
+   * New message content.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, messageId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, messageId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.ChannelMessageUpdate)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate other = (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (!getMessageId() + .equals(other.getMessageId())) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + hash = (37 * hash) + MESSAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMessageId().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.ChannelMessageUpdate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Update a message previously sent to a realtime channel.
+   * 
+ * + * Protobuf type {@code nakama.realtime.ChannelMessageUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.ChannelMessageUpdate) + com.heroiclabs.nakama.rtapi.ChannelMessageUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.class, com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + messageId_ = ""; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelMessageUpdate_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdate getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdate build() { + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdate buildPartial() { + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate result = new com.heroiclabs.nakama.rtapi.ChannelMessageUpdate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.ChannelMessageUpdate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messageId_ = messageId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) { + return mergeFrom((com.heroiclabs.nakama.rtapi.ChannelMessageUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.ChannelMessageUpdate other) { + if (other == com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMessageId().isEmpty()) { + messageId_ = other.messageId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + messageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The channel the message was sent to.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object messageId_ = ""; + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return This builder for chaining. + */ + public Builder clearMessageId() { + messageId_ = getDefaultInstance().getMessageId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ID assigned to the message to update.
+     * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + messageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + *
+     * New message content.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * New message content.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * New message content.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * New message content.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * New message content.
+     * 
+ * + * string content = 3 [json_name = "content"]; + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.ChannelMessageUpdate) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.ChannelMessageUpdate) + private static final com.heroiclabs.nakama.rtapi.ChannelMessageUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.ChannelMessageUpdate(); + } + + public static com.heroiclabs.nakama.rtapi.ChannelMessageUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelMessageUpdate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdateOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdateOrBuilder.java new file mode 100644 index 00000000..ce9604e1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelMessageUpdateOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelMessageUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.ChannelMessageUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The channel the message was sent to.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The messageId. + */ + java.lang.String getMessageId(); + /** + *
+   * The ID assigned to the message to update.
+   * 
+ * + * string message_id = 2 [json_name = "messageId"]; + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString + getMessageIdBytes(); + + /** + *
+   * New message content.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The content. + */ + java.lang.String getContent(); + /** + *
+   * New message content.
+   * 
+ * + * string content = 3 [json_name = "content"]; + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelOrBuilder.java new file mode 100644 index 00000000..fe7c634c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelOrBuilder.java @@ -0,0 +1,182 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Channel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the channel.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The ID of the channel.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + java.util.List + getPresencesList(); + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index); + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + int getPresencesCount(); + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + java.util.List + getPresencesOrBuilderList(); + /** + *
+   * The users currently in the channel.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index); + + /** + *
+   * A reference to the current user's presence in the channel.
+   * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + * @return Whether the self field is set. + */ + boolean hasSelf(); + /** + *
+   * A reference to the current user's presence in the channel.
+   * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + * @return The self. + */ + com.heroiclabs.nakama.rtapi.UserPresence getSelf(); + /** + *
+   * A reference to the current user's presence in the channel.
+   * 
+ * + * .nakama.realtime.UserPresence self = 3 [json_name = "self"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder(); + + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The roomName. + */ + java.lang.String getRoomName(); + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + com.google.protobuf.ByteString + getRoomNameBytes(); + + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + java.lang.String getUserIdOne(); + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + com.google.protobuf.ByteString + getUserIdOneBytes(); + + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + java.lang.String getUserIdTwo(); + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + com.google.protobuf.ByteString + getUserIdTwoBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEvent.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEvent.java new file mode 100644 index 00000000..2705c024 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEvent.java @@ -0,0 +1,2081 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A set of joins and leaves on a particular channel.
+ * 
+ * + * Protobuf type {@code nakama.realtime.ChannelPresenceEvent} + */ +public final class ChannelPresenceEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.ChannelPresenceEvent) + ChannelPresenceEventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ChannelPresenceEvent.class.getName()); + } + // Use ChannelPresenceEvent.newBuilder() to construct. + private ChannelPresenceEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ChannelPresenceEvent() { + channelId_ = ""; + joins_ = java.util.Collections.emptyList(); + leaves_ = java.util.Collections.emptyList(); + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.class, com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.Builder.class); + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + *
+   * The channel identifier this event is for.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } + } + /** + *
+   * The channel identifier this event is for.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOINS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List joins_; + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List getJoinsList() { + return joins_; + } + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List + getJoinsOrBuilderList() { + return joins_; + } + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public int getJoinsCount() { + return joins_.size(); + } + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + return joins_.get(index); + } + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + return joins_.get(index); + } + + public static final int LEAVES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List leaves_; + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List getLeavesList() { + return leaves_; + } + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List + getLeavesOrBuilderList() { + return leaves_; + } + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public int getLeavesCount() { + return leaves_.size(); + } + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + return leaves_.get(index); + } + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + return leaves_.get(index); + } + + public static final int ROOM_NAME_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object roomName_ = ""; + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The roomName. + */ + @java.lang.Override + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } + } + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object groupId_ = ""; + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } + } + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_ONE_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdOne_ = ""; + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + @java.lang.Override + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } + } + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_TWO_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object userIdTwo_ = ""; + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + @java.lang.Override + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } + } + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, channelId_); + } + for (int i = 0; i < joins_.size(); i++) { + output.writeMessage(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + output.writeMessage(3, leaves_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, userIdTwo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, channelId_); + } + for (int i = 0; i < joins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, leaves_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(roomName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, roomName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, groupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdOne_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, userIdOne_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userIdTwo_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, userIdTwo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.ChannelPresenceEvent)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent other = (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) obj; + + if (!getChannelId() + .equals(other.getChannelId())) return false; + if (!getJoinsList() + .equals(other.getJoinsList())) return false; + if (!getLeavesList() + .equals(other.getLeavesList())) return false; + if (!getRoomName() + .equals(other.getRoomName())) return false; + if (!getGroupId() + .equals(other.getGroupId())) return false; + if (!getUserIdOne() + .equals(other.getUserIdOne())) return false; + if (!getUserIdTwo() + .equals(other.getUserIdTwo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + if (getJoinsCount() > 0) { + hash = (37 * hash) + JOINS_FIELD_NUMBER; + hash = (53 * hash) + getJoinsList().hashCode(); + } + if (getLeavesCount() > 0) { + hash = (37 * hash) + LEAVES_FIELD_NUMBER; + hash = (53 * hash) + getLeavesList().hashCode(); + } + hash = (37 * hash) + ROOM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRoomName().hashCode(); + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + hash = (37 * hash) + USER_ID_ONE_FIELD_NUMBER; + hash = (53 * hash) + getUserIdOne().hashCode(); + hash = (37 * hash) + USER_ID_TWO_FIELD_NUMBER; + hash = (53 * hash) + getUserIdTwo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.ChannelPresenceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of joins and leaves on a particular channel.
+   * 
+ * + * Protobuf type {@code nakama.realtime.ChannelPresenceEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.ChannelPresenceEvent) + com.heroiclabs.nakama.rtapi.ChannelPresenceEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.class, com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channelId_ = ""; + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + } else { + joins_ = null; + joinsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + } else { + leaves_ = null; + leavesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + roomName_ = ""; + groupId_ = ""; + userIdOne_ = ""; + userIdTwo_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_ChannelPresenceEvent_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEvent getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEvent build() { + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEvent buildPartial() { + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent result = new com.heroiclabs.nakama.rtapi.ChannelPresenceEvent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.ChannelPresenceEvent result) { + if (joinsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + joins_ = java.util.Collections.unmodifiableList(joins_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.joins_ = joins_; + } else { + result.joins_ = joinsBuilder_.build(); + } + if (leavesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + leaves_ = java.util.Collections.unmodifiableList(leaves_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.leaves_ = leaves_; + } else { + result.leaves_ = leavesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.ChannelPresenceEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.roomName_ = roomName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.userIdOne_ = userIdOne_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userIdTwo_ = userIdTwo_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) { + return mergeFrom((com.heroiclabs.nakama.rtapi.ChannelPresenceEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.ChannelPresenceEvent other) { + if (other == com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance()) return this; + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (joinsBuilder_ == null) { + if (!other.joins_.isEmpty()) { + if (joins_.isEmpty()) { + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJoinsIsMutable(); + joins_.addAll(other.joins_); + } + onChanged(); + } + } else { + if (!other.joins_.isEmpty()) { + if (joinsBuilder_.isEmpty()) { + joinsBuilder_.dispose(); + joinsBuilder_ = null; + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + joinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getJoinsFieldBuilder() : null; + } else { + joinsBuilder_.addAllMessages(other.joins_); + } + } + } + if (leavesBuilder_ == null) { + if (!other.leaves_.isEmpty()) { + if (leaves_.isEmpty()) { + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLeavesIsMutable(); + leaves_.addAll(other.leaves_); + } + onChanged(); + } + } else { + if (!other.leaves_.isEmpty()) { + if (leavesBuilder_.isEmpty()) { + leavesBuilder_.dispose(); + leavesBuilder_ = null; + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + leavesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLeavesFieldBuilder() : null; + } else { + leavesBuilder_.addAllMessages(other.leaves_); + } + } + } + if (!other.getRoomName().isEmpty()) { + roomName_ = other.roomName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getGroupId().isEmpty()) { + groupId_ = other.groupId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUserIdOne().isEmpty()) { + userIdOne_ = other.userIdOne_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getUserIdTwo().isEmpty()) { + userIdTwo_ = other.userIdTwo_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(m); + } else { + joinsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(m); + } else { + leavesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + roomName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + groupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + userIdOne_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + userIdTwo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object channelId_ = ""; + /** + *
+     * The channel identifier this event is for.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The channel identifier this event is for.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString + getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The channel identifier this event is for.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The channel identifier this event is for.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The channel identifier this event is for.
+     * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List joins_ = + java.util.Collections.emptyList(); + private void ensureJoinsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + joins_ = new java.util.ArrayList(joins_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> joinsBuilder_; + + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List getJoinsList() { + if (joinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(joins_); + } else { + return joinsBuilder_.getMessageList(); + } + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public int getJoinsCount() { + if (joinsBuilder_ == null) { + return joins_.size(); + } else { + return joinsBuilder_.getCount(); + } + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); + } else { + return joinsBuilder_.getMessage(index); + } + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.set(index, value); + onChanged(); + } else { + joinsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.set(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(value); + onChanged(); + } else { + joinsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(index, value); + onChanged(); + } else { + joinsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addAllJoins( + java.lang.Iterable values) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, joins_); + onChanged(); + } else { + joinsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder clearJoins() { + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + joinsBuilder_.clear(); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder removeJoins(int index) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.remove(index); + onChanged(); + } else { + joinsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getJoinsBuilder( + int index) { + return getJoinsFieldBuilder().getBuilder(index); + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); } else { + return joinsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsOrBuilderList() { + if (joinsBuilder_ != null) { + return joinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(joins_); + } + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder() { + return getJoinsFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder( + int index) { + return getJoinsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences joining the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsBuilderList() { + return getJoinsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getJoinsFieldBuilder() { + if (joinsBuilder_ == null) { + joinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + joins_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + joins_ = null; + } + return joinsBuilder_; + } + + private java.util.List leaves_ = + java.util.Collections.emptyList(); + private void ensureLeavesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + leaves_ = new java.util.ArrayList(leaves_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> leavesBuilder_; + + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List getLeavesList() { + if (leavesBuilder_ == null) { + return java.util.Collections.unmodifiableList(leaves_); + } else { + return leavesBuilder_.getMessageList(); + } + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public int getLeavesCount() { + if (leavesBuilder_ == null) { + return leaves_.size(); + } else { + return leavesBuilder_.getCount(); + } + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); + } else { + return leavesBuilder_.getMessage(index); + } + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.set(index, value); + onChanged(); + } else { + leavesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.set(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(value); + onChanged(); + } else { + leavesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(index, value); + onChanged(); + } else { + leavesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addAllLeaves( + java.lang.Iterable values) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, leaves_); + onChanged(); + } else { + leavesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder clearLeaves() { + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + leavesBuilder_.clear(); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder removeLeaves(int index) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.remove(index); + onChanged(); + } else { + leavesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getLeavesBuilder( + int index) { + return getLeavesFieldBuilder().getBuilder(index); + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); } else { + return leavesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesOrBuilderList() { + if (leavesBuilder_ != null) { + return leavesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(leaves_); + } + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder() { + return getLeavesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder( + int index) { + return getLeavesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences leaving the channel as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesBuilderList() { + return getLeavesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getLeavesFieldBuilder() { + if (leavesBuilder_ == null) { + leavesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + leaves_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + leaves_ = null; + } + return leavesBuilder_; + } + + private java.lang.Object roomName_ = ""; + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The roomName. + */ + public java.lang.String getRoomName() { + java.lang.Object ref = roomName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roomName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + public com.google.protobuf.ByteString + getRoomNameBytes() { + java.lang.Object ref = roomName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + roomName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @param value The roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + roomName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return This builder for chaining. + */ + public Builder clearRoomName() { + roomName_ = getDefaultInstance().getRoomName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The name of the chat room, or an empty string if this message was not sent through a chat room.
+     * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @param value The bytes for roomName to set. + * @return This builder for chaining. + */ + public Builder setRoomNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + roomName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object groupId_ = ""; + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = groupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString + getGroupIdBytes() { + java.lang.Object ref = groupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + groupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + groupId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return This builder for chaining. + */ + public Builder clearGroupId() { + groupId_ = getDefaultInstance().getGroupId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+     * The ID of the group, or an empty string if this message was not sent through a group channel.
+     * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + groupId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object userIdOne_ = ""; + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + public java.lang.String getUserIdOne() { + java.lang.Object ref = userIdOne_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdOne_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + public com.google.protobuf.ByteString + getUserIdOneBytes() { + java.lang.Object ref = userIdOne_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdOne_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @param value The userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOne( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdOne_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return This builder for chaining. + */ + public Builder clearUserIdOne() { + userIdOne_ = getDefaultInstance().getUserIdOne(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @param value The bytes for userIdOne to set. + * @return This builder for chaining. + */ + public Builder setUserIdOneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdOne_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object userIdTwo_ = ""; + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + public java.lang.String getUserIdTwo() { + java.lang.Object ref = userIdTwo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIdTwo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + public com.google.protobuf.ByteString + getUserIdTwoBytes() { + java.lang.Object ref = userIdTwo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIdTwo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @param value The userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userIdTwo_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return This builder for chaining. + */ + public Builder clearUserIdTwo() { + userIdTwo_ = getDefaultInstance().getUserIdTwo(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+     * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @param value The bytes for userIdTwo to set. + * @return This builder for chaining. + */ + public Builder setUserIdTwoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userIdTwo_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.ChannelPresenceEvent) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.ChannelPresenceEvent) + private static final com.heroiclabs.nakama.rtapi.ChannelPresenceEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.ChannelPresenceEvent(); + } + + public static com.heroiclabs.nakama.rtapi.ChannelPresenceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelPresenceEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEventOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEventOrBuilder.java new file mode 100644 index 00000000..ae4da97f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ChannelPresenceEventOrBuilder.java @@ -0,0 +1,199 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ChannelPresenceEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.ChannelPresenceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The channel identifier this event is for.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * The channel identifier this event is for.
+   * 
+ * + * string channel_id = 1 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsList(); + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index); + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + int getJoinsCount(); + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsOrBuilderList(); + /** + *
+   * Presences joining the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index); + + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesList(); + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index); + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + int getLeavesCount(); + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesOrBuilderList(); + /** + *
+   * Presences leaving the channel as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index); + + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The roomName. + */ + java.lang.String getRoomName(); + /** + *
+   * The name of the chat room, or an empty string if this message was not sent through a chat room.
+   * 
+ * + * string room_name = 4 [json_name = "roomName"]; + * @return The bytes for roomName. + */ + com.google.protobuf.ByteString + getRoomNameBytes(); + + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The groupId. + */ + java.lang.String getGroupId(); + /** + *
+   * The ID of the group, or an empty string if this message was not sent through a group channel.
+   * 
+ * + * string group_id = 5 [json_name = "groupId"]; + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString + getGroupIdBytes(); + + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The userIdOne. + */ + java.lang.String getUserIdOne(); + /** + *
+   * The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_one = 6 [json_name = "userIdOne"]; + * @return The bytes for userIdOne. + */ + com.google.protobuf.ByteString + getUserIdOneBytes(); + + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The userIdTwo. + */ + java.lang.String getUserIdTwo(); + /** + *
+   * The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
+   * 
+ * + * string user_id_two = 7 [json_name = "userIdTwo"]; + * @return The bytes for userIdTwo. + */ + com.google.protobuf.ByteString + getUserIdTwoBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Envelope.java b/src/main/java/com/heroiclabs/nakama/rtapi/Envelope.java new file mode 100644 index 00000000..d9a80172 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Envelope.java @@ -0,0 +1,13135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * An envelope for a realtime message.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Envelope} + */ +public final class Envelope extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Envelope) + EnvelopeOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Envelope.class.getName()); + } + // Use Envelope.newBuilder() to construct. + private Envelope(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Envelope() { + cid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Envelope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Envelope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Envelope.class, com.heroiclabs.nakama.rtapi.Envelope.Builder.class); + } + + private int messageCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object message_; + public enum MessageCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHANNEL(2), + CHANNEL_JOIN(3), + CHANNEL_LEAVE(4), + CHANNEL_MESSAGE(5), + CHANNEL_MESSAGE_ACK(6), + CHANNEL_MESSAGE_SEND(7), + CHANNEL_MESSAGE_UPDATE(8), + CHANNEL_MESSAGE_REMOVE(9), + CHANNEL_PRESENCE_EVENT(10), + ERROR(11), + MATCH(12), + MATCH_CREATE(13), + MATCH_DATA(14), + MATCH_DATA_SEND(15), + MATCH_JOIN(16), + MATCH_LEAVE(17), + MATCH_PRESENCE_EVENT(18), + MATCHMAKER_ADD(19), + MATCHMAKER_MATCHED(20), + MATCHMAKER_REMOVE(21), + MATCHMAKER_TICKET(22), + NOTIFICATIONS(23), + RPC(24), + STATUS(25), + STATUS_FOLLOW(26), + STATUS_PRESENCE_EVENT(27), + STATUS_UNFOLLOW(28), + STATUS_UPDATE(29), + STREAM_DATA(30), + STREAM_PRESENCE_EVENT(31), + PING(32), + PONG(33), + PARTY(34), + PARTY_CREATE(35), + PARTY_JOIN(36), + PARTY_LEAVE(37), + PARTY_PROMOTE(38), + PARTY_LEADER(39), + PARTY_ACCEPT(40), + PARTY_REMOVE(41), + PARTY_CLOSE(42), + PARTY_JOIN_REQUEST_LIST(43), + PARTY_JOIN_REQUEST(44), + PARTY_MATCHMAKER_ADD(45), + PARTY_MATCHMAKER_REMOVE(46), + PARTY_MATCHMAKER_TICKET(47), + PARTY_DATA(48), + PARTY_DATA_SEND(49), + PARTY_PRESENCE_EVENT(50), + MESSAGE_NOT_SET(0); + private final int value; + private MessageCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MessageCase valueOf(int value) { + return forNumber(value); + } + + public static MessageCase forNumber(int value) { + switch (value) { + case 2: return CHANNEL; + case 3: return CHANNEL_JOIN; + case 4: return CHANNEL_LEAVE; + case 5: return CHANNEL_MESSAGE; + case 6: return CHANNEL_MESSAGE_ACK; + case 7: return CHANNEL_MESSAGE_SEND; + case 8: return CHANNEL_MESSAGE_UPDATE; + case 9: return CHANNEL_MESSAGE_REMOVE; + case 10: return CHANNEL_PRESENCE_EVENT; + case 11: return ERROR; + case 12: return MATCH; + case 13: return MATCH_CREATE; + case 14: return MATCH_DATA; + case 15: return MATCH_DATA_SEND; + case 16: return MATCH_JOIN; + case 17: return MATCH_LEAVE; + case 18: return MATCH_PRESENCE_EVENT; + case 19: return MATCHMAKER_ADD; + case 20: return MATCHMAKER_MATCHED; + case 21: return MATCHMAKER_REMOVE; + case 22: return MATCHMAKER_TICKET; + case 23: return NOTIFICATIONS; + case 24: return RPC; + case 25: return STATUS; + case 26: return STATUS_FOLLOW; + case 27: return STATUS_PRESENCE_EVENT; + case 28: return STATUS_UNFOLLOW; + case 29: return STATUS_UPDATE; + case 30: return STREAM_DATA; + case 31: return STREAM_PRESENCE_EVENT; + case 32: return PING; + case 33: return PONG; + case 34: return PARTY; + case 35: return PARTY_CREATE; + case 36: return PARTY_JOIN; + case 37: return PARTY_LEAVE; + case 38: return PARTY_PROMOTE; + case 39: return PARTY_LEADER; + case 40: return PARTY_ACCEPT; + case 41: return PARTY_REMOVE; + case 42: return PARTY_CLOSE; + case 43: return PARTY_JOIN_REQUEST_LIST; + case 44: return PARTY_JOIN_REQUEST; + case 45: return PARTY_MATCHMAKER_ADD; + case 46: return PARTY_MATCHMAKER_REMOVE; + case 47: return PARTY_MATCHMAKER_TICKET; + case 48: return PARTY_DATA; + case 49: return PARTY_DATA_SEND; + case 50: return PARTY_PRESENCE_EVENT; + case 0: return MESSAGE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MessageCase + getMessageCase() { + return MessageCase.forNumber( + messageCase_); + } + + public static final int CID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cid_ = ""; + /** + * string cid = 1 [json_name = "cid"]; + * @return The cid. + */ + @java.lang.Override + public java.lang.String getCid() { + java.lang.Object ref = cid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cid_ = s; + return s; + } + } + /** + * string cid = 1 [json_name = "cid"]; + * @return The bytes for cid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCidBytes() { + java.lang.Object ref = cid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANNEL_FIELD_NUMBER = 2; + /** + *
+   * A response from a channel join operation.
+   * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + * @return Whether the channel field is set. + */ + @java.lang.Override + public boolean hasChannel() { + return messageCase_ == 2; + } + /** + *
+   * A response from a channel join operation.
+   * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + * @return The channel. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Channel getChannel() { + if (messageCase_ == 2) { + return (com.heroiclabs.nakama.rtapi.Channel) message_; + } + return com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance(); + } + /** + *
+   * A response from a channel join operation.
+   * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelOrBuilder getChannelOrBuilder() { + if (messageCase_ == 2) { + return (com.heroiclabs.nakama.rtapi.Channel) message_; + } + return com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance(); + } + + public static final int CHANNEL_JOIN_FIELD_NUMBER = 3; + /** + *
+   * Join a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + * @return Whether the channelJoin field is set. + */ + @java.lang.Override + public boolean hasChannelJoin() { + return messageCase_ == 3; + } + /** + *
+   * Join a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + * @return The channelJoin. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoin getChannelJoin() { + if (messageCase_ == 3) { + return (com.heroiclabs.nakama.rtapi.ChannelJoin) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance(); + } + /** + *
+   * Join a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoinOrBuilder getChannelJoinOrBuilder() { + if (messageCase_ == 3) { + return (com.heroiclabs.nakama.rtapi.ChannelJoin) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance(); + } + + public static final int CHANNEL_LEAVE_FIELD_NUMBER = 4; + /** + *
+   * Leave a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + * @return Whether the channelLeave field is set. + */ + @java.lang.Override + public boolean hasChannelLeave() { + return messageCase_ == 4; + } + /** + *
+   * Leave a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + * @return The channelLeave. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeave getChannelLeave() { + if (messageCase_ == 4) { + return (com.heroiclabs.nakama.rtapi.ChannelLeave) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance(); + } + /** + *
+   * Leave a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeaveOrBuilder getChannelLeaveOrBuilder() { + if (messageCase_ == 4) { + return (com.heroiclabs.nakama.rtapi.ChannelLeave) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance(); + } + + public static final int CHANNEL_MESSAGE_FIELD_NUMBER = 5; + /** + *
+   * An incoming message on a realtime chat channel.
+   * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + * @return Whether the channelMessage field is set. + */ + @java.lang.Override + public boolean hasChannelMessage() { + return messageCase_ == 5; + } + /** + *
+   * An incoming message on a realtime chat channel.
+   * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + * @return The channelMessage. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessage getChannelMessage() { + if (messageCase_ == 5) { + return (com.heroiclabs.nakama.api.ChannelMessage) message_; + } + return com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance(); + } + /** + *
+   * An incoming message on a realtime chat channel.
+   * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessageOrBuilder getChannelMessageOrBuilder() { + if (messageCase_ == 5) { + return (com.heroiclabs.nakama.api.ChannelMessage) message_; + } + return com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance(); + } + + public static final int CHANNEL_MESSAGE_ACK_FIELD_NUMBER = 6; + /** + *
+   * An acknowledgement received in response to sending a message on a chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + * @return Whether the channelMessageAck field is set. + */ + @java.lang.Override + public boolean hasChannelMessageAck() { + return messageCase_ == 6; + } + /** + *
+   * An acknowledgement received in response to sending a message on a chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + * @return The channelMessageAck. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAck getChannelMessageAck() { + if (messageCase_ == 6) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance(); + } + /** + *
+   * An acknowledgement received in response to sending a message on a chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAckOrBuilder getChannelMessageAckOrBuilder() { + if (messageCase_ == 6) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance(); + } + + public static final int CHANNEL_MESSAGE_SEND_FIELD_NUMBER = 7; + /** + *
+   * Send a message to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + * @return Whether the channelMessageSend field is set. + */ + @java.lang.Override + public boolean hasChannelMessageSend() { + return messageCase_ == 7; + } + /** + *
+   * Send a message to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + * @return The channelMessageSend. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSend getChannelMessageSend() { + if (messageCase_ == 7) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance(); + } + /** + *
+   * Send a message to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSendOrBuilder getChannelMessageSendOrBuilder() { + if (messageCase_ == 7) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance(); + } + + public static final int CHANNEL_MESSAGE_UPDATE_FIELD_NUMBER = 8; + /** + *
+   * Update a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + * @return Whether the channelMessageUpdate field is set. + */ + @java.lang.Override + public boolean hasChannelMessageUpdate() { + return messageCase_ == 8; + } + /** + *
+   * Update a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + * @return The channelMessageUpdate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdate getChannelMessageUpdate() { + if (messageCase_ == 8) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance(); + } + /** + *
+   * Update a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdateOrBuilder getChannelMessageUpdateOrBuilder() { + if (messageCase_ == 8) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance(); + } + + public static final int CHANNEL_MESSAGE_REMOVE_FIELD_NUMBER = 9; + /** + *
+   * Remove a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + * @return Whether the channelMessageRemove field is set. + */ + @java.lang.Override + public boolean hasChannelMessageRemove() { + return messageCase_ == 9; + } + /** + *
+   * Remove a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + * @return The channelMessageRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemove getChannelMessageRemove() { + if (messageCase_ == 9) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance(); + } + /** + *
+   * Remove a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemoveOrBuilder getChannelMessageRemoveOrBuilder() { + if (messageCase_ == 9) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance(); + } + + public static final int CHANNEL_PRESENCE_EVENT_FIELD_NUMBER = 10; + /** + *
+   * Presence update for a particular realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + * @return Whether the channelPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasChannelPresenceEvent() { + return messageCase_ == 10; + } + /** + *
+   * Presence update for a particular realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + * @return The channelPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEvent getChannelPresenceEvent() { + if (messageCase_ == 10) { + return (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance(); + } + /** + *
+   * Presence update for a particular realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEventOrBuilder getChannelPresenceEventOrBuilder() { + if (messageCase_ == 10) { + return (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 11; + /** + *
+   * Describes an error which occurred on the server.
+   * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return messageCase_ == 11; + } + /** + *
+   * Describes an error which occurred on the server.
+   * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Error getError() { + if (messageCase_ == 11) { + return (com.heroiclabs.nakama.rtapi.Error) message_; + } + return com.heroiclabs.nakama.rtapi.Error.getDefaultInstance(); + } + /** + *
+   * Describes an error which occurred on the server.
+   * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ErrorOrBuilder getErrorOrBuilder() { + if (messageCase_ == 11) { + return (com.heroiclabs.nakama.rtapi.Error) message_; + } + return com.heroiclabs.nakama.rtapi.Error.getDefaultInstance(); + } + + public static final int MATCH_FIELD_NUMBER = 12; + /** + *
+   * Incoming information about a realtime match.
+   * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + * @return Whether the match field is set. + */ + @java.lang.Override + public boolean hasMatch() { + return messageCase_ == 12; + } + /** + *
+   * Incoming information about a realtime match.
+   * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + * @return The match. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Match getMatch() { + if (messageCase_ == 12) { + return (com.heroiclabs.nakama.rtapi.Match) message_; + } + return com.heroiclabs.nakama.rtapi.Match.getDefaultInstance(); + } + /** + *
+   * Incoming information about a realtime match.
+   * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchOrBuilder getMatchOrBuilder() { + if (messageCase_ == 12) { + return (com.heroiclabs.nakama.rtapi.Match) message_; + } + return com.heroiclabs.nakama.rtapi.Match.getDefaultInstance(); + } + + public static final int MATCH_CREATE_FIELD_NUMBER = 13; + /** + *
+   * A client to server request to create a realtime match.
+   * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + * @return Whether the matchCreate field is set. + */ + @java.lang.Override + public boolean hasMatchCreate() { + return messageCase_ == 13; + } + /** + *
+   * A client to server request to create a realtime match.
+   * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + * @return The matchCreate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreate getMatchCreate() { + if (messageCase_ == 13) { + return (com.heroiclabs.nakama.rtapi.MatchCreate) message_; + } + return com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance(); + } + /** + *
+   * A client to server request to create a realtime match.
+   * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreateOrBuilder getMatchCreateOrBuilder() { + if (messageCase_ == 13) { + return (com.heroiclabs.nakama.rtapi.MatchCreate) message_; + } + return com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance(); + } + + public static final int MATCH_DATA_FIELD_NUMBER = 14; + /** + *
+   * Incoming realtime match data delivered from the server.
+   * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + * @return Whether the matchData field is set. + */ + @java.lang.Override + public boolean hasMatchData() { + return messageCase_ == 14; + } + /** + *
+   * Incoming realtime match data delivered from the server.
+   * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + * @return The matchData. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchData getMatchData() { + if (messageCase_ == 14) { + return (com.heroiclabs.nakama.rtapi.MatchData) message_; + } + return com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance(); + } + /** + *
+   * Incoming realtime match data delivered from the server.
+   * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataOrBuilder getMatchDataOrBuilder() { + if (messageCase_ == 14) { + return (com.heroiclabs.nakama.rtapi.MatchData) message_; + } + return com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance(); + } + + public static final int MATCH_DATA_SEND_FIELD_NUMBER = 15; + /** + *
+   * A client to server request to send data to a realtime match.
+   * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + * @return Whether the matchDataSend field is set. + */ + @java.lang.Override + public boolean hasMatchDataSend() { + return messageCase_ == 15; + } + /** + *
+   * A client to server request to send data to a realtime match.
+   * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + * @return The matchDataSend. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSend getMatchDataSend() { + if (messageCase_ == 15) { + return (com.heroiclabs.nakama.rtapi.MatchDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance(); + } + /** + *
+   * A client to server request to send data to a realtime match.
+   * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSendOrBuilder getMatchDataSendOrBuilder() { + if (messageCase_ == 15) { + return (com.heroiclabs.nakama.rtapi.MatchDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance(); + } + + public static final int MATCH_JOIN_FIELD_NUMBER = 16; + /** + *
+   * A client to server request to join a realtime match.
+   * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + * @return Whether the matchJoin field is set. + */ + @java.lang.Override + public boolean hasMatchJoin() { + return messageCase_ == 16; + } + /** + *
+   * A client to server request to join a realtime match.
+   * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + * @return The matchJoin. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoin getMatchJoin() { + if (messageCase_ == 16) { + return (com.heroiclabs.nakama.rtapi.MatchJoin) message_; + } + return com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance(); + } + /** + *
+   * A client to server request to join a realtime match.
+   * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoinOrBuilder getMatchJoinOrBuilder() { + if (messageCase_ == 16) { + return (com.heroiclabs.nakama.rtapi.MatchJoin) message_; + } + return com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance(); + } + + public static final int MATCH_LEAVE_FIELD_NUMBER = 17; + /** + *
+   * A client to server request to leave a realtime match.
+   * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + * @return Whether the matchLeave field is set. + */ + @java.lang.Override + public boolean hasMatchLeave() { + return messageCase_ == 17; + } + /** + *
+   * A client to server request to leave a realtime match.
+   * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + * @return The matchLeave. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeave getMatchLeave() { + if (messageCase_ == 17) { + return (com.heroiclabs.nakama.rtapi.MatchLeave) message_; + } + return com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance(); + } + /** + *
+   * A client to server request to leave a realtime match.
+   * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeaveOrBuilder getMatchLeaveOrBuilder() { + if (messageCase_ == 17) { + return (com.heroiclabs.nakama.rtapi.MatchLeave) message_; + } + return com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance(); + } + + public static final int MATCH_PRESENCE_EVENT_FIELD_NUMBER = 18; + /** + *
+   * Presence update for a particular realtime match.
+   * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + * @return Whether the matchPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasMatchPresenceEvent() { + return messageCase_ == 18; + } + /** + *
+   * Presence update for a particular realtime match.
+   * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + * @return The matchPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEvent getMatchPresenceEvent() { + if (messageCase_ == 18) { + return (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance(); + } + /** + *
+   * Presence update for a particular realtime match.
+   * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEventOrBuilder getMatchPresenceEventOrBuilder() { + if (messageCase_ == 18) { + return (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance(); + } + + public static final int MATCHMAKER_ADD_FIELD_NUMBER = 19; + /** + *
+   * Submit a new matchmaking process request.
+   * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + * @return Whether the matchmakerAdd field is set. + */ + @java.lang.Override + public boolean hasMatchmakerAdd() { + return messageCase_ == 19; + } + /** + *
+   * Submit a new matchmaking process request.
+   * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + * @return The matchmakerAdd. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAdd getMatchmakerAdd() { + if (messageCase_ == 19) { + return (com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance(); + } + /** + *
+   * Submit a new matchmaking process request.
+   * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAddOrBuilder getMatchmakerAddOrBuilder() { + if (messageCase_ == 19) { + return (com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance(); + } + + public static final int MATCHMAKER_MATCHED_FIELD_NUMBER = 20; + /** + *
+   * A successful matchmaking result.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + * @return Whether the matchmakerMatched field is set. + */ + @java.lang.Override + public boolean hasMatchmakerMatched() { + return messageCase_ == 20; + } + /** + *
+   * A successful matchmaking result.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + * @return The matchmakerMatched. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched getMatchmakerMatched() { + if (messageCase_ == 20) { + return (com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance(); + } + /** + *
+   * A successful matchmaking result.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatchedOrBuilder getMatchmakerMatchedOrBuilder() { + if (messageCase_ == 20) { + return (com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance(); + } + + public static final int MATCHMAKER_REMOVE_FIELD_NUMBER = 21; + /** + *
+   * Cancel a matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + * @return Whether the matchmakerRemove field is set. + */ + @java.lang.Override + public boolean hasMatchmakerRemove() { + return messageCase_ == 21; + } + /** + *
+   * Cancel a matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + * @return The matchmakerRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemove getMatchmakerRemove() { + if (messageCase_ == 21) { + return (com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance(); + } + /** + *
+   * Cancel a matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemoveOrBuilder getMatchmakerRemoveOrBuilder() { + if (messageCase_ == 21) { + return (com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance(); + } + + public static final int MATCHMAKER_TICKET_FIELD_NUMBER = 22; + /** + *
+   * A response from starting a new matchmaking process.
+   * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + * @return Whether the matchmakerTicket field is set. + */ + @java.lang.Override + public boolean hasMatchmakerTicket() { + return messageCase_ == 22; + } + /** + *
+   * A response from starting a new matchmaking process.
+   * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + * @return The matchmakerTicket. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicket getMatchmakerTicket() { + if (messageCase_ == 22) { + return (com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance(); + } + /** + *
+   * A response from starting a new matchmaking process.
+   * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicketOrBuilder getMatchmakerTicketOrBuilder() { + if (messageCase_ == 22) { + return (com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance(); + } + + public static final int NOTIFICATIONS_FIELD_NUMBER = 23; + /** + *
+   * Notifications send by the server.
+   * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + * @return Whether the notifications field is set. + */ + @java.lang.Override + public boolean hasNotifications() { + return messageCase_ == 23; + } + /** + *
+   * Notifications send by the server.
+   * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + * @return The notifications. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Notifications getNotifications() { + if (messageCase_ == 23) { + return (com.heroiclabs.nakama.rtapi.Notifications) message_; + } + return com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance(); + } + /** + *
+   * Notifications send by the server.
+   * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.NotificationsOrBuilder getNotificationsOrBuilder() { + if (messageCase_ == 23) { + return (com.heroiclabs.nakama.rtapi.Notifications) message_; + } + return com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance(); + } + + public static final int RPC_FIELD_NUMBER = 24; + /** + *
+   * RPC call or response.
+   * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + * @return Whether the rpc field is set. + */ + @java.lang.Override + public boolean hasRpc() { + return messageCase_ == 24; + } + /** + *
+   * RPC call or response.
+   * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + * @return The rpc. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Rpc getRpc() { + if (messageCase_ == 24) { + return (com.heroiclabs.nakama.api.Rpc) message_; + } + return com.heroiclabs.nakama.api.Rpc.getDefaultInstance(); + } + /** + *
+   * RPC call or response.
+   * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.RpcOrBuilder getRpcOrBuilder() { + if (messageCase_ == 24) { + return (com.heroiclabs.nakama.api.Rpc) message_; + } + return com.heroiclabs.nakama.api.Rpc.getDefaultInstance(); + } + + public static final int STATUS_FIELD_NUMBER = 25; + /** + *
+   * An incoming status snapshot for some set of users.
+   * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return messageCase_ == 25; + } + /** + *
+   * An incoming status snapshot for some set of users.
+   * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Status getStatus() { + if (messageCase_ == 25) { + return (com.heroiclabs.nakama.rtapi.Status) message_; + } + return com.heroiclabs.nakama.rtapi.Status.getDefaultInstance(); + } + /** + *
+   * An incoming status snapshot for some set of users.
+   * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusOrBuilder getStatusOrBuilder() { + if (messageCase_ == 25) { + return (com.heroiclabs.nakama.rtapi.Status) message_; + } + return com.heroiclabs.nakama.rtapi.Status.getDefaultInstance(); + } + + public static final int STATUS_FOLLOW_FIELD_NUMBER = 26; + /** + *
+   * Start following some set of users to receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + * @return Whether the statusFollow field is set. + */ + @java.lang.Override + public boolean hasStatusFollow() { + return messageCase_ == 26; + } + /** + *
+   * Start following some set of users to receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + * @return The statusFollow. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollow getStatusFollow() { + if (messageCase_ == 26) { + return (com.heroiclabs.nakama.rtapi.StatusFollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance(); + } + /** + *
+   * Start following some set of users to receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollowOrBuilder getStatusFollowOrBuilder() { + if (messageCase_ == 26) { + return (com.heroiclabs.nakama.rtapi.StatusFollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance(); + } + + public static final int STATUS_PRESENCE_EVENT_FIELD_NUMBER = 27; + /** + *
+   * An incoming status update.
+   * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + * @return Whether the statusPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasStatusPresenceEvent() { + return messageCase_ == 27; + } + /** + *
+   * An incoming status update.
+   * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + * @return The statusPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEvent getStatusPresenceEvent() { + if (messageCase_ == 27) { + return (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance(); + } + /** + *
+   * An incoming status update.
+   * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEventOrBuilder getStatusPresenceEventOrBuilder() { + if (messageCase_ == 27) { + return (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance(); + } + + public static final int STATUS_UNFOLLOW_FIELD_NUMBER = 28; + /** + *
+   * Stop following some set of users to no longer receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + * @return Whether the statusUnfollow field is set. + */ + @java.lang.Override + public boolean hasStatusUnfollow() { + return messageCase_ == 28; + } + /** + *
+   * Stop following some set of users to no longer receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + * @return The statusUnfollow. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollow getStatusUnfollow() { + if (messageCase_ == 28) { + return (com.heroiclabs.nakama.rtapi.StatusUnfollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance(); + } + /** + *
+   * Stop following some set of users to no longer receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollowOrBuilder getStatusUnfollowOrBuilder() { + if (messageCase_ == 28) { + return (com.heroiclabs.nakama.rtapi.StatusUnfollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance(); + } + + public static final int STATUS_UPDATE_FIELD_NUMBER = 29; + /** + *
+   * Set the user's own status.
+   * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + * @return Whether the statusUpdate field is set. + */ + @java.lang.Override + public boolean hasStatusUpdate() { + return messageCase_ == 29; + } + /** + *
+   * Set the user's own status.
+   * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + * @return The statusUpdate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdate getStatusUpdate() { + if (messageCase_ == 29) { + return (com.heroiclabs.nakama.rtapi.StatusUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance(); + } + /** + *
+   * Set the user's own status.
+   * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdateOrBuilder getStatusUpdateOrBuilder() { + if (messageCase_ == 29) { + return (com.heroiclabs.nakama.rtapi.StatusUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance(); + } + + public static final int STREAM_DATA_FIELD_NUMBER = 30; + /** + *
+   * A data message delivered over a stream.
+   * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + * @return Whether the streamData field is set. + */ + @java.lang.Override + public boolean hasStreamData() { + return messageCase_ == 30; + } + /** + *
+   * A data message delivered over a stream.
+   * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + * @return The streamData. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamData getStreamData() { + if (messageCase_ == 30) { + return (com.heroiclabs.nakama.rtapi.StreamData) message_; + } + return com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance(); + } + /** + *
+   * A data message delivered over a stream.
+   * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamDataOrBuilder getStreamDataOrBuilder() { + if (messageCase_ == 30) { + return (com.heroiclabs.nakama.rtapi.StreamData) message_; + } + return com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance(); + } + + public static final int STREAM_PRESENCE_EVENT_FIELD_NUMBER = 31; + /** + *
+   * Presence update for a particular stream.
+   * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + * @return Whether the streamPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasStreamPresenceEvent() { + return messageCase_ == 31; + } + /** + *
+   * Presence update for a particular stream.
+   * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + * @return The streamPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEvent getStreamPresenceEvent() { + if (messageCase_ == 31) { + return (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance(); + } + /** + *
+   * Presence update for a particular stream.
+   * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEventOrBuilder getStreamPresenceEventOrBuilder() { + if (messageCase_ == 31) { + return (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance(); + } + + public static final int PING_FIELD_NUMBER = 32; + /** + *
+   * Application-level heartbeat and connection check.
+   * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + * @return Whether the ping field is set. + */ + @java.lang.Override + public boolean hasPing() { + return messageCase_ == 32; + } + /** + *
+   * Application-level heartbeat and connection check.
+   * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + * @return The ping. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Ping getPing() { + if (messageCase_ == 32) { + return (com.heroiclabs.nakama.rtapi.Ping) message_; + } + return com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance(); + } + /** + *
+   * Application-level heartbeat and connection check.
+   * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PingOrBuilder getPingOrBuilder() { + if (messageCase_ == 32) { + return (com.heroiclabs.nakama.rtapi.Ping) message_; + } + return com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance(); + } + + public static final int PONG_FIELD_NUMBER = 33; + /** + *
+   * Application-level heartbeat and connection check response.
+   * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + * @return Whether the pong field is set. + */ + @java.lang.Override + public boolean hasPong() { + return messageCase_ == 33; + } + /** + *
+   * Application-level heartbeat and connection check response.
+   * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + * @return The pong. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Pong getPong() { + if (messageCase_ == 33) { + return (com.heroiclabs.nakama.rtapi.Pong) message_; + } + return com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance(); + } + /** + *
+   * Application-level heartbeat and connection check response.
+   * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PongOrBuilder getPongOrBuilder() { + if (messageCase_ == 33) { + return (com.heroiclabs.nakama.rtapi.Pong) message_; + } + return com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance(); + } + + public static final int PARTY_FIELD_NUMBER = 34; + /** + *
+   * Incoming information about a party.
+   * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + * @return Whether the party field is set. + */ + @java.lang.Override + public boolean hasParty() { + return messageCase_ == 34; + } + /** + *
+   * Incoming information about a party.
+   * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + * @return The party. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Party getParty() { + if (messageCase_ == 34) { + return (com.heroiclabs.nakama.rtapi.Party) message_; + } + return com.heroiclabs.nakama.rtapi.Party.getDefaultInstance(); + } + /** + *
+   * Incoming information about a party.
+   * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyOrBuilder getPartyOrBuilder() { + if (messageCase_ == 34) { + return (com.heroiclabs.nakama.rtapi.Party) message_; + } + return com.heroiclabs.nakama.rtapi.Party.getDefaultInstance(); + } + + public static final int PARTY_CREATE_FIELD_NUMBER = 35; + /** + *
+   * Create a party.
+   * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + * @return Whether the partyCreate field is set. + */ + @java.lang.Override + public boolean hasPartyCreate() { + return messageCase_ == 35; + } + /** + *
+   * Create a party.
+   * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + * @return The partyCreate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreate getPartyCreate() { + if (messageCase_ == 35) { + return (com.heroiclabs.nakama.rtapi.PartyCreate) message_; + } + return com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance(); + } + /** + *
+   * Create a party.
+   * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreateOrBuilder getPartyCreateOrBuilder() { + if (messageCase_ == 35) { + return (com.heroiclabs.nakama.rtapi.PartyCreate) message_; + } + return com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance(); + } + + public static final int PARTY_JOIN_FIELD_NUMBER = 36; + /** + *
+   * Join a party, or request to join if the party is not open.
+   * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + * @return Whether the partyJoin field is set. + */ + @java.lang.Override + public boolean hasPartyJoin() { + return messageCase_ == 36; + } + /** + *
+   * Join a party, or request to join if the party is not open.
+   * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + * @return The partyJoin. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoin getPartyJoin() { + if (messageCase_ == 36) { + return (com.heroiclabs.nakama.rtapi.PartyJoin) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance(); + } + /** + *
+   * Join a party, or request to join if the party is not open.
+   * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinOrBuilder getPartyJoinOrBuilder() { + if (messageCase_ == 36) { + return (com.heroiclabs.nakama.rtapi.PartyJoin) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance(); + } + + public static final int PARTY_LEAVE_FIELD_NUMBER = 37; + /** + *
+   * Leave a party.
+   * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + * @return Whether the partyLeave field is set. + */ + @java.lang.Override + public boolean hasPartyLeave() { + return messageCase_ == 37; + } + /** + *
+   * Leave a party.
+   * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + * @return The partyLeave. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeave getPartyLeave() { + if (messageCase_ == 37) { + return (com.heroiclabs.nakama.rtapi.PartyLeave) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance(); + } + /** + *
+   * Leave a party.
+   * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeaveOrBuilder getPartyLeaveOrBuilder() { + if (messageCase_ == 37) { + return (com.heroiclabs.nakama.rtapi.PartyLeave) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance(); + } + + public static final int PARTY_PROMOTE_FIELD_NUMBER = 38; + /** + *
+   * Promote a new party leader.
+   * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + * @return Whether the partyPromote field is set. + */ + @java.lang.Override + public boolean hasPartyPromote() { + return messageCase_ == 38; + } + /** + *
+   * Promote a new party leader.
+   * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + * @return The partyPromote. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromote getPartyPromote() { + if (messageCase_ == 38) { + return (com.heroiclabs.nakama.rtapi.PartyPromote) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance(); + } + /** + *
+   * Promote a new party leader.
+   * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromoteOrBuilder getPartyPromoteOrBuilder() { + if (messageCase_ == 38) { + return (com.heroiclabs.nakama.rtapi.PartyPromote) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance(); + } + + public static final int PARTY_LEADER_FIELD_NUMBER = 39; + /** + *
+   * Announcement of a new party leader.
+   * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + * @return Whether the partyLeader field is set. + */ + @java.lang.Override + public boolean hasPartyLeader() { + return messageCase_ == 39; + } + /** + *
+   * Announcement of a new party leader.
+   * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + * @return The partyLeader. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeader getPartyLeader() { + if (messageCase_ == 39) { + return (com.heroiclabs.nakama.rtapi.PartyLeader) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance(); + } + /** + *
+   * Announcement of a new party leader.
+   * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeaderOrBuilder getPartyLeaderOrBuilder() { + if (messageCase_ == 39) { + return (com.heroiclabs.nakama.rtapi.PartyLeader) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance(); + } + + public static final int PARTY_ACCEPT_FIELD_NUMBER = 40; + /** + *
+   * Accept a request to join.
+   * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + * @return Whether the partyAccept field is set. + */ + @java.lang.Override + public boolean hasPartyAccept() { + return messageCase_ == 40; + } + /** + *
+   * Accept a request to join.
+   * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + * @return The partyAccept. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAccept getPartyAccept() { + if (messageCase_ == 40) { + return (com.heroiclabs.nakama.rtapi.PartyAccept) message_; + } + return com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance(); + } + /** + *
+   * Accept a request to join.
+   * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAcceptOrBuilder getPartyAcceptOrBuilder() { + if (messageCase_ == 40) { + return (com.heroiclabs.nakama.rtapi.PartyAccept) message_; + } + return com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance(); + } + + public static final int PARTY_REMOVE_FIELD_NUMBER = 41; + /** + *
+   * Kick a party member, or decline a request to join.
+   * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + * @return Whether the partyRemove field is set. + */ + @java.lang.Override + public boolean hasPartyRemove() { + return messageCase_ == 41; + } + /** + *
+   * Kick a party member, or decline a request to join.
+   * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + * @return The partyRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemove getPartyRemove() { + if (messageCase_ == 41) { + return (com.heroiclabs.nakama.rtapi.PartyRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance(); + } + /** + *
+   * Kick a party member, or decline a request to join.
+   * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemoveOrBuilder getPartyRemoveOrBuilder() { + if (messageCase_ == 41) { + return (com.heroiclabs.nakama.rtapi.PartyRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance(); + } + + public static final int PARTY_CLOSE_FIELD_NUMBER = 42; + /** + *
+   * End a party, kicking all party members and closing it.
+   * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + * @return Whether the partyClose field is set. + */ + @java.lang.Override + public boolean hasPartyClose() { + return messageCase_ == 42; + } + /** + *
+   * End a party, kicking all party members and closing it.
+   * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + * @return The partyClose. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyClose getPartyClose() { + if (messageCase_ == 42) { + return (com.heroiclabs.nakama.rtapi.PartyClose) message_; + } + return com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance(); + } + /** + *
+   * End a party, kicking all party members and closing it.
+   * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCloseOrBuilder getPartyCloseOrBuilder() { + if (messageCase_ == 42) { + return (com.heroiclabs.nakama.rtapi.PartyClose) message_; + } + return com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance(); + } + + public static final int PARTY_JOIN_REQUEST_LIST_FIELD_NUMBER = 43; + /** + *
+   * Request a list of pending join requests for a party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + * @return Whether the partyJoinRequestList field is set. + */ + @java.lang.Override + public boolean hasPartyJoinRequestList() { + return messageCase_ == 43; + } + /** + *
+   * Request a list of pending join requests for a party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + * @return The partyJoinRequestList. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestList getPartyJoinRequestList() { + if (messageCase_ == 43) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance(); + } + /** + *
+   * Request a list of pending join requests for a party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestListOrBuilder getPartyJoinRequestListOrBuilder() { + if (messageCase_ == 43) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance(); + } + + public static final int PARTY_JOIN_REQUEST_FIELD_NUMBER = 44; + /** + *
+   * Incoming notification for one or more new presences attempting to join the party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + * @return Whether the partyJoinRequest field is set. + */ + @java.lang.Override + public boolean hasPartyJoinRequest() { + return messageCase_ == 44; + } + /** + *
+   * Incoming notification for one or more new presences attempting to join the party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + * @return The partyJoinRequest. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequest getPartyJoinRequest() { + if (messageCase_ == 44) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance(); + } + /** + *
+   * Incoming notification for one or more new presences attempting to join the party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestOrBuilder getPartyJoinRequestOrBuilder() { + if (messageCase_ == 44) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance(); + } + + public static final int PARTY_MATCHMAKER_ADD_FIELD_NUMBER = 45; + /** + *
+   * Begin matchmaking as a party.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + * @return Whether the partyMatchmakerAdd field is set. + */ + @java.lang.Override + public boolean hasPartyMatchmakerAdd() { + return messageCase_ == 45; + } + /** + *
+   * Begin matchmaking as a party.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + * @return The partyMatchmakerAdd. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd getPartyMatchmakerAdd() { + if (messageCase_ == 45) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance(); + } + /** + *
+   * Begin matchmaking as a party.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAddOrBuilder getPartyMatchmakerAddOrBuilder() { + if (messageCase_ == 45) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance(); + } + + public static final int PARTY_MATCHMAKER_REMOVE_FIELD_NUMBER = 46; + /** + *
+   * Cancel a party matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + * @return Whether the partyMatchmakerRemove field is set. + */ + @java.lang.Override + public boolean hasPartyMatchmakerRemove() { + return messageCase_ == 46; + } + /** + *
+   * Cancel a party matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + * @return The partyMatchmakerRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove getPartyMatchmakerRemove() { + if (messageCase_ == 46) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance(); + } + /** + *
+   * Cancel a party matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemoveOrBuilder getPartyMatchmakerRemoveOrBuilder() { + if (messageCase_ == 46) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance(); + } + + public static final int PARTY_MATCHMAKER_TICKET_FIELD_NUMBER = 47; + /** + *
+   * A response from starting a new party matchmaking process.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + * @return Whether the partyMatchmakerTicket field is set. + */ + @java.lang.Override + public boolean hasPartyMatchmakerTicket() { + return messageCase_ == 47; + } + /** + *
+   * A response from starting a new party matchmaking process.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + * @return The partyMatchmakerTicket. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket getPartyMatchmakerTicket() { + if (messageCase_ == 47) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance(); + } + /** + *
+   * A response from starting a new party matchmaking process.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicketOrBuilder getPartyMatchmakerTicketOrBuilder() { + if (messageCase_ == 47) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance(); + } + + public static final int PARTY_DATA_FIELD_NUMBER = 48; + /** + *
+   * Incoming party data delivered from the server.
+   * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + * @return Whether the partyData field is set. + */ + @java.lang.Override + public boolean hasPartyData() { + return messageCase_ == 48; + } + /** + *
+   * Incoming party data delivered from the server.
+   * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + * @return The partyData. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyData getPartyData() { + if (messageCase_ == 48) { + return (com.heroiclabs.nakama.rtapi.PartyData) message_; + } + return com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance(); + } + /** + *
+   * Incoming party data delivered from the server.
+   * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataOrBuilder getPartyDataOrBuilder() { + if (messageCase_ == 48) { + return (com.heroiclabs.nakama.rtapi.PartyData) message_; + } + return com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance(); + } + + public static final int PARTY_DATA_SEND_FIELD_NUMBER = 49; + /** + *
+   * A client to server request to send data to a party.
+   * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + * @return Whether the partyDataSend field is set. + */ + @java.lang.Override + public boolean hasPartyDataSend() { + return messageCase_ == 49; + } + /** + *
+   * A client to server request to send data to a party.
+   * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + * @return The partyDataSend. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSend getPartyDataSend() { + if (messageCase_ == 49) { + return (com.heroiclabs.nakama.rtapi.PartyDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance(); + } + /** + *
+   * A client to server request to send data to a party.
+   * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSendOrBuilder getPartyDataSendOrBuilder() { + if (messageCase_ == 49) { + return (com.heroiclabs.nakama.rtapi.PartyDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance(); + } + + public static final int PARTY_PRESENCE_EVENT_FIELD_NUMBER = 50; + /** + *
+   * Presence update for a particular party.
+   * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + * @return Whether the partyPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasPartyPresenceEvent() { + return messageCase_ == 50; + } + /** + *
+   * Presence update for a particular party.
+   * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + * @return The partyPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEvent getPartyPresenceEvent() { + if (messageCase_ == 50) { + return (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance(); + } + /** + *
+   * Presence update for a particular party.
+   * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEventOrBuilder getPartyPresenceEventOrBuilder() { + if (messageCase_ == 50) { + return (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, cid_); + } + if (messageCase_ == 2) { + output.writeMessage(2, (com.heroiclabs.nakama.rtapi.Channel) message_); + } + if (messageCase_ == 3) { + output.writeMessage(3, (com.heroiclabs.nakama.rtapi.ChannelJoin) message_); + } + if (messageCase_ == 4) { + output.writeMessage(4, (com.heroiclabs.nakama.rtapi.ChannelLeave) message_); + } + if (messageCase_ == 5) { + output.writeMessage(5, (com.heroiclabs.nakama.api.ChannelMessage) message_); + } + if (messageCase_ == 6) { + output.writeMessage(6, (com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_); + } + if (messageCase_ == 7) { + output.writeMessage(7, (com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_); + } + if (messageCase_ == 8) { + output.writeMessage(8, (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_); + } + if (messageCase_ == 9) { + output.writeMessage(9, (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_); + } + if (messageCase_ == 10) { + output.writeMessage(10, (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_); + } + if (messageCase_ == 11) { + output.writeMessage(11, (com.heroiclabs.nakama.rtapi.Error) message_); + } + if (messageCase_ == 12) { + output.writeMessage(12, (com.heroiclabs.nakama.rtapi.Match) message_); + } + if (messageCase_ == 13) { + output.writeMessage(13, (com.heroiclabs.nakama.rtapi.MatchCreate) message_); + } + if (messageCase_ == 14) { + output.writeMessage(14, (com.heroiclabs.nakama.rtapi.MatchData) message_); + } + if (messageCase_ == 15) { + output.writeMessage(15, (com.heroiclabs.nakama.rtapi.MatchDataSend) message_); + } + if (messageCase_ == 16) { + output.writeMessage(16, (com.heroiclabs.nakama.rtapi.MatchJoin) message_); + } + if (messageCase_ == 17) { + output.writeMessage(17, (com.heroiclabs.nakama.rtapi.MatchLeave) message_); + } + if (messageCase_ == 18) { + output.writeMessage(18, (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_); + } + if (messageCase_ == 19) { + output.writeMessage(19, (com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_); + } + if (messageCase_ == 20) { + output.writeMessage(20, (com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_); + } + if (messageCase_ == 21) { + output.writeMessage(21, (com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_); + } + if (messageCase_ == 22) { + output.writeMessage(22, (com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_); + } + if (messageCase_ == 23) { + output.writeMessage(23, (com.heroiclabs.nakama.rtapi.Notifications) message_); + } + if (messageCase_ == 24) { + output.writeMessage(24, (com.heroiclabs.nakama.api.Rpc) message_); + } + if (messageCase_ == 25) { + output.writeMessage(25, (com.heroiclabs.nakama.rtapi.Status) message_); + } + if (messageCase_ == 26) { + output.writeMessage(26, (com.heroiclabs.nakama.rtapi.StatusFollow) message_); + } + if (messageCase_ == 27) { + output.writeMessage(27, (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_); + } + if (messageCase_ == 28) { + output.writeMessage(28, (com.heroiclabs.nakama.rtapi.StatusUnfollow) message_); + } + if (messageCase_ == 29) { + output.writeMessage(29, (com.heroiclabs.nakama.rtapi.StatusUpdate) message_); + } + if (messageCase_ == 30) { + output.writeMessage(30, (com.heroiclabs.nakama.rtapi.StreamData) message_); + } + if (messageCase_ == 31) { + output.writeMessage(31, (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_); + } + if (messageCase_ == 32) { + output.writeMessage(32, (com.heroiclabs.nakama.rtapi.Ping) message_); + } + if (messageCase_ == 33) { + output.writeMessage(33, (com.heroiclabs.nakama.rtapi.Pong) message_); + } + if (messageCase_ == 34) { + output.writeMessage(34, (com.heroiclabs.nakama.rtapi.Party) message_); + } + if (messageCase_ == 35) { + output.writeMessage(35, (com.heroiclabs.nakama.rtapi.PartyCreate) message_); + } + if (messageCase_ == 36) { + output.writeMessage(36, (com.heroiclabs.nakama.rtapi.PartyJoin) message_); + } + if (messageCase_ == 37) { + output.writeMessage(37, (com.heroiclabs.nakama.rtapi.PartyLeave) message_); + } + if (messageCase_ == 38) { + output.writeMessage(38, (com.heroiclabs.nakama.rtapi.PartyPromote) message_); + } + if (messageCase_ == 39) { + output.writeMessage(39, (com.heroiclabs.nakama.rtapi.PartyLeader) message_); + } + if (messageCase_ == 40) { + output.writeMessage(40, (com.heroiclabs.nakama.rtapi.PartyAccept) message_); + } + if (messageCase_ == 41) { + output.writeMessage(41, (com.heroiclabs.nakama.rtapi.PartyRemove) message_); + } + if (messageCase_ == 42) { + output.writeMessage(42, (com.heroiclabs.nakama.rtapi.PartyClose) message_); + } + if (messageCase_ == 43) { + output.writeMessage(43, (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_); + } + if (messageCase_ == 44) { + output.writeMessage(44, (com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_); + } + if (messageCase_ == 45) { + output.writeMessage(45, (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_); + } + if (messageCase_ == 46) { + output.writeMessage(46, (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_); + } + if (messageCase_ == 47) { + output.writeMessage(47, (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_); + } + if (messageCase_ == 48) { + output.writeMessage(48, (com.heroiclabs.nakama.rtapi.PartyData) message_); + } + if (messageCase_ == 49) { + output.writeMessage(49, (com.heroiclabs.nakama.rtapi.PartyDataSend) message_); + } + if (messageCase_ == 50) { + output.writeMessage(50, (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, cid_); + } + if (messageCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.heroiclabs.nakama.rtapi.Channel) message_); + } + if (messageCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.heroiclabs.nakama.rtapi.ChannelJoin) message_); + } + if (messageCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.heroiclabs.nakama.rtapi.ChannelLeave) message_); + } + if (messageCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.heroiclabs.nakama.api.ChannelMessage) message_); + } + if (messageCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_); + } + if (messageCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_); + } + if (messageCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_); + } + if (messageCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_); + } + if (messageCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_); + } + if (messageCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (com.heroiclabs.nakama.rtapi.Error) message_); + } + if (messageCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (com.heroiclabs.nakama.rtapi.Match) message_); + } + if (messageCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (com.heroiclabs.nakama.rtapi.MatchCreate) message_); + } + if (messageCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (com.heroiclabs.nakama.rtapi.MatchData) message_); + } + if (messageCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (com.heroiclabs.nakama.rtapi.MatchDataSend) message_); + } + if (messageCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (com.heroiclabs.nakama.rtapi.MatchJoin) message_); + } + if (messageCase_ == 17) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, (com.heroiclabs.nakama.rtapi.MatchLeave) message_); + } + if (messageCase_ == 18) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_); + } + if (messageCase_ == 19) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, (com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_); + } + if (messageCase_ == 20) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, (com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_); + } + if (messageCase_ == 21) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, (com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_); + } + if (messageCase_ == 22) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, (com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_); + } + if (messageCase_ == 23) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, (com.heroiclabs.nakama.rtapi.Notifications) message_); + } + if (messageCase_ == 24) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, (com.heroiclabs.nakama.api.Rpc) message_); + } + if (messageCase_ == 25) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, (com.heroiclabs.nakama.rtapi.Status) message_); + } + if (messageCase_ == 26) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(26, (com.heroiclabs.nakama.rtapi.StatusFollow) message_); + } + if (messageCase_ == 27) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(27, (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_); + } + if (messageCase_ == 28) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(28, (com.heroiclabs.nakama.rtapi.StatusUnfollow) message_); + } + if (messageCase_ == 29) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(29, (com.heroiclabs.nakama.rtapi.StatusUpdate) message_); + } + if (messageCase_ == 30) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, (com.heroiclabs.nakama.rtapi.StreamData) message_); + } + if (messageCase_ == 31) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(31, (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_); + } + if (messageCase_ == 32) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(32, (com.heroiclabs.nakama.rtapi.Ping) message_); + } + if (messageCase_ == 33) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, (com.heroiclabs.nakama.rtapi.Pong) message_); + } + if (messageCase_ == 34) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(34, (com.heroiclabs.nakama.rtapi.Party) message_); + } + if (messageCase_ == 35) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(35, (com.heroiclabs.nakama.rtapi.PartyCreate) message_); + } + if (messageCase_ == 36) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(36, (com.heroiclabs.nakama.rtapi.PartyJoin) message_); + } + if (messageCase_ == 37) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(37, (com.heroiclabs.nakama.rtapi.PartyLeave) message_); + } + if (messageCase_ == 38) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(38, (com.heroiclabs.nakama.rtapi.PartyPromote) message_); + } + if (messageCase_ == 39) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(39, (com.heroiclabs.nakama.rtapi.PartyLeader) message_); + } + if (messageCase_ == 40) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(40, (com.heroiclabs.nakama.rtapi.PartyAccept) message_); + } + if (messageCase_ == 41) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(41, (com.heroiclabs.nakama.rtapi.PartyRemove) message_); + } + if (messageCase_ == 42) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(42, (com.heroiclabs.nakama.rtapi.PartyClose) message_); + } + if (messageCase_ == 43) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(43, (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_); + } + if (messageCase_ == 44) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(44, (com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_); + } + if (messageCase_ == 45) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(45, (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_); + } + if (messageCase_ == 46) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(46, (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_); + } + if (messageCase_ == 47) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(47, (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_); + } + if (messageCase_ == 48) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(48, (com.heroiclabs.nakama.rtapi.PartyData) message_); + } + if (messageCase_ == 49) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(49, (com.heroiclabs.nakama.rtapi.PartyDataSend) message_); + } + if (messageCase_ == 50) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(50, (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Envelope)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Envelope other = (com.heroiclabs.nakama.rtapi.Envelope) obj; + + if (!getCid() + .equals(other.getCid())) return false; + if (!getMessageCase().equals(other.getMessageCase())) return false; + switch (messageCase_) { + case 2: + if (!getChannel() + .equals(other.getChannel())) return false; + break; + case 3: + if (!getChannelJoin() + .equals(other.getChannelJoin())) return false; + break; + case 4: + if (!getChannelLeave() + .equals(other.getChannelLeave())) return false; + break; + case 5: + if (!getChannelMessage() + .equals(other.getChannelMessage())) return false; + break; + case 6: + if (!getChannelMessageAck() + .equals(other.getChannelMessageAck())) return false; + break; + case 7: + if (!getChannelMessageSend() + .equals(other.getChannelMessageSend())) return false; + break; + case 8: + if (!getChannelMessageUpdate() + .equals(other.getChannelMessageUpdate())) return false; + break; + case 9: + if (!getChannelMessageRemove() + .equals(other.getChannelMessageRemove())) return false; + break; + case 10: + if (!getChannelPresenceEvent() + .equals(other.getChannelPresenceEvent())) return false; + break; + case 11: + if (!getError() + .equals(other.getError())) return false; + break; + case 12: + if (!getMatch() + .equals(other.getMatch())) return false; + break; + case 13: + if (!getMatchCreate() + .equals(other.getMatchCreate())) return false; + break; + case 14: + if (!getMatchData() + .equals(other.getMatchData())) return false; + break; + case 15: + if (!getMatchDataSend() + .equals(other.getMatchDataSend())) return false; + break; + case 16: + if (!getMatchJoin() + .equals(other.getMatchJoin())) return false; + break; + case 17: + if (!getMatchLeave() + .equals(other.getMatchLeave())) return false; + break; + case 18: + if (!getMatchPresenceEvent() + .equals(other.getMatchPresenceEvent())) return false; + break; + case 19: + if (!getMatchmakerAdd() + .equals(other.getMatchmakerAdd())) return false; + break; + case 20: + if (!getMatchmakerMatched() + .equals(other.getMatchmakerMatched())) return false; + break; + case 21: + if (!getMatchmakerRemove() + .equals(other.getMatchmakerRemove())) return false; + break; + case 22: + if (!getMatchmakerTicket() + .equals(other.getMatchmakerTicket())) return false; + break; + case 23: + if (!getNotifications() + .equals(other.getNotifications())) return false; + break; + case 24: + if (!getRpc() + .equals(other.getRpc())) return false; + break; + case 25: + if (!getStatus() + .equals(other.getStatus())) return false; + break; + case 26: + if (!getStatusFollow() + .equals(other.getStatusFollow())) return false; + break; + case 27: + if (!getStatusPresenceEvent() + .equals(other.getStatusPresenceEvent())) return false; + break; + case 28: + if (!getStatusUnfollow() + .equals(other.getStatusUnfollow())) return false; + break; + case 29: + if (!getStatusUpdate() + .equals(other.getStatusUpdate())) return false; + break; + case 30: + if (!getStreamData() + .equals(other.getStreamData())) return false; + break; + case 31: + if (!getStreamPresenceEvent() + .equals(other.getStreamPresenceEvent())) return false; + break; + case 32: + if (!getPing() + .equals(other.getPing())) return false; + break; + case 33: + if (!getPong() + .equals(other.getPong())) return false; + break; + case 34: + if (!getParty() + .equals(other.getParty())) return false; + break; + case 35: + if (!getPartyCreate() + .equals(other.getPartyCreate())) return false; + break; + case 36: + if (!getPartyJoin() + .equals(other.getPartyJoin())) return false; + break; + case 37: + if (!getPartyLeave() + .equals(other.getPartyLeave())) return false; + break; + case 38: + if (!getPartyPromote() + .equals(other.getPartyPromote())) return false; + break; + case 39: + if (!getPartyLeader() + .equals(other.getPartyLeader())) return false; + break; + case 40: + if (!getPartyAccept() + .equals(other.getPartyAccept())) return false; + break; + case 41: + if (!getPartyRemove() + .equals(other.getPartyRemove())) return false; + break; + case 42: + if (!getPartyClose() + .equals(other.getPartyClose())) return false; + break; + case 43: + if (!getPartyJoinRequestList() + .equals(other.getPartyJoinRequestList())) return false; + break; + case 44: + if (!getPartyJoinRequest() + .equals(other.getPartyJoinRequest())) return false; + break; + case 45: + if (!getPartyMatchmakerAdd() + .equals(other.getPartyMatchmakerAdd())) return false; + break; + case 46: + if (!getPartyMatchmakerRemove() + .equals(other.getPartyMatchmakerRemove())) return false; + break; + case 47: + if (!getPartyMatchmakerTicket() + .equals(other.getPartyMatchmakerTicket())) return false; + break; + case 48: + if (!getPartyData() + .equals(other.getPartyData())) return false; + break; + case 49: + if (!getPartyDataSend() + .equals(other.getPartyDataSend())) return false; + break; + case 50: + if (!getPartyPresenceEvent() + .equals(other.getPartyPresenceEvent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CID_FIELD_NUMBER; + hash = (53 * hash) + getCid().hashCode(); + switch (messageCase_) { + case 2: + hash = (37 * hash) + CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + getChannel().hashCode(); + break; + case 3: + hash = (37 * hash) + CHANNEL_JOIN_FIELD_NUMBER; + hash = (53 * hash) + getChannelJoin().hashCode(); + break; + case 4: + hash = (37 * hash) + CHANNEL_LEAVE_FIELD_NUMBER; + hash = (53 * hash) + getChannelLeave().hashCode(); + break; + case 5: + hash = (37 * hash) + CHANNEL_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getChannelMessage().hashCode(); + break; + case 6: + hash = (37 * hash) + CHANNEL_MESSAGE_ACK_FIELD_NUMBER; + hash = (53 * hash) + getChannelMessageAck().hashCode(); + break; + case 7: + hash = (37 * hash) + CHANNEL_MESSAGE_SEND_FIELD_NUMBER; + hash = (53 * hash) + getChannelMessageSend().hashCode(); + break; + case 8: + hash = (37 * hash) + CHANNEL_MESSAGE_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getChannelMessageUpdate().hashCode(); + break; + case 9: + hash = (37 * hash) + CHANNEL_MESSAGE_REMOVE_FIELD_NUMBER; + hash = (53 * hash) + getChannelMessageRemove().hashCode(); + break; + case 10: + hash = (37 * hash) + CHANNEL_PRESENCE_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getChannelPresenceEvent().hashCode(); + break; + case 11: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 12: + hash = (37 * hash) + MATCH_FIELD_NUMBER; + hash = (53 * hash) + getMatch().hashCode(); + break; + case 13: + hash = (37 * hash) + MATCH_CREATE_FIELD_NUMBER; + hash = (53 * hash) + getMatchCreate().hashCode(); + break; + case 14: + hash = (37 * hash) + MATCH_DATA_FIELD_NUMBER; + hash = (53 * hash) + getMatchData().hashCode(); + break; + case 15: + hash = (37 * hash) + MATCH_DATA_SEND_FIELD_NUMBER; + hash = (53 * hash) + getMatchDataSend().hashCode(); + break; + case 16: + hash = (37 * hash) + MATCH_JOIN_FIELD_NUMBER; + hash = (53 * hash) + getMatchJoin().hashCode(); + break; + case 17: + hash = (37 * hash) + MATCH_LEAVE_FIELD_NUMBER; + hash = (53 * hash) + getMatchLeave().hashCode(); + break; + case 18: + hash = (37 * hash) + MATCH_PRESENCE_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getMatchPresenceEvent().hashCode(); + break; + case 19: + hash = (37 * hash) + MATCHMAKER_ADD_FIELD_NUMBER; + hash = (53 * hash) + getMatchmakerAdd().hashCode(); + break; + case 20: + hash = (37 * hash) + MATCHMAKER_MATCHED_FIELD_NUMBER; + hash = (53 * hash) + getMatchmakerMatched().hashCode(); + break; + case 21: + hash = (37 * hash) + MATCHMAKER_REMOVE_FIELD_NUMBER; + hash = (53 * hash) + getMatchmakerRemove().hashCode(); + break; + case 22: + hash = (37 * hash) + MATCHMAKER_TICKET_FIELD_NUMBER; + hash = (53 * hash) + getMatchmakerTicket().hashCode(); + break; + case 23: + hash = (37 * hash) + NOTIFICATIONS_FIELD_NUMBER; + hash = (53 * hash) + getNotifications().hashCode(); + break; + case 24: + hash = (37 * hash) + RPC_FIELD_NUMBER; + hash = (53 * hash) + getRpc().hashCode(); + break; + case 25: + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + break; + case 26: + hash = (37 * hash) + STATUS_FOLLOW_FIELD_NUMBER; + hash = (53 * hash) + getStatusFollow().hashCode(); + break; + case 27: + hash = (37 * hash) + STATUS_PRESENCE_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getStatusPresenceEvent().hashCode(); + break; + case 28: + hash = (37 * hash) + STATUS_UNFOLLOW_FIELD_NUMBER; + hash = (53 * hash) + getStatusUnfollow().hashCode(); + break; + case 29: + hash = (37 * hash) + STATUS_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getStatusUpdate().hashCode(); + break; + case 30: + hash = (37 * hash) + STREAM_DATA_FIELD_NUMBER; + hash = (53 * hash) + getStreamData().hashCode(); + break; + case 31: + hash = (37 * hash) + STREAM_PRESENCE_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getStreamPresenceEvent().hashCode(); + break; + case 32: + hash = (37 * hash) + PING_FIELD_NUMBER; + hash = (53 * hash) + getPing().hashCode(); + break; + case 33: + hash = (37 * hash) + PONG_FIELD_NUMBER; + hash = (53 * hash) + getPong().hashCode(); + break; + case 34: + hash = (37 * hash) + PARTY_FIELD_NUMBER; + hash = (53 * hash) + getParty().hashCode(); + break; + case 35: + hash = (37 * hash) + PARTY_CREATE_FIELD_NUMBER; + hash = (53 * hash) + getPartyCreate().hashCode(); + break; + case 36: + hash = (37 * hash) + PARTY_JOIN_FIELD_NUMBER; + hash = (53 * hash) + getPartyJoin().hashCode(); + break; + case 37: + hash = (37 * hash) + PARTY_LEAVE_FIELD_NUMBER; + hash = (53 * hash) + getPartyLeave().hashCode(); + break; + case 38: + hash = (37 * hash) + PARTY_PROMOTE_FIELD_NUMBER; + hash = (53 * hash) + getPartyPromote().hashCode(); + break; + case 39: + hash = (37 * hash) + PARTY_LEADER_FIELD_NUMBER; + hash = (53 * hash) + getPartyLeader().hashCode(); + break; + case 40: + hash = (37 * hash) + PARTY_ACCEPT_FIELD_NUMBER; + hash = (53 * hash) + getPartyAccept().hashCode(); + break; + case 41: + hash = (37 * hash) + PARTY_REMOVE_FIELD_NUMBER; + hash = (53 * hash) + getPartyRemove().hashCode(); + break; + case 42: + hash = (37 * hash) + PARTY_CLOSE_FIELD_NUMBER; + hash = (53 * hash) + getPartyClose().hashCode(); + break; + case 43: + hash = (37 * hash) + PARTY_JOIN_REQUEST_LIST_FIELD_NUMBER; + hash = (53 * hash) + getPartyJoinRequestList().hashCode(); + break; + case 44: + hash = (37 * hash) + PARTY_JOIN_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getPartyJoinRequest().hashCode(); + break; + case 45: + hash = (37 * hash) + PARTY_MATCHMAKER_ADD_FIELD_NUMBER; + hash = (53 * hash) + getPartyMatchmakerAdd().hashCode(); + break; + case 46: + hash = (37 * hash) + PARTY_MATCHMAKER_REMOVE_FIELD_NUMBER; + hash = (53 * hash) + getPartyMatchmakerRemove().hashCode(); + break; + case 47: + hash = (37 * hash) + PARTY_MATCHMAKER_TICKET_FIELD_NUMBER; + hash = (53 * hash) + getPartyMatchmakerTicket().hashCode(); + break; + case 48: + hash = (37 * hash) + PARTY_DATA_FIELD_NUMBER; + hash = (53 * hash) + getPartyData().hashCode(); + break; + case 49: + hash = (37 * hash) + PARTY_DATA_SEND_FIELD_NUMBER; + hash = (53 * hash) + getPartyDataSend().hashCode(); + break; + case 50: + hash = (37 * hash) + PARTY_PRESENCE_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getPartyPresenceEvent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Envelope parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Envelope parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Envelope parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Envelope prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An envelope for a realtime message.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Envelope} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Envelope) + com.heroiclabs.nakama.rtapi.EnvelopeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Envelope_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Envelope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Envelope.class, com.heroiclabs.nakama.rtapi.Envelope.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Envelope.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + cid_ = ""; + if (channelBuilder_ != null) { + channelBuilder_.clear(); + } + if (channelJoinBuilder_ != null) { + channelJoinBuilder_.clear(); + } + if (channelLeaveBuilder_ != null) { + channelLeaveBuilder_.clear(); + } + if (channelMessageBuilder_ != null) { + channelMessageBuilder_.clear(); + } + if (channelMessageAckBuilder_ != null) { + channelMessageAckBuilder_.clear(); + } + if (channelMessageSendBuilder_ != null) { + channelMessageSendBuilder_.clear(); + } + if (channelMessageUpdateBuilder_ != null) { + channelMessageUpdateBuilder_.clear(); + } + if (channelMessageRemoveBuilder_ != null) { + channelMessageRemoveBuilder_.clear(); + } + if (channelPresenceEventBuilder_ != null) { + channelPresenceEventBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + if (matchBuilder_ != null) { + matchBuilder_.clear(); + } + if (matchCreateBuilder_ != null) { + matchCreateBuilder_.clear(); + } + if (matchDataBuilder_ != null) { + matchDataBuilder_.clear(); + } + if (matchDataSendBuilder_ != null) { + matchDataSendBuilder_.clear(); + } + if (matchJoinBuilder_ != null) { + matchJoinBuilder_.clear(); + } + if (matchLeaveBuilder_ != null) { + matchLeaveBuilder_.clear(); + } + if (matchPresenceEventBuilder_ != null) { + matchPresenceEventBuilder_.clear(); + } + if (matchmakerAddBuilder_ != null) { + matchmakerAddBuilder_.clear(); + } + if (matchmakerMatchedBuilder_ != null) { + matchmakerMatchedBuilder_.clear(); + } + if (matchmakerRemoveBuilder_ != null) { + matchmakerRemoveBuilder_.clear(); + } + if (matchmakerTicketBuilder_ != null) { + matchmakerTicketBuilder_.clear(); + } + if (notificationsBuilder_ != null) { + notificationsBuilder_.clear(); + } + if (rpcBuilder_ != null) { + rpcBuilder_.clear(); + } + if (statusBuilder_ != null) { + statusBuilder_.clear(); + } + if (statusFollowBuilder_ != null) { + statusFollowBuilder_.clear(); + } + if (statusPresenceEventBuilder_ != null) { + statusPresenceEventBuilder_.clear(); + } + if (statusUnfollowBuilder_ != null) { + statusUnfollowBuilder_.clear(); + } + if (statusUpdateBuilder_ != null) { + statusUpdateBuilder_.clear(); + } + if (streamDataBuilder_ != null) { + streamDataBuilder_.clear(); + } + if (streamPresenceEventBuilder_ != null) { + streamPresenceEventBuilder_.clear(); + } + if (pingBuilder_ != null) { + pingBuilder_.clear(); + } + if (pongBuilder_ != null) { + pongBuilder_.clear(); + } + if (partyBuilder_ != null) { + partyBuilder_.clear(); + } + if (partyCreateBuilder_ != null) { + partyCreateBuilder_.clear(); + } + if (partyJoinBuilder_ != null) { + partyJoinBuilder_.clear(); + } + if (partyLeaveBuilder_ != null) { + partyLeaveBuilder_.clear(); + } + if (partyPromoteBuilder_ != null) { + partyPromoteBuilder_.clear(); + } + if (partyLeaderBuilder_ != null) { + partyLeaderBuilder_.clear(); + } + if (partyAcceptBuilder_ != null) { + partyAcceptBuilder_.clear(); + } + if (partyRemoveBuilder_ != null) { + partyRemoveBuilder_.clear(); + } + if (partyCloseBuilder_ != null) { + partyCloseBuilder_.clear(); + } + if (partyJoinRequestListBuilder_ != null) { + partyJoinRequestListBuilder_.clear(); + } + if (partyJoinRequestBuilder_ != null) { + partyJoinRequestBuilder_.clear(); + } + if (partyMatchmakerAddBuilder_ != null) { + partyMatchmakerAddBuilder_.clear(); + } + if (partyMatchmakerRemoveBuilder_ != null) { + partyMatchmakerRemoveBuilder_.clear(); + } + if (partyMatchmakerTicketBuilder_ != null) { + partyMatchmakerTicketBuilder_.clear(); + } + if (partyDataBuilder_ != null) { + partyDataBuilder_.clear(); + } + if (partyDataSendBuilder_ != null) { + partyDataSendBuilder_.clear(); + } + if (partyPresenceEventBuilder_ != null) { + partyPresenceEventBuilder_.clear(); + } + messageCase_ = 0; + message_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Envelope_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Envelope getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Envelope.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Envelope build() { + com.heroiclabs.nakama.rtapi.Envelope result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Envelope buildPartial() { + com.heroiclabs.nakama.rtapi.Envelope result = new com.heroiclabs.nakama.rtapi.Envelope(this); + if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { buildPartial1(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Envelope result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cid_ = cid_; + } + } + + private void buildPartial1(com.heroiclabs.nakama.rtapi.Envelope result) { + int from_bitField1_ = bitField1_; + } + + private void buildPartialOneofs(com.heroiclabs.nakama.rtapi.Envelope result) { + result.messageCase_ = messageCase_; + result.message_ = this.message_; + if (messageCase_ == 2 && + channelBuilder_ != null) { + result.message_ = channelBuilder_.build(); + } + if (messageCase_ == 3 && + channelJoinBuilder_ != null) { + result.message_ = channelJoinBuilder_.build(); + } + if (messageCase_ == 4 && + channelLeaveBuilder_ != null) { + result.message_ = channelLeaveBuilder_.build(); + } + if (messageCase_ == 5 && + channelMessageBuilder_ != null) { + result.message_ = channelMessageBuilder_.build(); + } + if (messageCase_ == 6 && + channelMessageAckBuilder_ != null) { + result.message_ = channelMessageAckBuilder_.build(); + } + if (messageCase_ == 7 && + channelMessageSendBuilder_ != null) { + result.message_ = channelMessageSendBuilder_.build(); + } + if (messageCase_ == 8 && + channelMessageUpdateBuilder_ != null) { + result.message_ = channelMessageUpdateBuilder_.build(); + } + if (messageCase_ == 9 && + channelMessageRemoveBuilder_ != null) { + result.message_ = channelMessageRemoveBuilder_.build(); + } + if (messageCase_ == 10 && + channelPresenceEventBuilder_ != null) { + result.message_ = channelPresenceEventBuilder_.build(); + } + if (messageCase_ == 11 && + errorBuilder_ != null) { + result.message_ = errorBuilder_.build(); + } + if (messageCase_ == 12 && + matchBuilder_ != null) { + result.message_ = matchBuilder_.build(); + } + if (messageCase_ == 13 && + matchCreateBuilder_ != null) { + result.message_ = matchCreateBuilder_.build(); + } + if (messageCase_ == 14 && + matchDataBuilder_ != null) { + result.message_ = matchDataBuilder_.build(); + } + if (messageCase_ == 15 && + matchDataSendBuilder_ != null) { + result.message_ = matchDataSendBuilder_.build(); + } + if (messageCase_ == 16 && + matchJoinBuilder_ != null) { + result.message_ = matchJoinBuilder_.build(); + } + if (messageCase_ == 17 && + matchLeaveBuilder_ != null) { + result.message_ = matchLeaveBuilder_.build(); + } + if (messageCase_ == 18 && + matchPresenceEventBuilder_ != null) { + result.message_ = matchPresenceEventBuilder_.build(); + } + if (messageCase_ == 19 && + matchmakerAddBuilder_ != null) { + result.message_ = matchmakerAddBuilder_.build(); + } + if (messageCase_ == 20 && + matchmakerMatchedBuilder_ != null) { + result.message_ = matchmakerMatchedBuilder_.build(); + } + if (messageCase_ == 21 && + matchmakerRemoveBuilder_ != null) { + result.message_ = matchmakerRemoveBuilder_.build(); + } + if (messageCase_ == 22 && + matchmakerTicketBuilder_ != null) { + result.message_ = matchmakerTicketBuilder_.build(); + } + if (messageCase_ == 23 && + notificationsBuilder_ != null) { + result.message_ = notificationsBuilder_.build(); + } + if (messageCase_ == 24 && + rpcBuilder_ != null) { + result.message_ = rpcBuilder_.build(); + } + if (messageCase_ == 25 && + statusBuilder_ != null) { + result.message_ = statusBuilder_.build(); + } + if (messageCase_ == 26 && + statusFollowBuilder_ != null) { + result.message_ = statusFollowBuilder_.build(); + } + if (messageCase_ == 27 && + statusPresenceEventBuilder_ != null) { + result.message_ = statusPresenceEventBuilder_.build(); + } + if (messageCase_ == 28 && + statusUnfollowBuilder_ != null) { + result.message_ = statusUnfollowBuilder_.build(); + } + if (messageCase_ == 29 && + statusUpdateBuilder_ != null) { + result.message_ = statusUpdateBuilder_.build(); + } + if (messageCase_ == 30 && + streamDataBuilder_ != null) { + result.message_ = streamDataBuilder_.build(); + } + if (messageCase_ == 31 && + streamPresenceEventBuilder_ != null) { + result.message_ = streamPresenceEventBuilder_.build(); + } + if (messageCase_ == 32 && + pingBuilder_ != null) { + result.message_ = pingBuilder_.build(); + } + if (messageCase_ == 33 && + pongBuilder_ != null) { + result.message_ = pongBuilder_.build(); + } + if (messageCase_ == 34 && + partyBuilder_ != null) { + result.message_ = partyBuilder_.build(); + } + if (messageCase_ == 35 && + partyCreateBuilder_ != null) { + result.message_ = partyCreateBuilder_.build(); + } + if (messageCase_ == 36 && + partyJoinBuilder_ != null) { + result.message_ = partyJoinBuilder_.build(); + } + if (messageCase_ == 37 && + partyLeaveBuilder_ != null) { + result.message_ = partyLeaveBuilder_.build(); + } + if (messageCase_ == 38 && + partyPromoteBuilder_ != null) { + result.message_ = partyPromoteBuilder_.build(); + } + if (messageCase_ == 39 && + partyLeaderBuilder_ != null) { + result.message_ = partyLeaderBuilder_.build(); + } + if (messageCase_ == 40 && + partyAcceptBuilder_ != null) { + result.message_ = partyAcceptBuilder_.build(); + } + if (messageCase_ == 41 && + partyRemoveBuilder_ != null) { + result.message_ = partyRemoveBuilder_.build(); + } + if (messageCase_ == 42 && + partyCloseBuilder_ != null) { + result.message_ = partyCloseBuilder_.build(); + } + if (messageCase_ == 43 && + partyJoinRequestListBuilder_ != null) { + result.message_ = partyJoinRequestListBuilder_.build(); + } + if (messageCase_ == 44 && + partyJoinRequestBuilder_ != null) { + result.message_ = partyJoinRequestBuilder_.build(); + } + if (messageCase_ == 45 && + partyMatchmakerAddBuilder_ != null) { + result.message_ = partyMatchmakerAddBuilder_.build(); + } + if (messageCase_ == 46 && + partyMatchmakerRemoveBuilder_ != null) { + result.message_ = partyMatchmakerRemoveBuilder_.build(); + } + if (messageCase_ == 47 && + partyMatchmakerTicketBuilder_ != null) { + result.message_ = partyMatchmakerTicketBuilder_.build(); + } + if (messageCase_ == 48 && + partyDataBuilder_ != null) { + result.message_ = partyDataBuilder_.build(); + } + if (messageCase_ == 49 && + partyDataSendBuilder_ != null) { + result.message_ = partyDataSendBuilder_.build(); + } + if (messageCase_ == 50 && + partyPresenceEventBuilder_ != null) { + result.message_ = partyPresenceEventBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Envelope) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Envelope)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Envelope other) { + if (other == com.heroiclabs.nakama.rtapi.Envelope.getDefaultInstance()) return this; + if (!other.getCid().isEmpty()) { + cid_ = other.cid_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getMessageCase()) { + case CHANNEL: { + mergeChannel(other.getChannel()); + break; + } + case CHANNEL_JOIN: { + mergeChannelJoin(other.getChannelJoin()); + break; + } + case CHANNEL_LEAVE: { + mergeChannelLeave(other.getChannelLeave()); + break; + } + case CHANNEL_MESSAGE: { + mergeChannelMessage(other.getChannelMessage()); + break; + } + case CHANNEL_MESSAGE_ACK: { + mergeChannelMessageAck(other.getChannelMessageAck()); + break; + } + case CHANNEL_MESSAGE_SEND: { + mergeChannelMessageSend(other.getChannelMessageSend()); + break; + } + case CHANNEL_MESSAGE_UPDATE: { + mergeChannelMessageUpdate(other.getChannelMessageUpdate()); + break; + } + case CHANNEL_MESSAGE_REMOVE: { + mergeChannelMessageRemove(other.getChannelMessageRemove()); + break; + } + case CHANNEL_PRESENCE_EVENT: { + mergeChannelPresenceEvent(other.getChannelPresenceEvent()); + break; + } + case ERROR: { + mergeError(other.getError()); + break; + } + case MATCH: { + mergeMatch(other.getMatch()); + break; + } + case MATCH_CREATE: { + mergeMatchCreate(other.getMatchCreate()); + break; + } + case MATCH_DATA: { + mergeMatchData(other.getMatchData()); + break; + } + case MATCH_DATA_SEND: { + mergeMatchDataSend(other.getMatchDataSend()); + break; + } + case MATCH_JOIN: { + mergeMatchJoin(other.getMatchJoin()); + break; + } + case MATCH_LEAVE: { + mergeMatchLeave(other.getMatchLeave()); + break; + } + case MATCH_PRESENCE_EVENT: { + mergeMatchPresenceEvent(other.getMatchPresenceEvent()); + break; + } + case MATCHMAKER_ADD: { + mergeMatchmakerAdd(other.getMatchmakerAdd()); + break; + } + case MATCHMAKER_MATCHED: { + mergeMatchmakerMatched(other.getMatchmakerMatched()); + break; + } + case MATCHMAKER_REMOVE: { + mergeMatchmakerRemove(other.getMatchmakerRemove()); + break; + } + case MATCHMAKER_TICKET: { + mergeMatchmakerTicket(other.getMatchmakerTicket()); + break; + } + case NOTIFICATIONS: { + mergeNotifications(other.getNotifications()); + break; + } + case RPC: { + mergeRpc(other.getRpc()); + break; + } + case STATUS: { + mergeStatus(other.getStatus()); + break; + } + case STATUS_FOLLOW: { + mergeStatusFollow(other.getStatusFollow()); + break; + } + case STATUS_PRESENCE_EVENT: { + mergeStatusPresenceEvent(other.getStatusPresenceEvent()); + break; + } + case STATUS_UNFOLLOW: { + mergeStatusUnfollow(other.getStatusUnfollow()); + break; + } + case STATUS_UPDATE: { + mergeStatusUpdate(other.getStatusUpdate()); + break; + } + case STREAM_DATA: { + mergeStreamData(other.getStreamData()); + break; + } + case STREAM_PRESENCE_EVENT: { + mergeStreamPresenceEvent(other.getStreamPresenceEvent()); + break; + } + case PING: { + mergePing(other.getPing()); + break; + } + case PONG: { + mergePong(other.getPong()); + break; + } + case PARTY: { + mergeParty(other.getParty()); + break; + } + case PARTY_CREATE: { + mergePartyCreate(other.getPartyCreate()); + break; + } + case PARTY_JOIN: { + mergePartyJoin(other.getPartyJoin()); + break; + } + case PARTY_LEAVE: { + mergePartyLeave(other.getPartyLeave()); + break; + } + case PARTY_PROMOTE: { + mergePartyPromote(other.getPartyPromote()); + break; + } + case PARTY_LEADER: { + mergePartyLeader(other.getPartyLeader()); + break; + } + case PARTY_ACCEPT: { + mergePartyAccept(other.getPartyAccept()); + break; + } + case PARTY_REMOVE: { + mergePartyRemove(other.getPartyRemove()); + break; + } + case PARTY_CLOSE: { + mergePartyClose(other.getPartyClose()); + break; + } + case PARTY_JOIN_REQUEST_LIST: { + mergePartyJoinRequestList(other.getPartyJoinRequestList()); + break; + } + case PARTY_JOIN_REQUEST: { + mergePartyJoinRequest(other.getPartyJoinRequest()); + break; + } + case PARTY_MATCHMAKER_ADD: { + mergePartyMatchmakerAdd(other.getPartyMatchmakerAdd()); + break; + } + case PARTY_MATCHMAKER_REMOVE: { + mergePartyMatchmakerRemove(other.getPartyMatchmakerRemove()); + break; + } + case PARTY_MATCHMAKER_TICKET: { + mergePartyMatchmakerTicket(other.getPartyMatchmakerTicket()); + break; + } + case PARTY_DATA: { + mergePartyData(other.getPartyData()); + break; + } + case PARTY_DATA_SEND: { + mergePartyDataSend(other.getPartyDataSend()); + break; + } + case PARTY_PRESENCE_EVENT: { + mergePartyPresenceEvent(other.getPartyPresenceEvent()); + break; + } + case MESSAGE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getChannelFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getChannelJoinFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getChannelLeaveFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getChannelMessageFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getChannelMessageAckFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getChannelMessageSendFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 7; + break; + } // case 58 + case 66: { + input.readMessage( + getChannelMessageUpdateFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getChannelMessageRemoveFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 9; + break; + } // case 74 + case 82: { + input.readMessage( + getChannelPresenceEventFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getMatchFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getMatchCreateFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getMatchDataFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getMatchDataSendFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + getMatchJoinFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 16; + break; + } // case 130 + case 138: { + input.readMessage( + getMatchLeaveFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 17; + break; + } // case 138 + case 146: { + input.readMessage( + getMatchPresenceEventFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 18; + break; + } // case 146 + case 154: { + input.readMessage( + getMatchmakerAddFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 19; + break; + } // case 154 + case 162: { + input.readMessage( + getMatchmakerMatchedFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 20; + break; + } // case 162 + case 170: { + input.readMessage( + getMatchmakerRemoveFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 21; + break; + } // case 170 + case 178: { + input.readMessage( + getMatchmakerTicketFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 22; + break; + } // case 178 + case 186: { + input.readMessage( + getNotificationsFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 23; + break; + } // case 186 + case 194: { + input.readMessage( + getRpcFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 24; + break; + } // case 194 + case 202: { + input.readMessage( + getStatusFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 25; + break; + } // case 202 + case 210: { + input.readMessage( + getStatusFollowFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 26; + break; + } // case 210 + case 218: { + input.readMessage( + getStatusPresenceEventFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 27; + break; + } // case 218 + case 226: { + input.readMessage( + getStatusUnfollowFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 28; + break; + } // case 226 + case 234: { + input.readMessage( + getStatusUpdateFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 29; + break; + } // case 234 + case 242: { + input.readMessage( + getStreamDataFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 30; + break; + } // case 242 + case 250: { + input.readMessage( + getStreamPresenceEventFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 31; + break; + } // case 250 + case 258: { + input.readMessage( + getPingFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 32; + break; + } // case 258 + case 266: { + input.readMessage( + getPongFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 33; + break; + } // case 266 + case 274: { + input.readMessage( + getPartyFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 34; + break; + } // case 274 + case 282: { + input.readMessage( + getPartyCreateFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 35; + break; + } // case 282 + case 290: { + input.readMessage( + getPartyJoinFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 36; + break; + } // case 290 + case 298: { + input.readMessage( + getPartyLeaveFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 37; + break; + } // case 298 + case 306: { + input.readMessage( + getPartyPromoteFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 38; + break; + } // case 306 + case 314: { + input.readMessage( + getPartyLeaderFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 39; + break; + } // case 314 + case 322: { + input.readMessage( + getPartyAcceptFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 40; + break; + } // case 322 + case 330: { + input.readMessage( + getPartyRemoveFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 41; + break; + } // case 330 + case 338: { + input.readMessage( + getPartyCloseFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 42; + break; + } // case 338 + case 346: { + input.readMessage( + getPartyJoinRequestListFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 43; + break; + } // case 346 + case 354: { + input.readMessage( + getPartyJoinRequestFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 44; + break; + } // case 354 + case 362: { + input.readMessage( + getPartyMatchmakerAddFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 45; + break; + } // case 362 + case 370: { + input.readMessage( + getPartyMatchmakerRemoveFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 46; + break; + } // case 370 + case 378: { + input.readMessage( + getPartyMatchmakerTicketFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 47; + break; + } // case 378 + case 386: { + input.readMessage( + getPartyDataFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 48; + break; + } // case 386 + case 394: { + input.readMessage( + getPartyDataSendFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 49; + break; + } // case 394 + case 402: { + input.readMessage( + getPartyPresenceEventFieldBuilder().getBuilder(), + extensionRegistry); + messageCase_ = 50; + break; + } // case 402 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int messageCase_ = 0; + private java.lang.Object message_; + public MessageCase + getMessageCase() { + return MessageCase.forNumber( + messageCase_); + } + + public Builder clearMessage() { + messageCase_ = 0; + message_ = null; + onChanged(); + return this; + } + + private int bitField0_; + private int bitField1_; + + private java.lang.Object cid_ = ""; + /** + * string cid = 1 [json_name = "cid"]; + * @return The cid. + */ + public java.lang.String getCid() { + java.lang.Object ref = cid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cid = 1 [json_name = "cid"]; + * @return The bytes for cid. + */ + public com.google.protobuf.ByteString + getCidBytes() { + java.lang.Object ref = cid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cid = 1 [json_name = "cid"]; + * @param value The cid to set. + * @return This builder for chaining. + */ + public Builder setCid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string cid = 1 [json_name = "cid"]; + * @return This builder for chaining. + */ + public Builder clearCid() { + cid_ = getDefaultInstance().getCid(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string cid = 1 [json_name = "cid"]; + * @param value The bytes for cid to set. + * @return This builder for chaining. + */ + public Builder setCidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Channel, com.heroiclabs.nakama.rtapi.Channel.Builder, com.heroiclabs.nakama.rtapi.ChannelOrBuilder> channelBuilder_; + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + * @return Whether the channel field is set. + */ + @java.lang.Override + public boolean hasChannel() { + return messageCase_ == 2; + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + * @return The channel. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Channel getChannel() { + if (channelBuilder_ == null) { + if (messageCase_ == 2) { + return (com.heroiclabs.nakama.rtapi.Channel) message_; + } + return com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance(); + } else { + if (messageCase_ == 2) { + return channelBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance(); + } + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + public Builder setChannel(com.heroiclabs.nakama.rtapi.Channel value) { + if (channelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelBuilder_.setMessage(value); + } + messageCase_ = 2; + return this; + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + public Builder setChannel( + com.heroiclabs.nakama.rtapi.Channel.Builder builderForValue) { + if (channelBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 2; + return this; + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + public Builder mergeChannel(com.heroiclabs.nakama.rtapi.Channel value) { + if (channelBuilder_ == null) { + if (messageCase_ == 2 && + message_ != com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Channel.newBuilder((com.heroiclabs.nakama.rtapi.Channel) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 2) { + channelBuilder_.mergeFrom(value); + } else { + channelBuilder_.setMessage(value); + } + } + messageCase_ = 2; + return this; + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + public Builder clearChannel() { + if (channelBuilder_ == null) { + if (messageCase_ == 2) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 2) { + messageCase_ = 0; + message_ = null; + } + channelBuilder_.clear(); + } + return this; + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + public com.heroiclabs.nakama.rtapi.Channel.Builder getChannelBuilder() { + return getChannelFieldBuilder().getBuilder(); + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelOrBuilder getChannelOrBuilder() { + if ((messageCase_ == 2) && (channelBuilder_ != null)) { + return channelBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 2) { + return (com.heroiclabs.nakama.rtapi.Channel) message_; + } + return com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance(); + } + } + /** + *
+     * A response from a channel join operation.
+     * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Channel, com.heroiclabs.nakama.rtapi.Channel.Builder, com.heroiclabs.nakama.rtapi.ChannelOrBuilder> + getChannelFieldBuilder() { + if (channelBuilder_ == null) { + if (!(messageCase_ == 2)) { + message_ = com.heroiclabs.nakama.rtapi.Channel.getDefaultInstance(); + } + channelBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Channel, com.heroiclabs.nakama.rtapi.Channel.Builder, com.heroiclabs.nakama.rtapi.ChannelOrBuilder>( + (com.heroiclabs.nakama.rtapi.Channel) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 2; + onChanged(); + return channelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelJoin, com.heroiclabs.nakama.rtapi.ChannelJoin.Builder, com.heroiclabs.nakama.rtapi.ChannelJoinOrBuilder> channelJoinBuilder_; + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + * @return Whether the channelJoin field is set. + */ + @java.lang.Override + public boolean hasChannelJoin() { + return messageCase_ == 3; + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + * @return The channelJoin. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoin getChannelJoin() { + if (channelJoinBuilder_ == null) { + if (messageCase_ == 3) { + return (com.heroiclabs.nakama.rtapi.ChannelJoin) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance(); + } else { + if (messageCase_ == 3) { + return channelJoinBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance(); + } + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + public Builder setChannelJoin(com.heroiclabs.nakama.rtapi.ChannelJoin value) { + if (channelJoinBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelJoinBuilder_.setMessage(value); + } + messageCase_ = 3; + return this; + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + public Builder setChannelJoin( + com.heroiclabs.nakama.rtapi.ChannelJoin.Builder builderForValue) { + if (channelJoinBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelJoinBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 3; + return this; + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + public Builder mergeChannelJoin(com.heroiclabs.nakama.rtapi.ChannelJoin value) { + if (channelJoinBuilder_ == null) { + if (messageCase_ == 3 && + message_ != com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.ChannelJoin.newBuilder((com.heroiclabs.nakama.rtapi.ChannelJoin) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 3) { + channelJoinBuilder_.mergeFrom(value); + } else { + channelJoinBuilder_.setMessage(value); + } + } + messageCase_ = 3; + return this; + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + public Builder clearChannelJoin() { + if (channelJoinBuilder_ == null) { + if (messageCase_ == 3) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 3) { + messageCase_ = 0; + message_ = null; + } + channelJoinBuilder_.clear(); + } + return this; + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + public com.heroiclabs.nakama.rtapi.ChannelJoin.Builder getChannelJoinBuilder() { + return getChannelJoinFieldBuilder().getBuilder(); + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelJoinOrBuilder getChannelJoinOrBuilder() { + if ((messageCase_ == 3) && (channelJoinBuilder_ != null)) { + return channelJoinBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 3) { + return (com.heroiclabs.nakama.rtapi.ChannelJoin) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance(); + } + } + /** + *
+     * Join a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelJoin, com.heroiclabs.nakama.rtapi.ChannelJoin.Builder, com.heroiclabs.nakama.rtapi.ChannelJoinOrBuilder> + getChannelJoinFieldBuilder() { + if (channelJoinBuilder_ == null) { + if (!(messageCase_ == 3)) { + message_ = com.heroiclabs.nakama.rtapi.ChannelJoin.getDefaultInstance(); + } + channelJoinBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelJoin, com.heroiclabs.nakama.rtapi.ChannelJoin.Builder, com.heroiclabs.nakama.rtapi.ChannelJoinOrBuilder>( + (com.heroiclabs.nakama.rtapi.ChannelJoin) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 3; + onChanged(); + return channelJoinBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelLeave, com.heroiclabs.nakama.rtapi.ChannelLeave.Builder, com.heroiclabs.nakama.rtapi.ChannelLeaveOrBuilder> channelLeaveBuilder_; + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + * @return Whether the channelLeave field is set. + */ + @java.lang.Override + public boolean hasChannelLeave() { + return messageCase_ == 4; + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + * @return The channelLeave. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeave getChannelLeave() { + if (channelLeaveBuilder_ == null) { + if (messageCase_ == 4) { + return (com.heroiclabs.nakama.rtapi.ChannelLeave) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance(); + } else { + if (messageCase_ == 4) { + return channelLeaveBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance(); + } + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + public Builder setChannelLeave(com.heroiclabs.nakama.rtapi.ChannelLeave value) { + if (channelLeaveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelLeaveBuilder_.setMessage(value); + } + messageCase_ = 4; + return this; + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + public Builder setChannelLeave( + com.heroiclabs.nakama.rtapi.ChannelLeave.Builder builderForValue) { + if (channelLeaveBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelLeaveBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 4; + return this; + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + public Builder mergeChannelLeave(com.heroiclabs.nakama.rtapi.ChannelLeave value) { + if (channelLeaveBuilder_ == null) { + if (messageCase_ == 4 && + message_ != com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.ChannelLeave.newBuilder((com.heroiclabs.nakama.rtapi.ChannelLeave) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 4) { + channelLeaveBuilder_.mergeFrom(value); + } else { + channelLeaveBuilder_.setMessage(value); + } + } + messageCase_ = 4; + return this; + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + public Builder clearChannelLeave() { + if (channelLeaveBuilder_ == null) { + if (messageCase_ == 4) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 4) { + messageCase_ = 0; + message_ = null; + } + channelLeaveBuilder_.clear(); + } + return this; + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + public com.heroiclabs.nakama.rtapi.ChannelLeave.Builder getChannelLeaveBuilder() { + return getChannelLeaveFieldBuilder().getBuilder(); + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelLeaveOrBuilder getChannelLeaveOrBuilder() { + if ((messageCase_ == 4) && (channelLeaveBuilder_ != null)) { + return channelLeaveBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 4) { + return (com.heroiclabs.nakama.rtapi.ChannelLeave) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance(); + } + } + /** + *
+     * Leave a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelLeave, com.heroiclabs.nakama.rtapi.ChannelLeave.Builder, com.heroiclabs.nakama.rtapi.ChannelLeaveOrBuilder> + getChannelLeaveFieldBuilder() { + if (channelLeaveBuilder_ == null) { + if (!(messageCase_ == 4)) { + message_ = com.heroiclabs.nakama.rtapi.ChannelLeave.getDefaultInstance(); + } + channelLeaveBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelLeave, com.heroiclabs.nakama.rtapi.ChannelLeave.Builder, com.heroiclabs.nakama.rtapi.ChannelLeaveOrBuilder>( + (com.heroiclabs.nakama.rtapi.ChannelLeave) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 4; + onChanged(); + return channelLeaveBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.ChannelMessage, com.heroiclabs.nakama.api.ChannelMessage.Builder, com.heroiclabs.nakama.api.ChannelMessageOrBuilder> channelMessageBuilder_; + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + * @return Whether the channelMessage field is set. + */ + @java.lang.Override + public boolean hasChannelMessage() { + return messageCase_ == 5; + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + * @return The channelMessage. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessage getChannelMessage() { + if (channelMessageBuilder_ == null) { + if (messageCase_ == 5) { + return (com.heroiclabs.nakama.api.ChannelMessage) message_; + } + return com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance(); + } else { + if (messageCase_ == 5) { + return channelMessageBuilder_.getMessage(); + } + return com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance(); + } + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + public Builder setChannelMessage(com.heroiclabs.nakama.api.ChannelMessage value) { + if (channelMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelMessageBuilder_.setMessage(value); + } + messageCase_ = 5; + return this; + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + public Builder setChannelMessage( + com.heroiclabs.nakama.api.ChannelMessage.Builder builderForValue) { + if (channelMessageBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelMessageBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 5; + return this; + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + public Builder mergeChannelMessage(com.heroiclabs.nakama.api.ChannelMessage value) { + if (channelMessageBuilder_ == null) { + if (messageCase_ == 5 && + message_ != com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.api.ChannelMessage.newBuilder((com.heroiclabs.nakama.api.ChannelMessage) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 5) { + channelMessageBuilder_.mergeFrom(value); + } else { + channelMessageBuilder_.setMessage(value); + } + } + messageCase_ = 5; + return this; + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + public Builder clearChannelMessage() { + if (channelMessageBuilder_ == null) { + if (messageCase_ == 5) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 5) { + messageCase_ = 0; + message_ = null; + } + channelMessageBuilder_.clear(); + } + return this; + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + public com.heroiclabs.nakama.api.ChannelMessage.Builder getChannelMessageBuilder() { + return getChannelMessageFieldBuilder().getBuilder(); + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.ChannelMessageOrBuilder getChannelMessageOrBuilder() { + if ((messageCase_ == 5) && (channelMessageBuilder_ != null)) { + return channelMessageBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 5) { + return (com.heroiclabs.nakama.api.ChannelMessage) message_; + } + return com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance(); + } + } + /** + *
+     * An incoming message on a realtime chat channel.
+     * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.ChannelMessage, com.heroiclabs.nakama.api.ChannelMessage.Builder, com.heroiclabs.nakama.api.ChannelMessageOrBuilder> + getChannelMessageFieldBuilder() { + if (channelMessageBuilder_ == null) { + if (!(messageCase_ == 5)) { + message_ = com.heroiclabs.nakama.api.ChannelMessage.getDefaultInstance(); + } + channelMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.ChannelMessage, com.heroiclabs.nakama.api.ChannelMessage.Builder, com.heroiclabs.nakama.api.ChannelMessageOrBuilder>( + (com.heroiclabs.nakama.api.ChannelMessage) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 5; + onChanged(); + return channelMessageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageAck, com.heroiclabs.nakama.rtapi.ChannelMessageAck.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageAckOrBuilder> channelMessageAckBuilder_; + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + * @return Whether the channelMessageAck field is set. + */ + @java.lang.Override + public boolean hasChannelMessageAck() { + return messageCase_ == 6; + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + * @return The channelMessageAck. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAck getChannelMessageAck() { + if (channelMessageAckBuilder_ == null) { + if (messageCase_ == 6) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance(); + } else { + if (messageCase_ == 6) { + return channelMessageAckBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance(); + } + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + public Builder setChannelMessageAck(com.heroiclabs.nakama.rtapi.ChannelMessageAck value) { + if (channelMessageAckBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelMessageAckBuilder_.setMessage(value); + } + messageCase_ = 6; + return this; + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + public Builder setChannelMessageAck( + com.heroiclabs.nakama.rtapi.ChannelMessageAck.Builder builderForValue) { + if (channelMessageAckBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelMessageAckBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 6; + return this; + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + public Builder mergeChannelMessageAck(com.heroiclabs.nakama.rtapi.ChannelMessageAck value) { + if (channelMessageAckBuilder_ == null) { + if (messageCase_ == 6 && + message_ != com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageAck.newBuilder((com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 6) { + channelMessageAckBuilder_.mergeFrom(value); + } else { + channelMessageAckBuilder_.setMessage(value); + } + } + messageCase_ = 6; + return this; + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + public Builder clearChannelMessageAck() { + if (channelMessageAckBuilder_ == null) { + if (messageCase_ == 6) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 6) { + messageCase_ = 0; + message_ = null; + } + channelMessageAckBuilder_.clear(); + } + return this; + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + public com.heroiclabs.nakama.rtapi.ChannelMessageAck.Builder getChannelMessageAckBuilder() { + return getChannelMessageAckFieldBuilder().getBuilder(); + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageAckOrBuilder getChannelMessageAckOrBuilder() { + if ((messageCase_ == 6) && (channelMessageAckBuilder_ != null)) { + return channelMessageAckBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 6) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance(); + } + } + /** + *
+     * An acknowledgement received in response to sending a message on a chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageAck, com.heroiclabs.nakama.rtapi.ChannelMessageAck.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageAckOrBuilder> + getChannelMessageAckFieldBuilder() { + if (channelMessageAckBuilder_ == null) { + if (!(messageCase_ == 6)) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageAck.getDefaultInstance(); + } + channelMessageAckBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageAck, com.heroiclabs.nakama.rtapi.ChannelMessageAck.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageAckOrBuilder>( + (com.heroiclabs.nakama.rtapi.ChannelMessageAck) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 6; + onChanged(); + return channelMessageAckBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageSend, com.heroiclabs.nakama.rtapi.ChannelMessageSend.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageSendOrBuilder> channelMessageSendBuilder_; + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + * @return Whether the channelMessageSend field is set. + */ + @java.lang.Override + public boolean hasChannelMessageSend() { + return messageCase_ == 7; + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + * @return The channelMessageSend. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSend getChannelMessageSend() { + if (channelMessageSendBuilder_ == null) { + if (messageCase_ == 7) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance(); + } else { + if (messageCase_ == 7) { + return channelMessageSendBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance(); + } + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + public Builder setChannelMessageSend(com.heroiclabs.nakama.rtapi.ChannelMessageSend value) { + if (channelMessageSendBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelMessageSendBuilder_.setMessage(value); + } + messageCase_ = 7; + return this; + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + public Builder setChannelMessageSend( + com.heroiclabs.nakama.rtapi.ChannelMessageSend.Builder builderForValue) { + if (channelMessageSendBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelMessageSendBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 7; + return this; + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + public Builder mergeChannelMessageSend(com.heroiclabs.nakama.rtapi.ChannelMessageSend value) { + if (channelMessageSendBuilder_ == null) { + if (messageCase_ == 7 && + message_ != com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageSend.newBuilder((com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 7) { + channelMessageSendBuilder_.mergeFrom(value); + } else { + channelMessageSendBuilder_.setMessage(value); + } + } + messageCase_ = 7; + return this; + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + public Builder clearChannelMessageSend() { + if (channelMessageSendBuilder_ == null) { + if (messageCase_ == 7) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 7) { + messageCase_ = 0; + message_ = null; + } + channelMessageSendBuilder_.clear(); + } + return this; + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + public com.heroiclabs.nakama.rtapi.ChannelMessageSend.Builder getChannelMessageSendBuilder() { + return getChannelMessageSendFieldBuilder().getBuilder(); + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageSendOrBuilder getChannelMessageSendOrBuilder() { + if ((messageCase_ == 7) && (channelMessageSendBuilder_ != null)) { + return channelMessageSendBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 7) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance(); + } + } + /** + *
+     * Send a message to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageSend, com.heroiclabs.nakama.rtapi.ChannelMessageSend.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageSendOrBuilder> + getChannelMessageSendFieldBuilder() { + if (channelMessageSendBuilder_ == null) { + if (!(messageCase_ == 7)) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageSend.getDefaultInstance(); + } + channelMessageSendBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageSend, com.heroiclabs.nakama.rtapi.ChannelMessageSend.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageSendOrBuilder>( + (com.heroiclabs.nakama.rtapi.ChannelMessageSend) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 7; + onChanged(); + return channelMessageSendBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate, com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageUpdateOrBuilder> channelMessageUpdateBuilder_; + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + * @return Whether the channelMessageUpdate field is set. + */ + @java.lang.Override + public boolean hasChannelMessageUpdate() { + return messageCase_ == 8; + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + * @return The channelMessageUpdate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdate getChannelMessageUpdate() { + if (channelMessageUpdateBuilder_ == null) { + if (messageCase_ == 8) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance(); + } else { + if (messageCase_ == 8) { + return channelMessageUpdateBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance(); + } + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + public Builder setChannelMessageUpdate(com.heroiclabs.nakama.rtapi.ChannelMessageUpdate value) { + if (channelMessageUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelMessageUpdateBuilder_.setMessage(value); + } + messageCase_ = 8; + return this; + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + public Builder setChannelMessageUpdate( + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.Builder builderForValue) { + if (channelMessageUpdateBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelMessageUpdateBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 8; + return this; + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + public Builder mergeChannelMessageUpdate(com.heroiclabs.nakama.rtapi.ChannelMessageUpdate value) { + if (channelMessageUpdateBuilder_ == null) { + if (messageCase_ == 8 && + message_ != com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.newBuilder((com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 8) { + channelMessageUpdateBuilder_.mergeFrom(value); + } else { + channelMessageUpdateBuilder_.setMessage(value); + } + } + messageCase_ = 8; + return this; + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + public Builder clearChannelMessageUpdate() { + if (channelMessageUpdateBuilder_ == null) { + if (messageCase_ == 8) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 8) { + messageCase_ = 0; + message_ = null; + } + channelMessageUpdateBuilder_.clear(); + } + return this; + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.Builder getChannelMessageUpdateBuilder() { + return getChannelMessageUpdateFieldBuilder().getBuilder(); + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageUpdateOrBuilder getChannelMessageUpdateOrBuilder() { + if ((messageCase_ == 8) && (channelMessageUpdateBuilder_ != null)) { + return channelMessageUpdateBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 8) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance(); + } + } + /** + *
+     * Update a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate, com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageUpdateOrBuilder> + getChannelMessageUpdateFieldBuilder() { + if (channelMessageUpdateBuilder_ == null) { + if (!(messageCase_ == 8)) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.getDefaultInstance(); + } + channelMessageUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate, com.heroiclabs.nakama.rtapi.ChannelMessageUpdate.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageUpdateOrBuilder>( + (com.heroiclabs.nakama.rtapi.ChannelMessageUpdate) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 8; + onChanged(); + return channelMessageUpdateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageRemove, com.heroiclabs.nakama.rtapi.ChannelMessageRemove.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageRemoveOrBuilder> channelMessageRemoveBuilder_; + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + * @return Whether the channelMessageRemove field is set. + */ + @java.lang.Override + public boolean hasChannelMessageRemove() { + return messageCase_ == 9; + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + * @return The channelMessageRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemove getChannelMessageRemove() { + if (channelMessageRemoveBuilder_ == null) { + if (messageCase_ == 9) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance(); + } else { + if (messageCase_ == 9) { + return channelMessageRemoveBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance(); + } + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + public Builder setChannelMessageRemove(com.heroiclabs.nakama.rtapi.ChannelMessageRemove value) { + if (channelMessageRemoveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelMessageRemoveBuilder_.setMessage(value); + } + messageCase_ = 9; + return this; + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + public Builder setChannelMessageRemove( + com.heroiclabs.nakama.rtapi.ChannelMessageRemove.Builder builderForValue) { + if (channelMessageRemoveBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelMessageRemoveBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 9; + return this; + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + public Builder mergeChannelMessageRemove(com.heroiclabs.nakama.rtapi.ChannelMessageRemove value) { + if (channelMessageRemoveBuilder_ == null) { + if (messageCase_ == 9 && + message_ != com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageRemove.newBuilder((com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 9) { + channelMessageRemoveBuilder_.mergeFrom(value); + } else { + channelMessageRemoveBuilder_.setMessage(value); + } + } + messageCase_ = 9; + return this; + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + public Builder clearChannelMessageRemove() { + if (channelMessageRemoveBuilder_ == null) { + if (messageCase_ == 9) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 9) { + messageCase_ = 0; + message_ = null; + } + channelMessageRemoveBuilder_.clear(); + } + return this; + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + public com.heroiclabs.nakama.rtapi.ChannelMessageRemove.Builder getChannelMessageRemoveBuilder() { + return getChannelMessageRemoveFieldBuilder().getBuilder(); + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelMessageRemoveOrBuilder getChannelMessageRemoveOrBuilder() { + if ((messageCase_ == 9) && (channelMessageRemoveBuilder_ != null)) { + return channelMessageRemoveBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 9) { + return (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance(); + } + } + /** + *
+     * Remove a message previously sent to a realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageRemove, com.heroiclabs.nakama.rtapi.ChannelMessageRemove.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageRemoveOrBuilder> + getChannelMessageRemoveFieldBuilder() { + if (channelMessageRemoveBuilder_ == null) { + if (!(messageCase_ == 9)) { + message_ = com.heroiclabs.nakama.rtapi.ChannelMessageRemove.getDefaultInstance(); + } + channelMessageRemoveBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelMessageRemove, com.heroiclabs.nakama.rtapi.ChannelMessageRemove.Builder, com.heroiclabs.nakama.rtapi.ChannelMessageRemoveOrBuilder>( + (com.heroiclabs.nakama.rtapi.ChannelMessageRemove) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 9; + onChanged(); + return channelMessageRemoveBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent, com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.ChannelPresenceEventOrBuilder> channelPresenceEventBuilder_; + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + * @return Whether the channelPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasChannelPresenceEvent() { + return messageCase_ == 10; + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + * @return The channelPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEvent getChannelPresenceEvent() { + if (channelPresenceEventBuilder_ == null) { + if (messageCase_ == 10) { + return (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance(); + } else { + if (messageCase_ == 10) { + return channelPresenceEventBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + public Builder setChannelPresenceEvent(com.heroiclabs.nakama.rtapi.ChannelPresenceEvent value) { + if (channelPresenceEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + channelPresenceEventBuilder_.setMessage(value); + } + messageCase_ = 10; + return this; + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + public Builder setChannelPresenceEvent( + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.Builder builderForValue) { + if (channelPresenceEventBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + channelPresenceEventBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 10; + return this; + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + public Builder mergeChannelPresenceEvent(com.heroiclabs.nakama.rtapi.ChannelPresenceEvent value) { + if (channelPresenceEventBuilder_ == null) { + if (messageCase_ == 10 && + message_ != com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.newBuilder((com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 10) { + channelPresenceEventBuilder_.mergeFrom(value); + } else { + channelPresenceEventBuilder_.setMessage(value); + } + } + messageCase_ = 10; + return this; + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + public Builder clearChannelPresenceEvent() { + if (channelPresenceEventBuilder_ == null) { + if (messageCase_ == 10) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 10) { + messageCase_ = 0; + message_ = null; + } + channelPresenceEventBuilder_.clear(); + } + return this; + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + public com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.Builder getChannelPresenceEventBuilder() { + return getChannelPresenceEventFieldBuilder().getBuilder(); + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ChannelPresenceEventOrBuilder getChannelPresenceEventOrBuilder() { + if ((messageCase_ == 10) && (channelPresenceEventBuilder_ != null)) { + return channelPresenceEventBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 10) { + return (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular realtime chat channel.
+     * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent, com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.ChannelPresenceEventOrBuilder> + getChannelPresenceEventFieldBuilder() { + if (channelPresenceEventBuilder_ == null) { + if (!(messageCase_ == 10)) { + message_ = com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.getDefaultInstance(); + } + channelPresenceEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent, com.heroiclabs.nakama.rtapi.ChannelPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.ChannelPresenceEventOrBuilder>( + (com.heroiclabs.nakama.rtapi.ChannelPresenceEvent) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 10; + onChanged(); + return channelPresenceEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Error, com.heroiclabs.nakama.rtapi.Error.Builder, com.heroiclabs.nakama.rtapi.ErrorOrBuilder> errorBuilder_; + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return messageCase_ == 11; + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + * @return The error. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Error getError() { + if (errorBuilder_ == null) { + if (messageCase_ == 11) { + return (com.heroiclabs.nakama.rtapi.Error) message_; + } + return com.heroiclabs.nakama.rtapi.Error.getDefaultInstance(); + } else { + if (messageCase_ == 11) { + return errorBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Error.getDefaultInstance(); + } + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + public Builder setError(com.heroiclabs.nakama.rtapi.Error value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + messageCase_ = 11; + return this; + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + public Builder setError( + com.heroiclabs.nakama.rtapi.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 11; + return this; + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + public Builder mergeError(com.heroiclabs.nakama.rtapi.Error value) { + if (errorBuilder_ == null) { + if (messageCase_ == 11 && + message_ != com.heroiclabs.nakama.rtapi.Error.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Error.newBuilder((com.heroiclabs.nakama.rtapi.Error) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 11) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + messageCase_ = 11; + return this; + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (messageCase_ == 11) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 11) { + messageCase_ = 0; + message_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + public com.heroiclabs.nakama.rtapi.Error.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.ErrorOrBuilder getErrorOrBuilder() { + if ((messageCase_ == 11) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 11) { + return (com.heroiclabs.nakama.rtapi.Error) message_; + } + return com.heroiclabs.nakama.rtapi.Error.getDefaultInstance(); + } + } + /** + *
+     * Describes an error which occurred on the server.
+     * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Error, com.heroiclabs.nakama.rtapi.Error.Builder, com.heroiclabs.nakama.rtapi.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(messageCase_ == 11)) { + message_ = com.heroiclabs.nakama.rtapi.Error.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Error, com.heroiclabs.nakama.rtapi.Error.Builder, com.heroiclabs.nakama.rtapi.ErrorOrBuilder>( + (com.heroiclabs.nakama.rtapi.Error) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 11; + onChanged(); + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Match, com.heroiclabs.nakama.rtapi.Match.Builder, com.heroiclabs.nakama.rtapi.MatchOrBuilder> matchBuilder_; + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + * @return Whether the match field is set. + */ + @java.lang.Override + public boolean hasMatch() { + return messageCase_ == 12; + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + * @return The match. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Match getMatch() { + if (matchBuilder_ == null) { + if (messageCase_ == 12) { + return (com.heroiclabs.nakama.rtapi.Match) message_; + } + return com.heroiclabs.nakama.rtapi.Match.getDefaultInstance(); + } else { + if (messageCase_ == 12) { + return matchBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Match.getDefaultInstance(); + } + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + public Builder setMatch(com.heroiclabs.nakama.rtapi.Match value) { + if (matchBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchBuilder_.setMessage(value); + } + messageCase_ = 12; + return this; + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + public Builder setMatch( + com.heroiclabs.nakama.rtapi.Match.Builder builderForValue) { + if (matchBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 12; + return this; + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + public Builder mergeMatch(com.heroiclabs.nakama.rtapi.Match value) { + if (matchBuilder_ == null) { + if (messageCase_ == 12 && + message_ != com.heroiclabs.nakama.rtapi.Match.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Match.newBuilder((com.heroiclabs.nakama.rtapi.Match) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 12) { + matchBuilder_.mergeFrom(value); + } else { + matchBuilder_.setMessage(value); + } + } + messageCase_ = 12; + return this; + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + public Builder clearMatch() { + if (matchBuilder_ == null) { + if (messageCase_ == 12) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 12) { + messageCase_ = 0; + message_ = null; + } + matchBuilder_.clear(); + } + return this; + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + public com.heroiclabs.nakama.rtapi.Match.Builder getMatchBuilder() { + return getMatchFieldBuilder().getBuilder(); + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchOrBuilder getMatchOrBuilder() { + if ((messageCase_ == 12) && (matchBuilder_ != null)) { + return matchBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 12) { + return (com.heroiclabs.nakama.rtapi.Match) message_; + } + return com.heroiclabs.nakama.rtapi.Match.getDefaultInstance(); + } + } + /** + *
+     * Incoming information about a realtime match.
+     * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Match, com.heroiclabs.nakama.rtapi.Match.Builder, com.heroiclabs.nakama.rtapi.MatchOrBuilder> + getMatchFieldBuilder() { + if (matchBuilder_ == null) { + if (!(messageCase_ == 12)) { + message_ = com.heroiclabs.nakama.rtapi.Match.getDefaultInstance(); + } + matchBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Match, com.heroiclabs.nakama.rtapi.Match.Builder, com.heroiclabs.nakama.rtapi.MatchOrBuilder>( + (com.heroiclabs.nakama.rtapi.Match) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 12; + onChanged(); + return matchBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchCreate, com.heroiclabs.nakama.rtapi.MatchCreate.Builder, com.heroiclabs.nakama.rtapi.MatchCreateOrBuilder> matchCreateBuilder_; + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + * @return Whether the matchCreate field is set. + */ + @java.lang.Override + public boolean hasMatchCreate() { + return messageCase_ == 13; + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + * @return The matchCreate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreate getMatchCreate() { + if (matchCreateBuilder_ == null) { + if (messageCase_ == 13) { + return (com.heroiclabs.nakama.rtapi.MatchCreate) message_; + } + return com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance(); + } else { + if (messageCase_ == 13) { + return matchCreateBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + public Builder setMatchCreate(com.heroiclabs.nakama.rtapi.MatchCreate value) { + if (matchCreateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchCreateBuilder_.setMessage(value); + } + messageCase_ = 13; + return this; + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + public Builder setMatchCreate( + com.heroiclabs.nakama.rtapi.MatchCreate.Builder builderForValue) { + if (matchCreateBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchCreateBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 13; + return this; + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + public Builder mergeMatchCreate(com.heroiclabs.nakama.rtapi.MatchCreate value) { + if (matchCreateBuilder_ == null) { + if (messageCase_ == 13 && + message_ != com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchCreate.newBuilder((com.heroiclabs.nakama.rtapi.MatchCreate) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 13) { + matchCreateBuilder_.mergeFrom(value); + } else { + matchCreateBuilder_.setMessage(value); + } + } + messageCase_ = 13; + return this; + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + public Builder clearMatchCreate() { + if (matchCreateBuilder_ == null) { + if (messageCase_ == 13) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 13) { + messageCase_ = 0; + message_ = null; + } + matchCreateBuilder_.clear(); + } + return this; + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + public com.heroiclabs.nakama.rtapi.MatchCreate.Builder getMatchCreateBuilder() { + return getMatchCreateFieldBuilder().getBuilder(); + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreateOrBuilder getMatchCreateOrBuilder() { + if ((messageCase_ == 13) && (matchCreateBuilder_ != null)) { + return matchCreateBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 13) { + return (com.heroiclabs.nakama.rtapi.MatchCreate) message_; + } + return com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to create a realtime match.
+     * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchCreate, com.heroiclabs.nakama.rtapi.MatchCreate.Builder, com.heroiclabs.nakama.rtapi.MatchCreateOrBuilder> + getMatchCreateFieldBuilder() { + if (matchCreateBuilder_ == null) { + if (!(messageCase_ == 13)) { + message_ = com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance(); + } + matchCreateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchCreate, com.heroiclabs.nakama.rtapi.MatchCreate.Builder, com.heroiclabs.nakama.rtapi.MatchCreateOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchCreate) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 13; + onChanged(); + return matchCreateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchData, com.heroiclabs.nakama.rtapi.MatchData.Builder, com.heroiclabs.nakama.rtapi.MatchDataOrBuilder> matchDataBuilder_; + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + * @return Whether the matchData field is set. + */ + @java.lang.Override + public boolean hasMatchData() { + return messageCase_ == 14; + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + * @return The matchData. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchData getMatchData() { + if (matchDataBuilder_ == null) { + if (messageCase_ == 14) { + return (com.heroiclabs.nakama.rtapi.MatchData) message_; + } + return com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance(); + } else { + if (messageCase_ == 14) { + return matchDataBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance(); + } + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + public Builder setMatchData(com.heroiclabs.nakama.rtapi.MatchData value) { + if (matchDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchDataBuilder_.setMessage(value); + } + messageCase_ = 14; + return this; + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + public Builder setMatchData( + com.heroiclabs.nakama.rtapi.MatchData.Builder builderForValue) { + if (matchDataBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchDataBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 14; + return this; + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + public Builder mergeMatchData(com.heroiclabs.nakama.rtapi.MatchData value) { + if (matchDataBuilder_ == null) { + if (messageCase_ == 14 && + message_ != com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchData.newBuilder((com.heroiclabs.nakama.rtapi.MatchData) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 14) { + matchDataBuilder_.mergeFrom(value); + } else { + matchDataBuilder_.setMessage(value); + } + } + messageCase_ = 14; + return this; + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + public Builder clearMatchData() { + if (matchDataBuilder_ == null) { + if (messageCase_ == 14) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 14) { + messageCase_ = 0; + message_ = null; + } + matchDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + public com.heroiclabs.nakama.rtapi.MatchData.Builder getMatchDataBuilder() { + return getMatchDataFieldBuilder().getBuilder(); + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataOrBuilder getMatchDataOrBuilder() { + if ((messageCase_ == 14) && (matchDataBuilder_ != null)) { + return matchDataBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 14) { + return (com.heroiclabs.nakama.rtapi.MatchData) message_; + } + return com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance(); + } + } + /** + *
+     * Incoming realtime match data delivered from the server.
+     * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchData, com.heroiclabs.nakama.rtapi.MatchData.Builder, com.heroiclabs.nakama.rtapi.MatchDataOrBuilder> + getMatchDataFieldBuilder() { + if (matchDataBuilder_ == null) { + if (!(messageCase_ == 14)) { + message_ = com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance(); + } + matchDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchData, com.heroiclabs.nakama.rtapi.MatchData.Builder, com.heroiclabs.nakama.rtapi.MatchDataOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchData) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 14; + onChanged(); + return matchDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchDataSend, com.heroiclabs.nakama.rtapi.MatchDataSend.Builder, com.heroiclabs.nakama.rtapi.MatchDataSendOrBuilder> matchDataSendBuilder_; + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + * @return Whether the matchDataSend field is set. + */ + @java.lang.Override + public boolean hasMatchDataSend() { + return messageCase_ == 15; + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + * @return The matchDataSend. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSend getMatchDataSend() { + if (matchDataSendBuilder_ == null) { + if (messageCase_ == 15) { + return (com.heroiclabs.nakama.rtapi.MatchDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance(); + } else { + if (messageCase_ == 15) { + return matchDataSendBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + public Builder setMatchDataSend(com.heroiclabs.nakama.rtapi.MatchDataSend value) { + if (matchDataSendBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchDataSendBuilder_.setMessage(value); + } + messageCase_ = 15; + return this; + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + public Builder setMatchDataSend( + com.heroiclabs.nakama.rtapi.MatchDataSend.Builder builderForValue) { + if (matchDataSendBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchDataSendBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 15; + return this; + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + public Builder mergeMatchDataSend(com.heroiclabs.nakama.rtapi.MatchDataSend value) { + if (matchDataSendBuilder_ == null) { + if (messageCase_ == 15 && + message_ != com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchDataSend.newBuilder((com.heroiclabs.nakama.rtapi.MatchDataSend) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 15) { + matchDataSendBuilder_.mergeFrom(value); + } else { + matchDataSendBuilder_.setMessage(value); + } + } + messageCase_ = 15; + return this; + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + public Builder clearMatchDataSend() { + if (matchDataSendBuilder_ == null) { + if (messageCase_ == 15) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 15) { + messageCase_ = 0; + message_ = null; + } + matchDataSendBuilder_.clear(); + } + return this; + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + public com.heroiclabs.nakama.rtapi.MatchDataSend.Builder getMatchDataSendBuilder() { + return getMatchDataSendFieldBuilder().getBuilder(); + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSendOrBuilder getMatchDataSendOrBuilder() { + if ((messageCase_ == 15) && (matchDataSendBuilder_ != null)) { + return matchDataSendBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 15) { + return (com.heroiclabs.nakama.rtapi.MatchDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to send data to a realtime match.
+     * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchDataSend, com.heroiclabs.nakama.rtapi.MatchDataSend.Builder, com.heroiclabs.nakama.rtapi.MatchDataSendOrBuilder> + getMatchDataSendFieldBuilder() { + if (matchDataSendBuilder_ == null) { + if (!(messageCase_ == 15)) { + message_ = com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance(); + } + matchDataSendBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchDataSend, com.heroiclabs.nakama.rtapi.MatchDataSend.Builder, com.heroiclabs.nakama.rtapi.MatchDataSendOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchDataSend) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 15; + onChanged(); + return matchDataSendBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchJoin, com.heroiclabs.nakama.rtapi.MatchJoin.Builder, com.heroiclabs.nakama.rtapi.MatchJoinOrBuilder> matchJoinBuilder_; + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + * @return Whether the matchJoin field is set. + */ + @java.lang.Override + public boolean hasMatchJoin() { + return messageCase_ == 16; + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + * @return The matchJoin. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoin getMatchJoin() { + if (matchJoinBuilder_ == null) { + if (messageCase_ == 16) { + return (com.heroiclabs.nakama.rtapi.MatchJoin) message_; + } + return com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance(); + } else { + if (messageCase_ == 16) { + return matchJoinBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + public Builder setMatchJoin(com.heroiclabs.nakama.rtapi.MatchJoin value) { + if (matchJoinBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchJoinBuilder_.setMessage(value); + } + messageCase_ = 16; + return this; + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + public Builder setMatchJoin( + com.heroiclabs.nakama.rtapi.MatchJoin.Builder builderForValue) { + if (matchJoinBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchJoinBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 16; + return this; + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + public Builder mergeMatchJoin(com.heroiclabs.nakama.rtapi.MatchJoin value) { + if (matchJoinBuilder_ == null) { + if (messageCase_ == 16 && + message_ != com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchJoin.newBuilder((com.heroiclabs.nakama.rtapi.MatchJoin) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 16) { + matchJoinBuilder_.mergeFrom(value); + } else { + matchJoinBuilder_.setMessage(value); + } + } + messageCase_ = 16; + return this; + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + public Builder clearMatchJoin() { + if (matchJoinBuilder_ == null) { + if (messageCase_ == 16) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 16) { + messageCase_ = 0; + message_ = null; + } + matchJoinBuilder_.clear(); + } + return this; + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + public com.heroiclabs.nakama.rtapi.MatchJoin.Builder getMatchJoinBuilder() { + return getMatchJoinFieldBuilder().getBuilder(); + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoinOrBuilder getMatchJoinOrBuilder() { + if ((messageCase_ == 16) && (matchJoinBuilder_ != null)) { + return matchJoinBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 16) { + return (com.heroiclabs.nakama.rtapi.MatchJoin) message_; + } + return com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to join a realtime match.
+     * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchJoin, com.heroiclabs.nakama.rtapi.MatchJoin.Builder, com.heroiclabs.nakama.rtapi.MatchJoinOrBuilder> + getMatchJoinFieldBuilder() { + if (matchJoinBuilder_ == null) { + if (!(messageCase_ == 16)) { + message_ = com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance(); + } + matchJoinBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchJoin, com.heroiclabs.nakama.rtapi.MatchJoin.Builder, com.heroiclabs.nakama.rtapi.MatchJoinOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchJoin) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 16; + onChanged(); + return matchJoinBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchLeave, com.heroiclabs.nakama.rtapi.MatchLeave.Builder, com.heroiclabs.nakama.rtapi.MatchLeaveOrBuilder> matchLeaveBuilder_; + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + * @return Whether the matchLeave field is set. + */ + @java.lang.Override + public boolean hasMatchLeave() { + return messageCase_ == 17; + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + * @return The matchLeave. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeave getMatchLeave() { + if (matchLeaveBuilder_ == null) { + if (messageCase_ == 17) { + return (com.heroiclabs.nakama.rtapi.MatchLeave) message_; + } + return com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance(); + } else { + if (messageCase_ == 17) { + return matchLeaveBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + public Builder setMatchLeave(com.heroiclabs.nakama.rtapi.MatchLeave value) { + if (matchLeaveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchLeaveBuilder_.setMessage(value); + } + messageCase_ = 17; + return this; + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + public Builder setMatchLeave( + com.heroiclabs.nakama.rtapi.MatchLeave.Builder builderForValue) { + if (matchLeaveBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchLeaveBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 17; + return this; + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + public Builder mergeMatchLeave(com.heroiclabs.nakama.rtapi.MatchLeave value) { + if (matchLeaveBuilder_ == null) { + if (messageCase_ == 17 && + message_ != com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchLeave.newBuilder((com.heroiclabs.nakama.rtapi.MatchLeave) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 17) { + matchLeaveBuilder_.mergeFrom(value); + } else { + matchLeaveBuilder_.setMessage(value); + } + } + messageCase_ = 17; + return this; + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + public Builder clearMatchLeave() { + if (matchLeaveBuilder_ == null) { + if (messageCase_ == 17) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 17) { + messageCase_ = 0; + message_ = null; + } + matchLeaveBuilder_.clear(); + } + return this; + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + public com.heroiclabs.nakama.rtapi.MatchLeave.Builder getMatchLeaveBuilder() { + return getMatchLeaveFieldBuilder().getBuilder(); + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeaveOrBuilder getMatchLeaveOrBuilder() { + if ((messageCase_ == 17) && (matchLeaveBuilder_ != null)) { + return matchLeaveBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 17) { + return (com.heroiclabs.nakama.rtapi.MatchLeave) message_; + } + return com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to leave a realtime match.
+     * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchLeave, com.heroiclabs.nakama.rtapi.MatchLeave.Builder, com.heroiclabs.nakama.rtapi.MatchLeaveOrBuilder> + getMatchLeaveFieldBuilder() { + if (matchLeaveBuilder_ == null) { + if (!(messageCase_ == 17)) { + message_ = com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance(); + } + matchLeaveBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchLeave, com.heroiclabs.nakama.rtapi.MatchLeave.Builder, com.heroiclabs.nakama.rtapi.MatchLeaveOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchLeave) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 17; + onChanged(); + return matchLeaveBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchPresenceEvent, com.heroiclabs.nakama.rtapi.MatchPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.MatchPresenceEventOrBuilder> matchPresenceEventBuilder_; + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + * @return Whether the matchPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasMatchPresenceEvent() { + return messageCase_ == 18; + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + * @return The matchPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEvent getMatchPresenceEvent() { + if (matchPresenceEventBuilder_ == null) { + if (messageCase_ == 18) { + return (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance(); + } else { + if (messageCase_ == 18) { + return matchPresenceEventBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + public Builder setMatchPresenceEvent(com.heroiclabs.nakama.rtapi.MatchPresenceEvent value) { + if (matchPresenceEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchPresenceEventBuilder_.setMessage(value); + } + messageCase_ = 18; + return this; + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + public Builder setMatchPresenceEvent( + com.heroiclabs.nakama.rtapi.MatchPresenceEvent.Builder builderForValue) { + if (matchPresenceEventBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchPresenceEventBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 18; + return this; + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + public Builder mergeMatchPresenceEvent(com.heroiclabs.nakama.rtapi.MatchPresenceEvent value) { + if (matchPresenceEventBuilder_ == null) { + if (messageCase_ == 18 && + message_ != com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchPresenceEvent.newBuilder((com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 18) { + matchPresenceEventBuilder_.mergeFrom(value); + } else { + matchPresenceEventBuilder_.setMessage(value); + } + } + messageCase_ = 18; + return this; + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + public Builder clearMatchPresenceEvent() { + if (matchPresenceEventBuilder_ == null) { + if (messageCase_ == 18) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 18) { + messageCase_ = 0; + message_ = null; + } + matchPresenceEventBuilder_.clear(); + } + return this; + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + public com.heroiclabs.nakama.rtapi.MatchPresenceEvent.Builder getMatchPresenceEventBuilder() { + return getMatchPresenceEventFieldBuilder().getBuilder(); + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEventOrBuilder getMatchPresenceEventOrBuilder() { + if ((messageCase_ == 18) && (matchPresenceEventBuilder_ != null)) { + return matchPresenceEventBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 18) { + return (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular realtime match.
+     * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchPresenceEvent, com.heroiclabs.nakama.rtapi.MatchPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.MatchPresenceEventOrBuilder> + getMatchPresenceEventFieldBuilder() { + if (matchPresenceEventBuilder_ == null) { + if (!(messageCase_ == 18)) { + message_ = com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance(); + } + matchPresenceEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchPresenceEvent, com.heroiclabs.nakama.rtapi.MatchPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.MatchPresenceEventOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 18; + onChanged(); + return matchPresenceEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerAdd, com.heroiclabs.nakama.rtapi.MatchmakerAdd.Builder, com.heroiclabs.nakama.rtapi.MatchmakerAddOrBuilder> matchmakerAddBuilder_; + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + * @return Whether the matchmakerAdd field is set. + */ + @java.lang.Override + public boolean hasMatchmakerAdd() { + return messageCase_ == 19; + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + * @return The matchmakerAdd. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAdd getMatchmakerAdd() { + if (matchmakerAddBuilder_ == null) { + if (messageCase_ == 19) { + return (com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance(); + } else { + if (messageCase_ == 19) { + return matchmakerAddBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance(); + } + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + public Builder setMatchmakerAdd(com.heroiclabs.nakama.rtapi.MatchmakerAdd value) { + if (matchmakerAddBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchmakerAddBuilder_.setMessage(value); + } + messageCase_ = 19; + return this; + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + public Builder setMatchmakerAdd( + com.heroiclabs.nakama.rtapi.MatchmakerAdd.Builder builderForValue) { + if (matchmakerAddBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchmakerAddBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 19; + return this; + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + public Builder mergeMatchmakerAdd(com.heroiclabs.nakama.rtapi.MatchmakerAdd value) { + if (matchmakerAddBuilder_ == null) { + if (messageCase_ == 19 && + message_ != com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerAdd.newBuilder((com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 19) { + matchmakerAddBuilder_.mergeFrom(value); + } else { + matchmakerAddBuilder_.setMessage(value); + } + } + messageCase_ = 19; + return this; + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + public Builder clearMatchmakerAdd() { + if (matchmakerAddBuilder_ == null) { + if (messageCase_ == 19) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 19) { + messageCase_ = 0; + message_ = null; + } + matchmakerAddBuilder_.clear(); + } + return this; + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerAdd.Builder getMatchmakerAddBuilder() { + return getMatchmakerAddFieldBuilder().getBuilder(); + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAddOrBuilder getMatchmakerAddOrBuilder() { + if ((messageCase_ == 19) && (matchmakerAddBuilder_ != null)) { + return matchmakerAddBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 19) { + return (com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance(); + } + } + /** + *
+     * Submit a new matchmaking process request.
+     * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerAdd, com.heroiclabs.nakama.rtapi.MatchmakerAdd.Builder, com.heroiclabs.nakama.rtapi.MatchmakerAddOrBuilder> + getMatchmakerAddFieldBuilder() { + if (matchmakerAddBuilder_ == null) { + if (!(messageCase_ == 19)) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance(); + } + matchmakerAddBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerAdd, com.heroiclabs.nakama.rtapi.MatchmakerAdd.Builder, com.heroiclabs.nakama.rtapi.MatchmakerAddOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchmakerAdd) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 19; + onChanged(); + return matchmakerAddBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched, com.heroiclabs.nakama.rtapi.MatchmakerMatched.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatchedOrBuilder> matchmakerMatchedBuilder_; + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + * @return Whether the matchmakerMatched field is set. + */ + @java.lang.Override + public boolean hasMatchmakerMatched() { + return messageCase_ == 20; + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + * @return The matchmakerMatched. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched getMatchmakerMatched() { + if (matchmakerMatchedBuilder_ == null) { + if (messageCase_ == 20) { + return (com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance(); + } else { + if (messageCase_ == 20) { + return matchmakerMatchedBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance(); + } + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + public Builder setMatchmakerMatched(com.heroiclabs.nakama.rtapi.MatchmakerMatched value) { + if (matchmakerMatchedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchmakerMatchedBuilder_.setMessage(value); + } + messageCase_ = 20; + return this; + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + public Builder setMatchmakerMatched( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.Builder builderForValue) { + if (matchmakerMatchedBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchmakerMatchedBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 20; + return this; + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + public Builder mergeMatchmakerMatched(com.heroiclabs.nakama.rtapi.MatchmakerMatched value) { + if (matchmakerMatchedBuilder_ == null) { + if (messageCase_ == 20 && + message_ != com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerMatched.newBuilder((com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 20) { + matchmakerMatchedBuilder_.mergeFrom(value); + } else { + matchmakerMatchedBuilder_.setMessage(value); + } + } + messageCase_ = 20; + return this; + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + public Builder clearMatchmakerMatched() { + if (matchmakerMatchedBuilder_ == null) { + if (messageCase_ == 20) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 20) { + messageCase_ = 0; + message_ = null; + } + matchmakerMatchedBuilder_.clear(); + } + return this; + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.Builder getMatchmakerMatchedBuilder() { + return getMatchmakerMatchedFieldBuilder().getBuilder(); + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatchedOrBuilder getMatchmakerMatchedOrBuilder() { + if ((messageCase_ == 20) && (matchmakerMatchedBuilder_ != null)) { + return matchmakerMatchedBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 20) { + return (com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance(); + } + } + /** + *
+     * A successful matchmaking result.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched, com.heroiclabs.nakama.rtapi.MatchmakerMatched.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatchedOrBuilder> + getMatchmakerMatchedFieldBuilder() { + if (matchmakerMatchedBuilder_ == null) { + if (!(messageCase_ == 20)) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance(); + } + matchmakerMatchedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched, com.heroiclabs.nakama.rtapi.MatchmakerMatched.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatchedOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchmakerMatched) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 20; + onChanged(); + return matchmakerMatchedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerRemove, com.heroiclabs.nakama.rtapi.MatchmakerRemove.Builder, com.heroiclabs.nakama.rtapi.MatchmakerRemoveOrBuilder> matchmakerRemoveBuilder_; + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + * @return Whether the matchmakerRemove field is set. + */ + @java.lang.Override + public boolean hasMatchmakerRemove() { + return messageCase_ == 21; + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + * @return The matchmakerRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemove getMatchmakerRemove() { + if (matchmakerRemoveBuilder_ == null) { + if (messageCase_ == 21) { + return (com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance(); + } else { + if (messageCase_ == 21) { + return matchmakerRemoveBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance(); + } + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + public Builder setMatchmakerRemove(com.heroiclabs.nakama.rtapi.MatchmakerRemove value) { + if (matchmakerRemoveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchmakerRemoveBuilder_.setMessage(value); + } + messageCase_ = 21; + return this; + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + public Builder setMatchmakerRemove( + com.heroiclabs.nakama.rtapi.MatchmakerRemove.Builder builderForValue) { + if (matchmakerRemoveBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchmakerRemoveBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 21; + return this; + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + public Builder mergeMatchmakerRemove(com.heroiclabs.nakama.rtapi.MatchmakerRemove value) { + if (matchmakerRemoveBuilder_ == null) { + if (messageCase_ == 21 && + message_ != com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerRemove.newBuilder((com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 21) { + matchmakerRemoveBuilder_.mergeFrom(value); + } else { + matchmakerRemoveBuilder_.setMessage(value); + } + } + messageCase_ = 21; + return this; + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + public Builder clearMatchmakerRemove() { + if (matchmakerRemoveBuilder_ == null) { + if (messageCase_ == 21) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 21) { + messageCase_ = 0; + message_ = null; + } + matchmakerRemoveBuilder_.clear(); + } + return this; + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerRemove.Builder getMatchmakerRemoveBuilder() { + return getMatchmakerRemoveFieldBuilder().getBuilder(); + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemoveOrBuilder getMatchmakerRemoveOrBuilder() { + if ((messageCase_ == 21) && (matchmakerRemoveBuilder_ != null)) { + return matchmakerRemoveBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 21) { + return (com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance(); + } + } + /** + *
+     * Cancel a matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerRemove, com.heroiclabs.nakama.rtapi.MatchmakerRemove.Builder, com.heroiclabs.nakama.rtapi.MatchmakerRemoveOrBuilder> + getMatchmakerRemoveFieldBuilder() { + if (matchmakerRemoveBuilder_ == null) { + if (!(messageCase_ == 21)) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance(); + } + matchmakerRemoveBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerRemove, com.heroiclabs.nakama.rtapi.MatchmakerRemove.Builder, com.heroiclabs.nakama.rtapi.MatchmakerRemoveOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchmakerRemove) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 21; + onChanged(); + return matchmakerRemoveBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerTicket, com.heroiclabs.nakama.rtapi.MatchmakerTicket.Builder, com.heroiclabs.nakama.rtapi.MatchmakerTicketOrBuilder> matchmakerTicketBuilder_; + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + * @return Whether the matchmakerTicket field is set. + */ + @java.lang.Override + public boolean hasMatchmakerTicket() { + return messageCase_ == 22; + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + * @return The matchmakerTicket. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicket getMatchmakerTicket() { + if (matchmakerTicketBuilder_ == null) { + if (messageCase_ == 22) { + return (com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance(); + } else { + if (messageCase_ == 22) { + return matchmakerTicketBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance(); + } + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + public Builder setMatchmakerTicket(com.heroiclabs.nakama.rtapi.MatchmakerTicket value) { + if (matchmakerTicketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + matchmakerTicketBuilder_.setMessage(value); + } + messageCase_ = 22; + return this; + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + public Builder setMatchmakerTicket( + com.heroiclabs.nakama.rtapi.MatchmakerTicket.Builder builderForValue) { + if (matchmakerTicketBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + matchmakerTicketBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 22; + return this; + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + public Builder mergeMatchmakerTicket(com.heroiclabs.nakama.rtapi.MatchmakerTicket value) { + if (matchmakerTicketBuilder_ == null) { + if (messageCase_ == 22 && + message_ != com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerTicket.newBuilder((com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 22) { + matchmakerTicketBuilder_.mergeFrom(value); + } else { + matchmakerTicketBuilder_.setMessage(value); + } + } + messageCase_ = 22; + return this; + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + public Builder clearMatchmakerTicket() { + if (matchmakerTicketBuilder_ == null) { + if (messageCase_ == 22) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 22) { + messageCase_ = 0; + message_ = null; + } + matchmakerTicketBuilder_.clear(); + } + return this; + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerTicket.Builder getMatchmakerTicketBuilder() { + return getMatchmakerTicketFieldBuilder().getBuilder(); + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicketOrBuilder getMatchmakerTicketOrBuilder() { + if ((messageCase_ == 22) && (matchmakerTicketBuilder_ != null)) { + return matchmakerTicketBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 22) { + return (com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance(); + } + } + /** + *
+     * A response from starting a new matchmaking process.
+     * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerTicket, com.heroiclabs.nakama.rtapi.MatchmakerTicket.Builder, com.heroiclabs.nakama.rtapi.MatchmakerTicketOrBuilder> + getMatchmakerTicketFieldBuilder() { + if (matchmakerTicketBuilder_ == null) { + if (!(messageCase_ == 22)) { + message_ = com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance(); + } + matchmakerTicketBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerTicket, com.heroiclabs.nakama.rtapi.MatchmakerTicket.Builder, com.heroiclabs.nakama.rtapi.MatchmakerTicketOrBuilder>( + (com.heroiclabs.nakama.rtapi.MatchmakerTicket) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 22; + onChanged(); + return matchmakerTicketBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Notifications, com.heroiclabs.nakama.rtapi.Notifications.Builder, com.heroiclabs.nakama.rtapi.NotificationsOrBuilder> notificationsBuilder_; + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + * @return Whether the notifications field is set. + */ + @java.lang.Override + public boolean hasNotifications() { + return messageCase_ == 23; + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + * @return The notifications. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Notifications getNotifications() { + if (notificationsBuilder_ == null) { + if (messageCase_ == 23) { + return (com.heroiclabs.nakama.rtapi.Notifications) message_; + } + return com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance(); + } else { + if (messageCase_ == 23) { + return notificationsBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance(); + } + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + public Builder setNotifications(com.heroiclabs.nakama.rtapi.Notifications value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + notificationsBuilder_.setMessage(value); + } + messageCase_ = 23; + return this; + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + public Builder setNotifications( + com.heroiclabs.nakama.rtapi.Notifications.Builder builderForValue) { + if (notificationsBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + notificationsBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 23; + return this; + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + public Builder mergeNotifications(com.heroiclabs.nakama.rtapi.Notifications value) { + if (notificationsBuilder_ == null) { + if (messageCase_ == 23 && + message_ != com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Notifications.newBuilder((com.heroiclabs.nakama.rtapi.Notifications) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 23) { + notificationsBuilder_.mergeFrom(value); + } else { + notificationsBuilder_.setMessage(value); + } + } + messageCase_ = 23; + return this; + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + public Builder clearNotifications() { + if (notificationsBuilder_ == null) { + if (messageCase_ == 23) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 23) { + messageCase_ = 0; + message_ = null; + } + notificationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.rtapi.Notifications.Builder getNotificationsBuilder() { + return getNotificationsFieldBuilder().getBuilder(); + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.NotificationsOrBuilder getNotificationsOrBuilder() { + if ((messageCase_ == 23) && (notificationsBuilder_ != null)) { + return notificationsBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 23) { + return (com.heroiclabs.nakama.rtapi.Notifications) message_; + } + return com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance(); + } + } + /** + *
+     * Notifications send by the server.
+     * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Notifications, com.heroiclabs.nakama.rtapi.Notifications.Builder, com.heroiclabs.nakama.rtapi.NotificationsOrBuilder> + getNotificationsFieldBuilder() { + if (notificationsBuilder_ == null) { + if (!(messageCase_ == 23)) { + message_ = com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance(); + } + notificationsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Notifications, com.heroiclabs.nakama.rtapi.Notifications.Builder, com.heroiclabs.nakama.rtapi.NotificationsOrBuilder>( + (com.heroiclabs.nakama.rtapi.Notifications) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 23; + onChanged(); + return notificationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.Rpc, com.heroiclabs.nakama.api.Rpc.Builder, com.heroiclabs.nakama.api.RpcOrBuilder> rpcBuilder_; + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + * @return Whether the rpc field is set. + */ + @java.lang.Override + public boolean hasRpc() { + return messageCase_ == 24; + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + * @return The rpc. + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Rpc getRpc() { + if (rpcBuilder_ == null) { + if (messageCase_ == 24) { + return (com.heroiclabs.nakama.api.Rpc) message_; + } + return com.heroiclabs.nakama.api.Rpc.getDefaultInstance(); + } else { + if (messageCase_ == 24) { + return rpcBuilder_.getMessage(); + } + return com.heroiclabs.nakama.api.Rpc.getDefaultInstance(); + } + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + public Builder setRpc(com.heroiclabs.nakama.api.Rpc value) { + if (rpcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + rpcBuilder_.setMessage(value); + } + messageCase_ = 24; + return this; + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + public Builder setRpc( + com.heroiclabs.nakama.api.Rpc.Builder builderForValue) { + if (rpcBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + rpcBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 24; + return this; + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + public Builder mergeRpc(com.heroiclabs.nakama.api.Rpc value) { + if (rpcBuilder_ == null) { + if (messageCase_ == 24 && + message_ != com.heroiclabs.nakama.api.Rpc.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.api.Rpc.newBuilder((com.heroiclabs.nakama.api.Rpc) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 24) { + rpcBuilder_.mergeFrom(value); + } else { + rpcBuilder_.setMessage(value); + } + } + messageCase_ = 24; + return this; + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + public Builder clearRpc() { + if (rpcBuilder_ == null) { + if (messageCase_ == 24) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 24) { + messageCase_ = 0; + message_ = null; + } + rpcBuilder_.clear(); + } + return this; + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + public com.heroiclabs.nakama.api.Rpc.Builder getRpcBuilder() { + return getRpcFieldBuilder().getBuilder(); + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.RpcOrBuilder getRpcOrBuilder() { + if ((messageCase_ == 24) && (rpcBuilder_ != null)) { + return rpcBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 24) { + return (com.heroiclabs.nakama.api.Rpc) message_; + } + return com.heroiclabs.nakama.api.Rpc.getDefaultInstance(); + } + } + /** + *
+     * RPC call or response.
+     * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.Rpc, com.heroiclabs.nakama.api.Rpc.Builder, com.heroiclabs.nakama.api.RpcOrBuilder> + getRpcFieldBuilder() { + if (rpcBuilder_ == null) { + if (!(messageCase_ == 24)) { + message_ = com.heroiclabs.nakama.api.Rpc.getDefaultInstance(); + } + rpcBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.api.Rpc, com.heroiclabs.nakama.api.Rpc.Builder, com.heroiclabs.nakama.api.RpcOrBuilder>( + (com.heroiclabs.nakama.api.Rpc) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 24; + onChanged(); + return rpcBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Status, com.heroiclabs.nakama.rtapi.Status.Builder, com.heroiclabs.nakama.rtapi.StatusOrBuilder> statusBuilder_; + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return messageCase_ == 25; + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Status getStatus() { + if (statusBuilder_ == null) { + if (messageCase_ == 25) { + return (com.heroiclabs.nakama.rtapi.Status) message_; + } + return com.heroiclabs.nakama.rtapi.Status.getDefaultInstance(); + } else { + if (messageCase_ == 25) { + return statusBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Status.getDefaultInstance(); + } + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + public Builder setStatus(com.heroiclabs.nakama.rtapi.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + messageCase_ = 25; + return this; + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + public Builder setStatus( + com.heroiclabs.nakama.rtapi.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 25; + return this; + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + public Builder mergeStatus(com.heroiclabs.nakama.rtapi.Status value) { + if (statusBuilder_ == null) { + if (messageCase_ == 25 && + message_ != com.heroiclabs.nakama.rtapi.Status.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Status.newBuilder((com.heroiclabs.nakama.rtapi.Status) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 25) { + statusBuilder_.mergeFrom(value); + } else { + statusBuilder_.setMessage(value); + } + } + messageCase_ = 25; + return this; + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + if (messageCase_ == 25) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 25) { + messageCase_ = 0; + message_ = null; + } + statusBuilder_.clear(); + } + return this; + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + public com.heroiclabs.nakama.rtapi.Status.Builder getStatusBuilder() { + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusOrBuilder getStatusOrBuilder() { + if ((messageCase_ == 25) && (statusBuilder_ != null)) { + return statusBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 25) { + return (com.heroiclabs.nakama.rtapi.Status) message_; + } + return com.heroiclabs.nakama.rtapi.Status.getDefaultInstance(); + } + } + /** + *
+     * An incoming status snapshot for some set of users.
+     * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Status, com.heroiclabs.nakama.rtapi.Status.Builder, com.heroiclabs.nakama.rtapi.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + if (!(messageCase_ == 25)) { + message_ = com.heroiclabs.nakama.rtapi.Status.getDefaultInstance(); + } + statusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Status, com.heroiclabs.nakama.rtapi.Status.Builder, com.heroiclabs.nakama.rtapi.StatusOrBuilder>( + (com.heroiclabs.nakama.rtapi.Status) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 25; + onChanged(); + return statusBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusFollow, com.heroiclabs.nakama.rtapi.StatusFollow.Builder, com.heroiclabs.nakama.rtapi.StatusFollowOrBuilder> statusFollowBuilder_; + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + * @return Whether the statusFollow field is set. + */ + @java.lang.Override + public boolean hasStatusFollow() { + return messageCase_ == 26; + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + * @return The statusFollow. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollow getStatusFollow() { + if (statusFollowBuilder_ == null) { + if (messageCase_ == 26) { + return (com.heroiclabs.nakama.rtapi.StatusFollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance(); + } else { + if (messageCase_ == 26) { + return statusFollowBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance(); + } + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + public Builder setStatusFollow(com.heroiclabs.nakama.rtapi.StatusFollow value) { + if (statusFollowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + statusFollowBuilder_.setMessage(value); + } + messageCase_ = 26; + return this; + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + public Builder setStatusFollow( + com.heroiclabs.nakama.rtapi.StatusFollow.Builder builderForValue) { + if (statusFollowBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + statusFollowBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 26; + return this; + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + public Builder mergeStatusFollow(com.heroiclabs.nakama.rtapi.StatusFollow value) { + if (statusFollowBuilder_ == null) { + if (messageCase_ == 26 && + message_ != com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.StatusFollow.newBuilder((com.heroiclabs.nakama.rtapi.StatusFollow) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 26) { + statusFollowBuilder_.mergeFrom(value); + } else { + statusFollowBuilder_.setMessage(value); + } + } + messageCase_ = 26; + return this; + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + public Builder clearStatusFollow() { + if (statusFollowBuilder_ == null) { + if (messageCase_ == 26) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 26) { + messageCase_ = 0; + message_ = null; + } + statusFollowBuilder_.clear(); + } + return this; + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + public com.heroiclabs.nakama.rtapi.StatusFollow.Builder getStatusFollowBuilder() { + return getStatusFollowFieldBuilder().getBuilder(); + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollowOrBuilder getStatusFollowOrBuilder() { + if ((messageCase_ == 26) && (statusFollowBuilder_ != null)) { + return statusFollowBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 26) { + return (com.heroiclabs.nakama.rtapi.StatusFollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance(); + } + } + /** + *
+     * Start following some set of users to receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusFollow, com.heroiclabs.nakama.rtapi.StatusFollow.Builder, com.heroiclabs.nakama.rtapi.StatusFollowOrBuilder> + getStatusFollowFieldBuilder() { + if (statusFollowBuilder_ == null) { + if (!(messageCase_ == 26)) { + message_ = com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance(); + } + statusFollowBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusFollow, com.heroiclabs.nakama.rtapi.StatusFollow.Builder, com.heroiclabs.nakama.rtapi.StatusFollowOrBuilder>( + (com.heroiclabs.nakama.rtapi.StatusFollow) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 26; + onChanged(); + return statusFollowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusPresenceEvent, com.heroiclabs.nakama.rtapi.StatusPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.StatusPresenceEventOrBuilder> statusPresenceEventBuilder_; + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + * @return Whether the statusPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasStatusPresenceEvent() { + return messageCase_ == 27; + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + * @return The statusPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEvent getStatusPresenceEvent() { + if (statusPresenceEventBuilder_ == null) { + if (messageCase_ == 27) { + return (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance(); + } else { + if (messageCase_ == 27) { + return statusPresenceEventBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + public Builder setStatusPresenceEvent(com.heroiclabs.nakama.rtapi.StatusPresenceEvent value) { + if (statusPresenceEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + statusPresenceEventBuilder_.setMessage(value); + } + messageCase_ = 27; + return this; + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + public Builder setStatusPresenceEvent( + com.heroiclabs.nakama.rtapi.StatusPresenceEvent.Builder builderForValue) { + if (statusPresenceEventBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + statusPresenceEventBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 27; + return this; + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + public Builder mergeStatusPresenceEvent(com.heroiclabs.nakama.rtapi.StatusPresenceEvent value) { + if (statusPresenceEventBuilder_ == null) { + if (messageCase_ == 27 && + message_ != com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.StatusPresenceEvent.newBuilder((com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 27) { + statusPresenceEventBuilder_.mergeFrom(value); + } else { + statusPresenceEventBuilder_.setMessage(value); + } + } + messageCase_ = 27; + return this; + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + public Builder clearStatusPresenceEvent() { + if (statusPresenceEventBuilder_ == null) { + if (messageCase_ == 27) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 27) { + messageCase_ = 0; + message_ = null; + } + statusPresenceEventBuilder_.clear(); + } + return this; + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + public com.heroiclabs.nakama.rtapi.StatusPresenceEvent.Builder getStatusPresenceEventBuilder() { + return getStatusPresenceEventFieldBuilder().getBuilder(); + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEventOrBuilder getStatusPresenceEventOrBuilder() { + if ((messageCase_ == 27) && (statusPresenceEventBuilder_ != null)) { + return statusPresenceEventBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 27) { + return (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * An incoming status update.
+     * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusPresenceEvent, com.heroiclabs.nakama.rtapi.StatusPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.StatusPresenceEventOrBuilder> + getStatusPresenceEventFieldBuilder() { + if (statusPresenceEventBuilder_ == null) { + if (!(messageCase_ == 27)) { + message_ = com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance(); + } + statusPresenceEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusPresenceEvent, com.heroiclabs.nakama.rtapi.StatusPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.StatusPresenceEventOrBuilder>( + (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 27; + onChanged(); + return statusPresenceEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusUnfollow, com.heroiclabs.nakama.rtapi.StatusUnfollow.Builder, com.heroiclabs.nakama.rtapi.StatusUnfollowOrBuilder> statusUnfollowBuilder_; + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + * @return Whether the statusUnfollow field is set. + */ + @java.lang.Override + public boolean hasStatusUnfollow() { + return messageCase_ == 28; + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + * @return The statusUnfollow. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollow getStatusUnfollow() { + if (statusUnfollowBuilder_ == null) { + if (messageCase_ == 28) { + return (com.heroiclabs.nakama.rtapi.StatusUnfollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance(); + } else { + if (messageCase_ == 28) { + return statusUnfollowBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance(); + } + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + public Builder setStatusUnfollow(com.heroiclabs.nakama.rtapi.StatusUnfollow value) { + if (statusUnfollowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + statusUnfollowBuilder_.setMessage(value); + } + messageCase_ = 28; + return this; + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + public Builder setStatusUnfollow( + com.heroiclabs.nakama.rtapi.StatusUnfollow.Builder builderForValue) { + if (statusUnfollowBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + statusUnfollowBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 28; + return this; + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + public Builder mergeStatusUnfollow(com.heroiclabs.nakama.rtapi.StatusUnfollow value) { + if (statusUnfollowBuilder_ == null) { + if (messageCase_ == 28 && + message_ != com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.StatusUnfollow.newBuilder((com.heroiclabs.nakama.rtapi.StatusUnfollow) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 28) { + statusUnfollowBuilder_.mergeFrom(value); + } else { + statusUnfollowBuilder_.setMessage(value); + } + } + messageCase_ = 28; + return this; + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + public Builder clearStatusUnfollow() { + if (statusUnfollowBuilder_ == null) { + if (messageCase_ == 28) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 28) { + messageCase_ = 0; + message_ = null; + } + statusUnfollowBuilder_.clear(); + } + return this; + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + public com.heroiclabs.nakama.rtapi.StatusUnfollow.Builder getStatusUnfollowBuilder() { + return getStatusUnfollowFieldBuilder().getBuilder(); + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollowOrBuilder getStatusUnfollowOrBuilder() { + if ((messageCase_ == 28) && (statusUnfollowBuilder_ != null)) { + return statusUnfollowBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 28) { + return (com.heroiclabs.nakama.rtapi.StatusUnfollow) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance(); + } + } + /** + *
+     * Stop following some set of users to no longer receive their status updates.
+     * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusUnfollow, com.heroiclabs.nakama.rtapi.StatusUnfollow.Builder, com.heroiclabs.nakama.rtapi.StatusUnfollowOrBuilder> + getStatusUnfollowFieldBuilder() { + if (statusUnfollowBuilder_ == null) { + if (!(messageCase_ == 28)) { + message_ = com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance(); + } + statusUnfollowBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusUnfollow, com.heroiclabs.nakama.rtapi.StatusUnfollow.Builder, com.heroiclabs.nakama.rtapi.StatusUnfollowOrBuilder>( + (com.heroiclabs.nakama.rtapi.StatusUnfollow) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 28; + onChanged(); + return statusUnfollowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusUpdate, com.heroiclabs.nakama.rtapi.StatusUpdate.Builder, com.heroiclabs.nakama.rtapi.StatusUpdateOrBuilder> statusUpdateBuilder_; + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + * @return Whether the statusUpdate field is set. + */ + @java.lang.Override + public boolean hasStatusUpdate() { + return messageCase_ == 29; + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + * @return The statusUpdate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdate getStatusUpdate() { + if (statusUpdateBuilder_ == null) { + if (messageCase_ == 29) { + return (com.heroiclabs.nakama.rtapi.StatusUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance(); + } else { + if (messageCase_ == 29) { + return statusUpdateBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance(); + } + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + public Builder setStatusUpdate(com.heroiclabs.nakama.rtapi.StatusUpdate value) { + if (statusUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + statusUpdateBuilder_.setMessage(value); + } + messageCase_ = 29; + return this; + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + public Builder setStatusUpdate( + com.heroiclabs.nakama.rtapi.StatusUpdate.Builder builderForValue) { + if (statusUpdateBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + statusUpdateBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 29; + return this; + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + public Builder mergeStatusUpdate(com.heroiclabs.nakama.rtapi.StatusUpdate value) { + if (statusUpdateBuilder_ == null) { + if (messageCase_ == 29 && + message_ != com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.StatusUpdate.newBuilder((com.heroiclabs.nakama.rtapi.StatusUpdate) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 29) { + statusUpdateBuilder_.mergeFrom(value); + } else { + statusUpdateBuilder_.setMessage(value); + } + } + messageCase_ = 29; + return this; + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + public Builder clearStatusUpdate() { + if (statusUpdateBuilder_ == null) { + if (messageCase_ == 29) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 29) { + messageCase_ = 0; + message_ = null; + } + statusUpdateBuilder_.clear(); + } + return this; + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + public com.heroiclabs.nakama.rtapi.StatusUpdate.Builder getStatusUpdateBuilder() { + return getStatusUpdateFieldBuilder().getBuilder(); + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdateOrBuilder getStatusUpdateOrBuilder() { + if ((messageCase_ == 29) && (statusUpdateBuilder_ != null)) { + return statusUpdateBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 29) { + return (com.heroiclabs.nakama.rtapi.StatusUpdate) message_; + } + return com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance(); + } + } + /** + *
+     * Set the user's own status.
+     * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusUpdate, com.heroiclabs.nakama.rtapi.StatusUpdate.Builder, com.heroiclabs.nakama.rtapi.StatusUpdateOrBuilder> + getStatusUpdateFieldBuilder() { + if (statusUpdateBuilder_ == null) { + if (!(messageCase_ == 29)) { + message_ = com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance(); + } + statusUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StatusUpdate, com.heroiclabs.nakama.rtapi.StatusUpdate.Builder, com.heroiclabs.nakama.rtapi.StatusUpdateOrBuilder>( + (com.heroiclabs.nakama.rtapi.StatusUpdate) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 29; + onChanged(); + return statusUpdateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StreamData, com.heroiclabs.nakama.rtapi.StreamData.Builder, com.heroiclabs.nakama.rtapi.StreamDataOrBuilder> streamDataBuilder_; + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + * @return Whether the streamData field is set. + */ + @java.lang.Override + public boolean hasStreamData() { + return messageCase_ == 30; + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + * @return The streamData. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamData getStreamData() { + if (streamDataBuilder_ == null) { + if (messageCase_ == 30) { + return (com.heroiclabs.nakama.rtapi.StreamData) message_; + } + return com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance(); + } else { + if (messageCase_ == 30) { + return streamDataBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance(); + } + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + public Builder setStreamData(com.heroiclabs.nakama.rtapi.StreamData value) { + if (streamDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + streamDataBuilder_.setMessage(value); + } + messageCase_ = 30; + return this; + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + public Builder setStreamData( + com.heroiclabs.nakama.rtapi.StreamData.Builder builderForValue) { + if (streamDataBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + streamDataBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 30; + return this; + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + public Builder mergeStreamData(com.heroiclabs.nakama.rtapi.StreamData value) { + if (streamDataBuilder_ == null) { + if (messageCase_ == 30 && + message_ != com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.StreamData.newBuilder((com.heroiclabs.nakama.rtapi.StreamData) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 30) { + streamDataBuilder_.mergeFrom(value); + } else { + streamDataBuilder_.setMessage(value); + } + } + messageCase_ = 30; + return this; + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + public Builder clearStreamData() { + if (streamDataBuilder_ == null) { + if (messageCase_ == 30) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 30) { + messageCase_ = 0; + message_ = null; + } + streamDataBuilder_.clear(); + } + return this; + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + public com.heroiclabs.nakama.rtapi.StreamData.Builder getStreamDataBuilder() { + return getStreamDataFieldBuilder().getBuilder(); + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamDataOrBuilder getStreamDataOrBuilder() { + if ((messageCase_ == 30) && (streamDataBuilder_ != null)) { + return streamDataBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 30) { + return (com.heroiclabs.nakama.rtapi.StreamData) message_; + } + return com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance(); + } + } + /** + *
+     * A data message delivered over a stream.
+     * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StreamData, com.heroiclabs.nakama.rtapi.StreamData.Builder, com.heroiclabs.nakama.rtapi.StreamDataOrBuilder> + getStreamDataFieldBuilder() { + if (streamDataBuilder_ == null) { + if (!(messageCase_ == 30)) { + message_ = com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance(); + } + streamDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StreamData, com.heroiclabs.nakama.rtapi.StreamData.Builder, com.heroiclabs.nakama.rtapi.StreamDataOrBuilder>( + (com.heroiclabs.nakama.rtapi.StreamData) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 30; + onChanged(); + return streamDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StreamPresenceEvent, com.heroiclabs.nakama.rtapi.StreamPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.StreamPresenceEventOrBuilder> streamPresenceEventBuilder_; + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + * @return Whether the streamPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasStreamPresenceEvent() { + return messageCase_ == 31; + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + * @return The streamPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEvent getStreamPresenceEvent() { + if (streamPresenceEventBuilder_ == null) { + if (messageCase_ == 31) { + return (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance(); + } else { + if (messageCase_ == 31) { + return streamPresenceEventBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + public Builder setStreamPresenceEvent(com.heroiclabs.nakama.rtapi.StreamPresenceEvent value) { + if (streamPresenceEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + streamPresenceEventBuilder_.setMessage(value); + } + messageCase_ = 31; + return this; + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + public Builder setStreamPresenceEvent( + com.heroiclabs.nakama.rtapi.StreamPresenceEvent.Builder builderForValue) { + if (streamPresenceEventBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + streamPresenceEventBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 31; + return this; + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + public Builder mergeStreamPresenceEvent(com.heroiclabs.nakama.rtapi.StreamPresenceEvent value) { + if (streamPresenceEventBuilder_ == null) { + if (messageCase_ == 31 && + message_ != com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.StreamPresenceEvent.newBuilder((com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 31) { + streamPresenceEventBuilder_.mergeFrom(value); + } else { + streamPresenceEventBuilder_.setMessage(value); + } + } + messageCase_ = 31; + return this; + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + public Builder clearStreamPresenceEvent() { + if (streamPresenceEventBuilder_ == null) { + if (messageCase_ == 31) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 31) { + messageCase_ = 0; + message_ = null; + } + streamPresenceEventBuilder_.clear(); + } + return this; + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + public com.heroiclabs.nakama.rtapi.StreamPresenceEvent.Builder getStreamPresenceEventBuilder() { + return getStreamPresenceEventFieldBuilder().getBuilder(); + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEventOrBuilder getStreamPresenceEventOrBuilder() { + if ((messageCase_ == 31) && (streamPresenceEventBuilder_ != null)) { + return streamPresenceEventBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 31) { + return (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular stream.
+     * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StreamPresenceEvent, com.heroiclabs.nakama.rtapi.StreamPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.StreamPresenceEventOrBuilder> + getStreamPresenceEventFieldBuilder() { + if (streamPresenceEventBuilder_ == null) { + if (!(messageCase_ == 31)) { + message_ = com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance(); + } + streamPresenceEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.StreamPresenceEvent, com.heroiclabs.nakama.rtapi.StreamPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.StreamPresenceEventOrBuilder>( + (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 31; + onChanged(); + return streamPresenceEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Ping, com.heroiclabs.nakama.rtapi.Ping.Builder, com.heroiclabs.nakama.rtapi.PingOrBuilder> pingBuilder_; + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + * @return Whether the ping field is set. + */ + @java.lang.Override + public boolean hasPing() { + return messageCase_ == 32; + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + * @return The ping. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Ping getPing() { + if (pingBuilder_ == null) { + if (messageCase_ == 32) { + return (com.heroiclabs.nakama.rtapi.Ping) message_; + } + return com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance(); + } else { + if (messageCase_ == 32) { + return pingBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance(); + } + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + public Builder setPing(com.heroiclabs.nakama.rtapi.Ping value) { + if (pingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + pingBuilder_.setMessage(value); + } + messageCase_ = 32; + return this; + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + public Builder setPing( + com.heroiclabs.nakama.rtapi.Ping.Builder builderForValue) { + if (pingBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + pingBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 32; + return this; + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + public Builder mergePing(com.heroiclabs.nakama.rtapi.Ping value) { + if (pingBuilder_ == null) { + if (messageCase_ == 32 && + message_ != com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Ping.newBuilder((com.heroiclabs.nakama.rtapi.Ping) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 32) { + pingBuilder_.mergeFrom(value); + } else { + pingBuilder_.setMessage(value); + } + } + messageCase_ = 32; + return this; + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + public Builder clearPing() { + if (pingBuilder_ == null) { + if (messageCase_ == 32) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 32) { + messageCase_ = 0; + message_ = null; + } + pingBuilder_.clear(); + } + return this; + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + public com.heroiclabs.nakama.rtapi.Ping.Builder getPingBuilder() { + return getPingFieldBuilder().getBuilder(); + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PingOrBuilder getPingOrBuilder() { + if ((messageCase_ == 32) && (pingBuilder_ != null)) { + return pingBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 32) { + return (com.heroiclabs.nakama.rtapi.Ping) message_; + } + return com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance(); + } + } + /** + *
+     * Application-level heartbeat and connection check.
+     * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Ping, com.heroiclabs.nakama.rtapi.Ping.Builder, com.heroiclabs.nakama.rtapi.PingOrBuilder> + getPingFieldBuilder() { + if (pingBuilder_ == null) { + if (!(messageCase_ == 32)) { + message_ = com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance(); + } + pingBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Ping, com.heroiclabs.nakama.rtapi.Ping.Builder, com.heroiclabs.nakama.rtapi.PingOrBuilder>( + (com.heroiclabs.nakama.rtapi.Ping) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 32; + onChanged(); + return pingBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Pong, com.heroiclabs.nakama.rtapi.Pong.Builder, com.heroiclabs.nakama.rtapi.PongOrBuilder> pongBuilder_; + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + * @return Whether the pong field is set. + */ + @java.lang.Override + public boolean hasPong() { + return messageCase_ == 33; + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + * @return The pong. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Pong getPong() { + if (pongBuilder_ == null) { + if (messageCase_ == 33) { + return (com.heroiclabs.nakama.rtapi.Pong) message_; + } + return com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance(); + } else { + if (messageCase_ == 33) { + return pongBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance(); + } + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + public Builder setPong(com.heroiclabs.nakama.rtapi.Pong value) { + if (pongBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + pongBuilder_.setMessage(value); + } + messageCase_ = 33; + return this; + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + public Builder setPong( + com.heroiclabs.nakama.rtapi.Pong.Builder builderForValue) { + if (pongBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + pongBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 33; + return this; + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + public Builder mergePong(com.heroiclabs.nakama.rtapi.Pong value) { + if (pongBuilder_ == null) { + if (messageCase_ == 33 && + message_ != com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Pong.newBuilder((com.heroiclabs.nakama.rtapi.Pong) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 33) { + pongBuilder_.mergeFrom(value); + } else { + pongBuilder_.setMessage(value); + } + } + messageCase_ = 33; + return this; + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + public Builder clearPong() { + if (pongBuilder_ == null) { + if (messageCase_ == 33) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 33) { + messageCase_ = 0; + message_ = null; + } + pongBuilder_.clear(); + } + return this; + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + public com.heroiclabs.nakama.rtapi.Pong.Builder getPongBuilder() { + return getPongFieldBuilder().getBuilder(); + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PongOrBuilder getPongOrBuilder() { + if ((messageCase_ == 33) && (pongBuilder_ != null)) { + return pongBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 33) { + return (com.heroiclabs.nakama.rtapi.Pong) message_; + } + return com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance(); + } + } + /** + *
+     * Application-level heartbeat and connection check response.
+     * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Pong, com.heroiclabs.nakama.rtapi.Pong.Builder, com.heroiclabs.nakama.rtapi.PongOrBuilder> + getPongFieldBuilder() { + if (pongBuilder_ == null) { + if (!(messageCase_ == 33)) { + message_ = com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance(); + } + pongBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Pong, com.heroiclabs.nakama.rtapi.Pong.Builder, com.heroiclabs.nakama.rtapi.PongOrBuilder>( + (com.heroiclabs.nakama.rtapi.Pong) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 33; + onChanged(); + return pongBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Party, com.heroiclabs.nakama.rtapi.Party.Builder, com.heroiclabs.nakama.rtapi.PartyOrBuilder> partyBuilder_; + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + * @return Whether the party field is set. + */ + @java.lang.Override + public boolean hasParty() { + return messageCase_ == 34; + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + * @return The party. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Party getParty() { + if (partyBuilder_ == null) { + if (messageCase_ == 34) { + return (com.heroiclabs.nakama.rtapi.Party) message_; + } + return com.heroiclabs.nakama.rtapi.Party.getDefaultInstance(); + } else { + if (messageCase_ == 34) { + return partyBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.Party.getDefaultInstance(); + } + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + public Builder setParty(com.heroiclabs.nakama.rtapi.Party value) { + if (partyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyBuilder_.setMessage(value); + } + messageCase_ = 34; + return this; + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + public Builder setParty( + com.heroiclabs.nakama.rtapi.Party.Builder builderForValue) { + if (partyBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 34; + return this; + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + public Builder mergeParty(com.heroiclabs.nakama.rtapi.Party value) { + if (partyBuilder_ == null) { + if (messageCase_ == 34 && + message_ != com.heroiclabs.nakama.rtapi.Party.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.Party.newBuilder((com.heroiclabs.nakama.rtapi.Party) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 34) { + partyBuilder_.mergeFrom(value); + } else { + partyBuilder_.setMessage(value); + } + } + messageCase_ = 34; + return this; + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + public Builder clearParty() { + if (partyBuilder_ == null) { + if (messageCase_ == 34) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 34) { + messageCase_ = 0; + message_ = null; + } + partyBuilder_.clear(); + } + return this; + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + public com.heroiclabs.nakama.rtapi.Party.Builder getPartyBuilder() { + return getPartyFieldBuilder().getBuilder(); + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyOrBuilder getPartyOrBuilder() { + if ((messageCase_ == 34) && (partyBuilder_ != null)) { + return partyBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 34) { + return (com.heroiclabs.nakama.rtapi.Party) message_; + } + return com.heroiclabs.nakama.rtapi.Party.getDefaultInstance(); + } + } + /** + *
+     * Incoming information about a party.
+     * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Party, com.heroiclabs.nakama.rtapi.Party.Builder, com.heroiclabs.nakama.rtapi.PartyOrBuilder> + getPartyFieldBuilder() { + if (partyBuilder_ == null) { + if (!(messageCase_ == 34)) { + message_ = com.heroiclabs.nakama.rtapi.Party.getDefaultInstance(); + } + partyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Party, com.heroiclabs.nakama.rtapi.Party.Builder, com.heroiclabs.nakama.rtapi.PartyOrBuilder>( + (com.heroiclabs.nakama.rtapi.Party) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 34; + onChanged(); + return partyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyCreate, com.heroiclabs.nakama.rtapi.PartyCreate.Builder, com.heroiclabs.nakama.rtapi.PartyCreateOrBuilder> partyCreateBuilder_; + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + * @return Whether the partyCreate field is set. + */ + @java.lang.Override + public boolean hasPartyCreate() { + return messageCase_ == 35; + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + * @return The partyCreate. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreate getPartyCreate() { + if (partyCreateBuilder_ == null) { + if (messageCase_ == 35) { + return (com.heroiclabs.nakama.rtapi.PartyCreate) message_; + } + return com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance(); + } else { + if (messageCase_ == 35) { + return partyCreateBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance(); + } + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + public Builder setPartyCreate(com.heroiclabs.nakama.rtapi.PartyCreate value) { + if (partyCreateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyCreateBuilder_.setMessage(value); + } + messageCase_ = 35; + return this; + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + public Builder setPartyCreate( + com.heroiclabs.nakama.rtapi.PartyCreate.Builder builderForValue) { + if (partyCreateBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyCreateBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 35; + return this; + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + public Builder mergePartyCreate(com.heroiclabs.nakama.rtapi.PartyCreate value) { + if (partyCreateBuilder_ == null) { + if (messageCase_ == 35 && + message_ != com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyCreate.newBuilder((com.heroiclabs.nakama.rtapi.PartyCreate) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 35) { + partyCreateBuilder_.mergeFrom(value); + } else { + partyCreateBuilder_.setMessage(value); + } + } + messageCase_ = 35; + return this; + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + public Builder clearPartyCreate() { + if (partyCreateBuilder_ == null) { + if (messageCase_ == 35) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 35) { + messageCase_ = 0; + message_ = null; + } + partyCreateBuilder_.clear(); + } + return this; + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + public com.heroiclabs.nakama.rtapi.PartyCreate.Builder getPartyCreateBuilder() { + return getPartyCreateFieldBuilder().getBuilder(); + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreateOrBuilder getPartyCreateOrBuilder() { + if ((messageCase_ == 35) && (partyCreateBuilder_ != null)) { + return partyCreateBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 35) { + return (com.heroiclabs.nakama.rtapi.PartyCreate) message_; + } + return com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance(); + } + } + /** + *
+     * Create a party.
+     * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyCreate, com.heroiclabs.nakama.rtapi.PartyCreate.Builder, com.heroiclabs.nakama.rtapi.PartyCreateOrBuilder> + getPartyCreateFieldBuilder() { + if (partyCreateBuilder_ == null) { + if (!(messageCase_ == 35)) { + message_ = com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance(); + } + partyCreateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyCreate, com.heroiclabs.nakama.rtapi.PartyCreate.Builder, com.heroiclabs.nakama.rtapi.PartyCreateOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyCreate) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 35; + onChanged(); + return partyCreateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoin, com.heroiclabs.nakama.rtapi.PartyJoin.Builder, com.heroiclabs.nakama.rtapi.PartyJoinOrBuilder> partyJoinBuilder_; + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + * @return Whether the partyJoin field is set. + */ + @java.lang.Override + public boolean hasPartyJoin() { + return messageCase_ == 36; + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + * @return The partyJoin. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoin getPartyJoin() { + if (partyJoinBuilder_ == null) { + if (messageCase_ == 36) { + return (com.heroiclabs.nakama.rtapi.PartyJoin) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance(); + } else { + if (messageCase_ == 36) { + return partyJoinBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance(); + } + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + public Builder setPartyJoin(com.heroiclabs.nakama.rtapi.PartyJoin value) { + if (partyJoinBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyJoinBuilder_.setMessage(value); + } + messageCase_ = 36; + return this; + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + public Builder setPartyJoin( + com.heroiclabs.nakama.rtapi.PartyJoin.Builder builderForValue) { + if (partyJoinBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyJoinBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 36; + return this; + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + public Builder mergePartyJoin(com.heroiclabs.nakama.rtapi.PartyJoin value) { + if (partyJoinBuilder_ == null) { + if (messageCase_ == 36 && + message_ != com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyJoin.newBuilder((com.heroiclabs.nakama.rtapi.PartyJoin) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 36) { + partyJoinBuilder_.mergeFrom(value); + } else { + partyJoinBuilder_.setMessage(value); + } + } + messageCase_ = 36; + return this; + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + public Builder clearPartyJoin() { + if (partyJoinBuilder_ == null) { + if (messageCase_ == 36) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 36) { + messageCase_ = 0; + message_ = null; + } + partyJoinBuilder_.clear(); + } + return this; + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + public com.heroiclabs.nakama.rtapi.PartyJoin.Builder getPartyJoinBuilder() { + return getPartyJoinFieldBuilder().getBuilder(); + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinOrBuilder getPartyJoinOrBuilder() { + if ((messageCase_ == 36) && (partyJoinBuilder_ != null)) { + return partyJoinBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 36) { + return (com.heroiclabs.nakama.rtapi.PartyJoin) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance(); + } + } + /** + *
+     * Join a party, or request to join if the party is not open.
+     * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoin, com.heroiclabs.nakama.rtapi.PartyJoin.Builder, com.heroiclabs.nakama.rtapi.PartyJoinOrBuilder> + getPartyJoinFieldBuilder() { + if (partyJoinBuilder_ == null) { + if (!(messageCase_ == 36)) { + message_ = com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance(); + } + partyJoinBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoin, com.heroiclabs.nakama.rtapi.PartyJoin.Builder, com.heroiclabs.nakama.rtapi.PartyJoinOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyJoin) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 36; + onChanged(); + return partyJoinBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyLeave, com.heroiclabs.nakama.rtapi.PartyLeave.Builder, com.heroiclabs.nakama.rtapi.PartyLeaveOrBuilder> partyLeaveBuilder_; + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + * @return Whether the partyLeave field is set. + */ + @java.lang.Override + public boolean hasPartyLeave() { + return messageCase_ == 37; + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + * @return The partyLeave. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeave getPartyLeave() { + if (partyLeaveBuilder_ == null) { + if (messageCase_ == 37) { + return (com.heroiclabs.nakama.rtapi.PartyLeave) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance(); + } else { + if (messageCase_ == 37) { + return partyLeaveBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance(); + } + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + public Builder setPartyLeave(com.heroiclabs.nakama.rtapi.PartyLeave value) { + if (partyLeaveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyLeaveBuilder_.setMessage(value); + } + messageCase_ = 37; + return this; + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + public Builder setPartyLeave( + com.heroiclabs.nakama.rtapi.PartyLeave.Builder builderForValue) { + if (partyLeaveBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyLeaveBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 37; + return this; + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + public Builder mergePartyLeave(com.heroiclabs.nakama.rtapi.PartyLeave value) { + if (partyLeaveBuilder_ == null) { + if (messageCase_ == 37 && + message_ != com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyLeave.newBuilder((com.heroiclabs.nakama.rtapi.PartyLeave) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 37) { + partyLeaveBuilder_.mergeFrom(value); + } else { + partyLeaveBuilder_.setMessage(value); + } + } + messageCase_ = 37; + return this; + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + public Builder clearPartyLeave() { + if (partyLeaveBuilder_ == null) { + if (messageCase_ == 37) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 37) { + messageCase_ = 0; + message_ = null; + } + partyLeaveBuilder_.clear(); + } + return this; + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + public com.heroiclabs.nakama.rtapi.PartyLeave.Builder getPartyLeaveBuilder() { + return getPartyLeaveFieldBuilder().getBuilder(); + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeaveOrBuilder getPartyLeaveOrBuilder() { + if ((messageCase_ == 37) && (partyLeaveBuilder_ != null)) { + return partyLeaveBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 37) { + return (com.heroiclabs.nakama.rtapi.PartyLeave) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance(); + } + } + /** + *
+     * Leave a party.
+     * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyLeave, com.heroiclabs.nakama.rtapi.PartyLeave.Builder, com.heroiclabs.nakama.rtapi.PartyLeaveOrBuilder> + getPartyLeaveFieldBuilder() { + if (partyLeaveBuilder_ == null) { + if (!(messageCase_ == 37)) { + message_ = com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance(); + } + partyLeaveBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyLeave, com.heroiclabs.nakama.rtapi.PartyLeave.Builder, com.heroiclabs.nakama.rtapi.PartyLeaveOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyLeave) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 37; + onChanged(); + return partyLeaveBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyPromote, com.heroiclabs.nakama.rtapi.PartyPromote.Builder, com.heroiclabs.nakama.rtapi.PartyPromoteOrBuilder> partyPromoteBuilder_; + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + * @return Whether the partyPromote field is set. + */ + @java.lang.Override + public boolean hasPartyPromote() { + return messageCase_ == 38; + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + * @return The partyPromote. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromote getPartyPromote() { + if (partyPromoteBuilder_ == null) { + if (messageCase_ == 38) { + return (com.heroiclabs.nakama.rtapi.PartyPromote) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance(); + } else { + if (messageCase_ == 38) { + return partyPromoteBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance(); + } + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + public Builder setPartyPromote(com.heroiclabs.nakama.rtapi.PartyPromote value) { + if (partyPromoteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyPromoteBuilder_.setMessage(value); + } + messageCase_ = 38; + return this; + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + public Builder setPartyPromote( + com.heroiclabs.nakama.rtapi.PartyPromote.Builder builderForValue) { + if (partyPromoteBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyPromoteBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 38; + return this; + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + public Builder mergePartyPromote(com.heroiclabs.nakama.rtapi.PartyPromote value) { + if (partyPromoteBuilder_ == null) { + if (messageCase_ == 38 && + message_ != com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyPromote.newBuilder((com.heroiclabs.nakama.rtapi.PartyPromote) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 38) { + partyPromoteBuilder_.mergeFrom(value); + } else { + partyPromoteBuilder_.setMessage(value); + } + } + messageCase_ = 38; + return this; + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + public Builder clearPartyPromote() { + if (partyPromoteBuilder_ == null) { + if (messageCase_ == 38) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 38) { + messageCase_ = 0; + message_ = null; + } + partyPromoteBuilder_.clear(); + } + return this; + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + public com.heroiclabs.nakama.rtapi.PartyPromote.Builder getPartyPromoteBuilder() { + return getPartyPromoteFieldBuilder().getBuilder(); + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromoteOrBuilder getPartyPromoteOrBuilder() { + if ((messageCase_ == 38) && (partyPromoteBuilder_ != null)) { + return partyPromoteBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 38) { + return (com.heroiclabs.nakama.rtapi.PartyPromote) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance(); + } + } + /** + *
+     * Promote a new party leader.
+     * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyPromote, com.heroiclabs.nakama.rtapi.PartyPromote.Builder, com.heroiclabs.nakama.rtapi.PartyPromoteOrBuilder> + getPartyPromoteFieldBuilder() { + if (partyPromoteBuilder_ == null) { + if (!(messageCase_ == 38)) { + message_ = com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance(); + } + partyPromoteBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyPromote, com.heroiclabs.nakama.rtapi.PartyPromote.Builder, com.heroiclabs.nakama.rtapi.PartyPromoteOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyPromote) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 38; + onChanged(); + return partyPromoteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyLeader, com.heroiclabs.nakama.rtapi.PartyLeader.Builder, com.heroiclabs.nakama.rtapi.PartyLeaderOrBuilder> partyLeaderBuilder_; + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + * @return Whether the partyLeader field is set. + */ + @java.lang.Override + public boolean hasPartyLeader() { + return messageCase_ == 39; + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + * @return The partyLeader. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeader getPartyLeader() { + if (partyLeaderBuilder_ == null) { + if (messageCase_ == 39) { + return (com.heroiclabs.nakama.rtapi.PartyLeader) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance(); + } else { + if (messageCase_ == 39) { + return partyLeaderBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance(); + } + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + public Builder setPartyLeader(com.heroiclabs.nakama.rtapi.PartyLeader value) { + if (partyLeaderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyLeaderBuilder_.setMessage(value); + } + messageCase_ = 39; + return this; + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + public Builder setPartyLeader( + com.heroiclabs.nakama.rtapi.PartyLeader.Builder builderForValue) { + if (partyLeaderBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyLeaderBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 39; + return this; + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + public Builder mergePartyLeader(com.heroiclabs.nakama.rtapi.PartyLeader value) { + if (partyLeaderBuilder_ == null) { + if (messageCase_ == 39 && + message_ != com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyLeader.newBuilder((com.heroiclabs.nakama.rtapi.PartyLeader) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 39) { + partyLeaderBuilder_.mergeFrom(value); + } else { + partyLeaderBuilder_.setMessage(value); + } + } + messageCase_ = 39; + return this; + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + public Builder clearPartyLeader() { + if (partyLeaderBuilder_ == null) { + if (messageCase_ == 39) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 39) { + messageCase_ = 0; + message_ = null; + } + partyLeaderBuilder_.clear(); + } + return this; + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + public com.heroiclabs.nakama.rtapi.PartyLeader.Builder getPartyLeaderBuilder() { + return getPartyLeaderFieldBuilder().getBuilder(); + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeaderOrBuilder getPartyLeaderOrBuilder() { + if ((messageCase_ == 39) && (partyLeaderBuilder_ != null)) { + return partyLeaderBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 39) { + return (com.heroiclabs.nakama.rtapi.PartyLeader) message_; + } + return com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance(); + } + } + /** + *
+     * Announcement of a new party leader.
+     * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyLeader, com.heroiclabs.nakama.rtapi.PartyLeader.Builder, com.heroiclabs.nakama.rtapi.PartyLeaderOrBuilder> + getPartyLeaderFieldBuilder() { + if (partyLeaderBuilder_ == null) { + if (!(messageCase_ == 39)) { + message_ = com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance(); + } + partyLeaderBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyLeader, com.heroiclabs.nakama.rtapi.PartyLeader.Builder, com.heroiclabs.nakama.rtapi.PartyLeaderOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyLeader) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 39; + onChanged(); + return partyLeaderBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyAccept, com.heroiclabs.nakama.rtapi.PartyAccept.Builder, com.heroiclabs.nakama.rtapi.PartyAcceptOrBuilder> partyAcceptBuilder_; + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + * @return Whether the partyAccept field is set. + */ + @java.lang.Override + public boolean hasPartyAccept() { + return messageCase_ == 40; + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + * @return The partyAccept. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAccept getPartyAccept() { + if (partyAcceptBuilder_ == null) { + if (messageCase_ == 40) { + return (com.heroiclabs.nakama.rtapi.PartyAccept) message_; + } + return com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance(); + } else { + if (messageCase_ == 40) { + return partyAcceptBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance(); + } + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + public Builder setPartyAccept(com.heroiclabs.nakama.rtapi.PartyAccept value) { + if (partyAcceptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyAcceptBuilder_.setMessage(value); + } + messageCase_ = 40; + return this; + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + public Builder setPartyAccept( + com.heroiclabs.nakama.rtapi.PartyAccept.Builder builderForValue) { + if (partyAcceptBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyAcceptBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 40; + return this; + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + public Builder mergePartyAccept(com.heroiclabs.nakama.rtapi.PartyAccept value) { + if (partyAcceptBuilder_ == null) { + if (messageCase_ == 40 && + message_ != com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyAccept.newBuilder((com.heroiclabs.nakama.rtapi.PartyAccept) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 40) { + partyAcceptBuilder_.mergeFrom(value); + } else { + partyAcceptBuilder_.setMessage(value); + } + } + messageCase_ = 40; + return this; + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + public Builder clearPartyAccept() { + if (partyAcceptBuilder_ == null) { + if (messageCase_ == 40) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 40) { + messageCase_ = 0; + message_ = null; + } + partyAcceptBuilder_.clear(); + } + return this; + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + public com.heroiclabs.nakama.rtapi.PartyAccept.Builder getPartyAcceptBuilder() { + return getPartyAcceptFieldBuilder().getBuilder(); + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAcceptOrBuilder getPartyAcceptOrBuilder() { + if ((messageCase_ == 40) && (partyAcceptBuilder_ != null)) { + return partyAcceptBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 40) { + return (com.heroiclabs.nakama.rtapi.PartyAccept) message_; + } + return com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance(); + } + } + /** + *
+     * Accept a request to join.
+     * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyAccept, com.heroiclabs.nakama.rtapi.PartyAccept.Builder, com.heroiclabs.nakama.rtapi.PartyAcceptOrBuilder> + getPartyAcceptFieldBuilder() { + if (partyAcceptBuilder_ == null) { + if (!(messageCase_ == 40)) { + message_ = com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance(); + } + partyAcceptBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyAccept, com.heroiclabs.nakama.rtapi.PartyAccept.Builder, com.heroiclabs.nakama.rtapi.PartyAcceptOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyAccept) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 40; + onChanged(); + return partyAcceptBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyRemove, com.heroiclabs.nakama.rtapi.PartyRemove.Builder, com.heroiclabs.nakama.rtapi.PartyRemoveOrBuilder> partyRemoveBuilder_; + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + * @return Whether the partyRemove field is set. + */ + @java.lang.Override + public boolean hasPartyRemove() { + return messageCase_ == 41; + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + * @return The partyRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemove getPartyRemove() { + if (partyRemoveBuilder_ == null) { + if (messageCase_ == 41) { + return (com.heroiclabs.nakama.rtapi.PartyRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance(); + } else { + if (messageCase_ == 41) { + return partyRemoveBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance(); + } + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + public Builder setPartyRemove(com.heroiclabs.nakama.rtapi.PartyRemove value) { + if (partyRemoveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyRemoveBuilder_.setMessage(value); + } + messageCase_ = 41; + return this; + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + public Builder setPartyRemove( + com.heroiclabs.nakama.rtapi.PartyRemove.Builder builderForValue) { + if (partyRemoveBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyRemoveBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 41; + return this; + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + public Builder mergePartyRemove(com.heroiclabs.nakama.rtapi.PartyRemove value) { + if (partyRemoveBuilder_ == null) { + if (messageCase_ == 41 && + message_ != com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyRemove.newBuilder((com.heroiclabs.nakama.rtapi.PartyRemove) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 41) { + partyRemoveBuilder_.mergeFrom(value); + } else { + partyRemoveBuilder_.setMessage(value); + } + } + messageCase_ = 41; + return this; + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + public Builder clearPartyRemove() { + if (partyRemoveBuilder_ == null) { + if (messageCase_ == 41) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 41) { + messageCase_ = 0; + message_ = null; + } + partyRemoveBuilder_.clear(); + } + return this; + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + public com.heroiclabs.nakama.rtapi.PartyRemove.Builder getPartyRemoveBuilder() { + return getPartyRemoveFieldBuilder().getBuilder(); + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemoveOrBuilder getPartyRemoveOrBuilder() { + if ((messageCase_ == 41) && (partyRemoveBuilder_ != null)) { + return partyRemoveBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 41) { + return (com.heroiclabs.nakama.rtapi.PartyRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance(); + } + } + /** + *
+     * Kick a party member, or decline a request to join.
+     * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyRemove, com.heroiclabs.nakama.rtapi.PartyRemove.Builder, com.heroiclabs.nakama.rtapi.PartyRemoveOrBuilder> + getPartyRemoveFieldBuilder() { + if (partyRemoveBuilder_ == null) { + if (!(messageCase_ == 41)) { + message_ = com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance(); + } + partyRemoveBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyRemove, com.heroiclabs.nakama.rtapi.PartyRemove.Builder, com.heroiclabs.nakama.rtapi.PartyRemoveOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyRemove) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 41; + onChanged(); + return partyRemoveBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyClose, com.heroiclabs.nakama.rtapi.PartyClose.Builder, com.heroiclabs.nakama.rtapi.PartyCloseOrBuilder> partyCloseBuilder_; + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + * @return Whether the partyClose field is set. + */ + @java.lang.Override + public boolean hasPartyClose() { + return messageCase_ == 42; + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + * @return The partyClose. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyClose getPartyClose() { + if (partyCloseBuilder_ == null) { + if (messageCase_ == 42) { + return (com.heroiclabs.nakama.rtapi.PartyClose) message_; + } + return com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance(); + } else { + if (messageCase_ == 42) { + return partyCloseBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance(); + } + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + public Builder setPartyClose(com.heroiclabs.nakama.rtapi.PartyClose value) { + if (partyCloseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyCloseBuilder_.setMessage(value); + } + messageCase_ = 42; + return this; + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + public Builder setPartyClose( + com.heroiclabs.nakama.rtapi.PartyClose.Builder builderForValue) { + if (partyCloseBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyCloseBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 42; + return this; + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + public Builder mergePartyClose(com.heroiclabs.nakama.rtapi.PartyClose value) { + if (partyCloseBuilder_ == null) { + if (messageCase_ == 42 && + message_ != com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyClose.newBuilder((com.heroiclabs.nakama.rtapi.PartyClose) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 42) { + partyCloseBuilder_.mergeFrom(value); + } else { + partyCloseBuilder_.setMessage(value); + } + } + messageCase_ = 42; + return this; + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + public Builder clearPartyClose() { + if (partyCloseBuilder_ == null) { + if (messageCase_ == 42) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 42) { + messageCase_ = 0; + message_ = null; + } + partyCloseBuilder_.clear(); + } + return this; + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + public com.heroiclabs.nakama.rtapi.PartyClose.Builder getPartyCloseBuilder() { + return getPartyCloseFieldBuilder().getBuilder(); + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCloseOrBuilder getPartyCloseOrBuilder() { + if ((messageCase_ == 42) && (partyCloseBuilder_ != null)) { + return partyCloseBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 42) { + return (com.heroiclabs.nakama.rtapi.PartyClose) message_; + } + return com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance(); + } + } + /** + *
+     * End a party, kicking all party members and closing it.
+     * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyClose, com.heroiclabs.nakama.rtapi.PartyClose.Builder, com.heroiclabs.nakama.rtapi.PartyCloseOrBuilder> + getPartyCloseFieldBuilder() { + if (partyCloseBuilder_ == null) { + if (!(messageCase_ == 42)) { + message_ = com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance(); + } + partyCloseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyClose, com.heroiclabs.nakama.rtapi.PartyClose.Builder, com.heroiclabs.nakama.rtapi.PartyCloseOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyClose) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 42; + onChanged(); + return partyCloseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoinRequestList, com.heroiclabs.nakama.rtapi.PartyJoinRequestList.Builder, com.heroiclabs.nakama.rtapi.PartyJoinRequestListOrBuilder> partyJoinRequestListBuilder_; + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + * @return Whether the partyJoinRequestList field is set. + */ + @java.lang.Override + public boolean hasPartyJoinRequestList() { + return messageCase_ == 43; + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + * @return The partyJoinRequestList. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestList getPartyJoinRequestList() { + if (partyJoinRequestListBuilder_ == null) { + if (messageCase_ == 43) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance(); + } else { + if (messageCase_ == 43) { + return partyJoinRequestListBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance(); + } + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + public Builder setPartyJoinRequestList(com.heroiclabs.nakama.rtapi.PartyJoinRequestList value) { + if (partyJoinRequestListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyJoinRequestListBuilder_.setMessage(value); + } + messageCase_ = 43; + return this; + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + public Builder setPartyJoinRequestList( + com.heroiclabs.nakama.rtapi.PartyJoinRequestList.Builder builderForValue) { + if (partyJoinRequestListBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyJoinRequestListBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 43; + return this; + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + public Builder mergePartyJoinRequestList(com.heroiclabs.nakama.rtapi.PartyJoinRequestList value) { + if (partyJoinRequestListBuilder_ == null) { + if (messageCase_ == 43 && + message_ != com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyJoinRequestList.newBuilder((com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 43) { + partyJoinRequestListBuilder_.mergeFrom(value); + } else { + partyJoinRequestListBuilder_.setMessage(value); + } + } + messageCase_ = 43; + return this; + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + public Builder clearPartyJoinRequestList() { + if (partyJoinRequestListBuilder_ == null) { + if (messageCase_ == 43) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 43) { + messageCase_ = 0; + message_ = null; + } + partyJoinRequestListBuilder_.clear(); + } + return this; + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + public com.heroiclabs.nakama.rtapi.PartyJoinRequestList.Builder getPartyJoinRequestListBuilder() { + return getPartyJoinRequestListFieldBuilder().getBuilder(); + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestListOrBuilder getPartyJoinRequestListOrBuilder() { + if ((messageCase_ == 43) && (partyJoinRequestListBuilder_ != null)) { + return partyJoinRequestListBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 43) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance(); + } + } + /** + *
+     * Request a list of pending join requests for a party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoinRequestList, com.heroiclabs.nakama.rtapi.PartyJoinRequestList.Builder, com.heroiclabs.nakama.rtapi.PartyJoinRequestListOrBuilder> + getPartyJoinRequestListFieldBuilder() { + if (partyJoinRequestListBuilder_ == null) { + if (!(messageCase_ == 43)) { + message_ = com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance(); + } + partyJoinRequestListBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoinRequestList, com.heroiclabs.nakama.rtapi.PartyJoinRequestList.Builder, com.heroiclabs.nakama.rtapi.PartyJoinRequestListOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 43; + onChanged(); + return partyJoinRequestListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoinRequest, com.heroiclabs.nakama.rtapi.PartyJoinRequest.Builder, com.heroiclabs.nakama.rtapi.PartyJoinRequestOrBuilder> partyJoinRequestBuilder_; + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + * @return Whether the partyJoinRequest field is set. + */ + @java.lang.Override + public boolean hasPartyJoinRequest() { + return messageCase_ == 44; + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + * @return The partyJoinRequest. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequest getPartyJoinRequest() { + if (partyJoinRequestBuilder_ == null) { + if (messageCase_ == 44) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance(); + } else { + if (messageCase_ == 44) { + return partyJoinRequestBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance(); + } + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + public Builder setPartyJoinRequest(com.heroiclabs.nakama.rtapi.PartyJoinRequest value) { + if (partyJoinRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyJoinRequestBuilder_.setMessage(value); + } + messageCase_ = 44; + return this; + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + public Builder setPartyJoinRequest( + com.heroiclabs.nakama.rtapi.PartyJoinRequest.Builder builderForValue) { + if (partyJoinRequestBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyJoinRequestBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 44; + return this; + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + public Builder mergePartyJoinRequest(com.heroiclabs.nakama.rtapi.PartyJoinRequest value) { + if (partyJoinRequestBuilder_ == null) { + if (messageCase_ == 44 && + message_ != com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyJoinRequest.newBuilder((com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 44) { + partyJoinRequestBuilder_.mergeFrom(value); + } else { + partyJoinRequestBuilder_.setMessage(value); + } + } + messageCase_ = 44; + return this; + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + public Builder clearPartyJoinRequest() { + if (partyJoinRequestBuilder_ == null) { + if (messageCase_ == 44) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 44) { + messageCase_ = 0; + message_ = null; + } + partyJoinRequestBuilder_.clear(); + } + return this; + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + public com.heroiclabs.nakama.rtapi.PartyJoinRequest.Builder getPartyJoinRequestBuilder() { + return getPartyJoinRequestFieldBuilder().getBuilder(); + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestOrBuilder getPartyJoinRequestOrBuilder() { + if ((messageCase_ == 44) && (partyJoinRequestBuilder_ != null)) { + return partyJoinRequestBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 44) { + return (com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_; + } + return com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance(); + } + } + /** + *
+     * Incoming notification for one or more new presences attempting to join the party.
+     * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoinRequest, com.heroiclabs.nakama.rtapi.PartyJoinRequest.Builder, com.heroiclabs.nakama.rtapi.PartyJoinRequestOrBuilder> + getPartyJoinRequestFieldBuilder() { + if (partyJoinRequestBuilder_ == null) { + if (!(messageCase_ == 44)) { + message_ = com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance(); + } + partyJoinRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyJoinRequest, com.heroiclabs.nakama.rtapi.PartyJoinRequest.Builder, com.heroiclabs.nakama.rtapi.PartyJoinRequestOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyJoinRequest) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 44; + onChanged(); + return partyJoinRequestBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd, com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerAddOrBuilder> partyMatchmakerAddBuilder_; + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + * @return Whether the partyMatchmakerAdd field is set. + */ + @java.lang.Override + public boolean hasPartyMatchmakerAdd() { + return messageCase_ == 45; + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + * @return The partyMatchmakerAdd. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd getPartyMatchmakerAdd() { + if (partyMatchmakerAddBuilder_ == null) { + if (messageCase_ == 45) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance(); + } else { + if (messageCase_ == 45) { + return partyMatchmakerAddBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance(); + } + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + public Builder setPartyMatchmakerAdd(com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd value) { + if (partyMatchmakerAddBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyMatchmakerAddBuilder_.setMessage(value); + } + messageCase_ = 45; + return this; + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + public Builder setPartyMatchmakerAdd( + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.Builder builderForValue) { + if (partyMatchmakerAddBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyMatchmakerAddBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 45; + return this; + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + public Builder mergePartyMatchmakerAdd(com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd value) { + if (partyMatchmakerAddBuilder_ == null) { + if (messageCase_ == 45 && + message_ != com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.newBuilder((com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 45) { + partyMatchmakerAddBuilder_.mergeFrom(value); + } else { + partyMatchmakerAddBuilder_.setMessage(value); + } + } + messageCase_ = 45; + return this; + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + public Builder clearPartyMatchmakerAdd() { + if (partyMatchmakerAddBuilder_ == null) { + if (messageCase_ == 45) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 45) { + messageCase_ = 0; + message_ = null; + } + partyMatchmakerAddBuilder_.clear(); + } + return this; + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.Builder getPartyMatchmakerAddBuilder() { + return getPartyMatchmakerAddFieldBuilder().getBuilder(); + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAddOrBuilder getPartyMatchmakerAddOrBuilder() { + if ((messageCase_ == 45) && (partyMatchmakerAddBuilder_ != null)) { + return partyMatchmakerAddBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 45) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance(); + } + } + /** + *
+     * Begin matchmaking as a party.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd, com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerAddOrBuilder> + getPartyMatchmakerAddFieldBuilder() { + if (partyMatchmakerAddBuilder_ == null) { + if (!(messageCase_ == 45)) { + message_ = com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance(); + } + partyMatchmakerAddBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd, com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerAddOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 45; + onChanged(); + return partyMatchmakerAddBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemoveOrBuilder> partyMatchmakerRemoveBuilder_; + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + * @return Whether the partyMatchmakerRemove field is set. + */ + @java.lang.Override + public boolean hasPartyMatchmakerRemove() { + return messageCase_ == 46; + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + * @return The partyMatchmakerRemove. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove getPartyMatchmakerRemove() { + if (partyMatchmakerRemoveBuilder_ == null) { + if (messageCase_ == 46) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance(); + } else { + if (messageCase_ == 46) { + return partyMatchmakerRemoveBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance(); + } + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + public Builder setPartyMatchmakerRemove(com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove value) { + if (partyMatchmakerRemoveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyMatchmakerRemoveBuilder_.setMessage(value); + } + messageCase_ = 46; + return this; + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + public Builder setPartyMatchmakerRemove( + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.Builder builderForValue) { + if (partyMatchmakerRemoveBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyMatchmakerRemoveBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 46; + return this; + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + public Builder mergePartyMatchmakerRemove(com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove value) { + if (partyMatchmakerRemoveBuilder_ == null) { + if (messageCase_ == 46 && + message_ != com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.newBuilder((com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 46) { + partyMatchmakerRemoveBuilder_.mergeFrom(value); + } else { + partyMatchmakerRemoveBuilder_.setMessage(value); + } + } + messageCase_ = 46; + return this; + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + public Builder clearPartyMatchmakerRemove() { + if (partyMatchmakerRemoveBuilder_ == null) { + if (messageCase_ == 46) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 46) { + messageCase_ = 0; + message_ = null; + } + partyMatchmakerRemoveBuilder_.clear(); + } + return this; + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.Builder getPartyMatchmakerRemoveBuilder() { + return getPartyMatchmakerRemoveFieldBuilder().getBuilder(); + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemoveOrBuilder getPartyMatchmakerRemoveOrBuilder() { + if ((messageCase_ == 46) && (partyMatchmakerRemoveBuilder_ != null)) { + return partyMatchmakerRemoveBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 46) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance(); + } + } + /** + *
+     * Cancel a party matchmaking process using a ticket.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemoveOrBuilder> + getPartyMatchmakerRemoveFieldBuilder() { + if (partyMatchmakerRemoveBuilder_ == null) { + if (!(messageCase_ == 46)) { + message_ = com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance(); + } + partyMatchmakerRemoveBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemoveOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 46; + onChanged(); + return partyMatchmakerRemoveBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicketOrBuilder> partyMatchmakerTicketBuilder_; + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + * @return Whether the partyMatchmakerTicket field is set. + */ + @java.lang.Override + public boolean hasPartyMatchmakerTicket() { + return messageCase_ == 47; + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + * @return The partyMatchmakerTicket. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket getPartyMatchmakerTicket() { + if (partyMatchmakerTicketBuilder_ == null) { + if (messageCase_ == 47) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance(); + } else { + if (messageCase_ == 47) { + return partyMatchmakerTicketBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance(); + } + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + public Builder setPartyMatchmakerTicket(com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket value) { + if (partyMatchmakerTicketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyMatchmakerTicketBuilder_.setMessage(value); + } + messageCase_ = 47; + return this; + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + public Builder setPartyMatchmakerTicket( + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.Builder builderForValue) { + if (partyMatchmakerTicketBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyMatchmakerTicketBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 47; + return this; + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + public Builder mergePartyMatchmakerTicket(com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket value) { + if (partyMatchmakerTicketBuilder_ == null) { + if (messageCase_ == 47 && + message_ != com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.newBuilder((com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 47) { + partyMatchmakerTicketBuilder_.mergeFrom(value); + } else { + partyMatchmakerTicketBuilder_.setMessage(value); + } + } + messageCase_ = 47; + return this; + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + public Builder clearPartyMatchmakerTicket() { + if (partyMatchmakerTicketBuilder_ == null) { + if (messageCase_ == 47) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 47) { + messageCase_ = 0; + message_ = null; + } + partyMatchmakerTicketBuilder_.clear(); + } + return this; + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.Builder getPartyMatchmakerTicketBuilder() { + return getPartyMatchmakerTicketFieldBuilder().getBuilder(); + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicketOrBuilder getPartyMatchmakerTicketOrBuilder() { + if ((messageCase_ == 47) && (partyMatchmakerTicketBuilder_ != null)) { + return partyMatchmakerTicketBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 47) { + return (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_; + } + return com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance(); + } + } + /** + *
+     * A response from starting a new party matchmaking process.
+     * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicketOrBuilder> + getPartyMatchmakerTicketFieldBuilder() { + if (partyMatchmakerTicketBuilder_ == null) { + if (!(messageCase_ == 47)) { + message_ = com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance(); + } + partyMatchmakerTicketBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.Builder, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicketOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 47; + onChanged(); + return partyMatchmakerTicketBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyData, com.heroiclabs.nakama.rtapi.PartyData.Builder, com.heroiclabs.nakama.rtapi.PartyDataOrBuilder> partyDataBuilder_; + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + * @return Whether the partyData field is set. + */ + @java.lang.Override + public boolean hasPartyData() { + return messageCase_ == 48; + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + * @return The partyData. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyData getPartyData() { + if (partyDataBuilder_ == null) { + if (messageCase_ == 48) { + return (com.heroiclabs.nakama.rtapi.PartyData) message_; + } + return com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance(); + } else { + if (messageCase_ == 48) { + return partyDataBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance(); + } + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + public Builder setPartyData(com.heroiclabs.nakama.rtapi.PartyData value) { + if (partyDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyDataBuilder_.setMessage(value); + } + messageCase_ = 48; + return this; + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + public Builder setPartyData( + com.heroiclabs.nakama.rtapi.PartyData.Builder builderForValue) { + if (partyDataBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyDataBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 48; + return this; + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + public Builder mergePartyData(com.heroiclabs.nakama.rtapi.PartyData value) { + if (partyDataBuilder_ == null) { + if (messageCase_ == 48 && + message_ != com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyData.newBuilder((com.heroiclabs.nakama.rtapi.PartyData) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 48) { + partyDataBuilder_.mergeFrom(value); + } else { + partyDataBuilder_.setMessage(value); + } + } + messageCase_ = 48; + return this; + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + public Builder clearPartyData() { + if (partyDataBuilder_ == null) { + if (messageCase_ == 48) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 48) { + messageCase_ = 0; + message_ = null; + } + partyDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + public com.heroiclabs.nakama.rtapi.PartyData.Builder getPartyDataBuilder() { + return getPartyDataFieldBuilder().getBuilder(); + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataOrBuilder getPartyDataOrBuilder() { + if ((messageCase_ == 48) && (partyDataBuilder_ != null)) { + return partyDataBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 48) { + return (com.heroiclabs.nakama.rtapi.PartyData) message_; + } + return com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance(); + } + } + /** + *
+     * Incoming party data delivered from the server.
+     * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyData, com.heroiclabs.nakama.rtapi.PartyData.Builder, com.heroiclabs.nakama.rtapi.PartyDataOrBuilder> + getPartyDataFieldBuilder() { + if (partyDataBuilder_ == null) { + if (!(messageCase_ == 48)) { + message_ = com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance(); + } + partyDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyData, com.heroiclabs.nakama.rtapi.PartyData.Builder, com.heroiclabs.nakama.rtapi.PartyDataOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyData) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 48; + onChanged(); + return partyDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyDataSend, com.heroiclabs.nakama.rtapi.PartyDataSend.Builder, com.heroiclabs.nakama.rtapi.PartyDataSendOrBuilder> partyDataSendBuilder_; + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + * @return Whether the partyDataSend field is set. + */ + @java.lang.Override + public boolean hasPartyDataSend() { + return messageCase_ == 49; + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + * @return The partyDataSend. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSend getPartyDataSend() { + if (partyDataSendBuilder_ == null) { + if (messageCase_ == 49) { + return (com.heroiclabs.nakama.rtapi.PartyDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance(); + } else { + if (messageCase_ == 49) { + return partyDataSendBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + public Builder setPartyDataSend(com.heroiclabs.nakama.rtapi.PartyDataSend value) { + if (partyDataSendBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyDataSendBuilder_.setMessage(value); + } + messageCase_ = 49; + return this; + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + public Builder setPartyDataSend( + com.heroiclabs.nakama.rtapi.PartyDataSend.Builder builderForValue) { + if (partyDataSendBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyDataSendBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 49; + return this; + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + public Builder mergePartyDataSend(com.heroiclabs.nakama.rtapi.PartyDataSend value) { + if (partyDataSendBuilder_ == null) { + if (messageCase_ == 49 && + message_ != com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyDataSend.newBuilder((com.heroiclabs.nakama.rtapi.PartyDataSend) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 49) { + partyDataSendBuilder_.mergeFrom(value); + } else { + partyDataSendBuilder_.setMessage(value); + } + } + messageCase_ = 49; + return this; + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + public Builder clearPartyDataSend() { + if (partyDataSendBuilder_ == null) { + if (messageCase_ == 49) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 49) { + messageCase_ = 0; + message_ = null; + } + partyDataSendBuilder_.clear(); + } + return this; + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + public com.heroiclabs.nakama.rtapi.PartyDataSend.Builder getPartyDataSendBuilder() { + return getPartyDataSendFieldBuilder().getBuilder(); + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSendOrBuilder getPartyDataSendOrBuilder() { + if ((messageCase_ == 49) && (partyDataSendBuilder_ != null)) { + return partyDataSendBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 49) { + return (com.heroiclabs.nakama.rtapi.PartyDataSend) message_; + } + return com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance(); + } + } + /** + *
+     * A client to server request to send data to a party.
+     * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyDataSend, com.heroiclabs.nakama.rtapi.PartyDataSend.Builder, com.heroiclabs.nakama.rtapi.PartyDataSendOrBuilder> + getPartyDataSendFieldBuilder() { + if (partyDataSendBuilder_ == null) { + if (!(messageCase_ == 49)) { + message_ = com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance(); + } + partyDataSendBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyDataSend, com.heroiclabs.nakama.rtapi.PartyDataSend.Builder, com.heroiclabs.nakama.rtapi.PartyDataSendOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyDataSend) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 49; + onChanged(); + return partyDataSendBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyPresenceEvent, com.heroiclabs.nakama.rtapi.PartyPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.PartyPresenceEventOrBuilder> partyPresenceEventBuilder_; + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + * @return Whether the partyPresenceEvent field is set. + */ + @java.lang.Override + public boolean hasPartyPresenceEvent() { + return messageCase_ == 50; + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + * @return The partyPresenceEvent. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEvent getPartyPresenceEvent() { + if (partyPresenceEventBuilder_ == null) { + if (messageCase_ == 50) { + return (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance(); + } else { + if (messageCase_ == 50) { + return partyPresenceEventBuilder_.getMessage(); + } + return com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + public Builder setPartyPresenceEvent(com.heroiclabs.nakama.rtapi.PartyPresenceEvent value) { + if (partyPresenceEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + partyPresenceEventBuilder_.setMessage(value); + } + messageCase_ = 50; + return this; + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + public Builder setPartyPresenceEvent( + com.heroiclabs.nakama.rtapi.PartyPresenceEvent.Builder builderForValue) { + if (partyPresenceEventBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + partyPresenceEventBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 50; + return this; + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + public Builder mergePartyPresenceEvent(com.heroiclabs.nakama.rtapi.PartyPresenceEvent value) { + if (partyPresenceEventBuilder_ == null) { + if (messageCase_ == 50 && + message_ != com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance()) { + message_ = com.heroiclabs.nakama.rtapi.PartyPresenceEvent.newBuilder((com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_) + .mergeFrom(value).buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 50) { + partyPresenceEventBuilder_.mergeFrom(value); + } else { + partyPresenceEventBuilder_.setMessage(value); + } + } + messageCase_ = 50; + return this; + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + public Builder clearPartyPresenceEvent() { + if (partyPresenceEventBuilder_ == null) { + if (messageCase_ == 50) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 50) { + messageCase_ = 0; + message_ = null; + } + partyPresenceEventBuilder_.clear(); + } + return this; + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + public com.heroiclabs.nakama.rtapi.PartyPresenceEvent.Builder getPartyPresenceEventBuilder() { + return getPartyPresenceEventFieldBuilder().getBuilder(); + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEventOrBuilder getPartyPresenceEventOrBuilder() { + if ((messageCase_ == 50) && (partyPresenceEventBuilder_ != null)) { + return partyPresenceEventBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 50) { + return (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_; + } + return com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance(); + } + } + /** + *
+     * Presence update for a particular party.
+     * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyPresenceEvent, com.heroiclabs.nakama.rtapi.PartyPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.PartyPresenceEventOrBuilder> + getPartyPresenceEventFieldBuilder() { + if (partyPresenceEventBuilder_ == null) { + if (!(messageCase_ == 50)) { + message_ = com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance(); + } + partyPresenceEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.PartyPresenceEvent, com.heroiclabs.nakama.rtapi.PartyPresenceEvent.Builder, com.heroiclabs.nakama.rtapi.PartyPresenceEventOrBuilder>( + (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 50; + onChanged(); + return partyPresenceEventBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Envelope) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Envelope) + private static final com.heroiclabs.nakama.rtapi.Envelope DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Envelope(); + } + + public static com.heroiclabs.nakama.rtapi.Envelope getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Envelope parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Envelope getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/EnvelopeOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/EnvelopeOrBuilder.java new file mode 100644 index 00000000..26990d69 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/EnvelopeOrBuilder.java @@ -0,0 +1,1348 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface EnvelopeOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Envelope) + com.google.protobuf.MessageOrBuilder { + + /** + * string cid = 1 [json_name = "cid"]; + * @return The cid. + */ + java.lang.String getCid(); + /** + * string cid = 1 [json_name = "cid"]; + * @return The bytes for cid. + */ + com.google.protobuf.ByteString + getCidBytes(); + + /** + *
+   * A response from a channel join operation.
+   * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + * @return Whether the channel field is set. + */ + boolean hasChannel(); + /** + *
+   * A response from a channel join operation.
+   * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + * @return The channel. + */ + com.heroiclabs.nakama.rtapi.Channel getChannel(); + /** + *
+   * A response from a channel join operation.
+   * 
+ * + * .nakama.realtime.Channel channel = 2 [json_name = "channel"]; + */ + com.heroiclabs.nakama.rtapi.ChannelOrBuilder getChannelOrBuilder(); + + /** + *
+   * Join a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + * @return Whether the channelJoin field is set. + */ + boolean hasChannelJoin(); + /** + *
+   * Join a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + * @return The channelJoin. + */ + com.heroiclabs.nakama.rtapi.ChannelJoin getChannelJoin(); + /** + *
+   * Join a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelJoin channel_join = 3 [json_name = "channelJoin"]; + */ + com.heroiclabs.nakama.rtapi.ChannelJoinOrBuilder getChannelJoinOrBuilder(); + + /** + *
+   * Leave a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + * @return Whether the channelLeave field is set. + */ + boolean hasChannelLeave(); + /** + *
+   * Leave a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + * @return The channelLeave. + */ + com.heroiclabs.nakama.rtapi.ChannelLeave getChannelLeave(); + /** + *
+   * Leave a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelLeave channel_leave = 4 [json_name = "channelLeave"]; + */ + com.heroiclabs.nakama.rtapi.ChannelLeaveOrBuilder getChannelLeaveOrBuilder(); + + /** + *
+   * An incoming message on a realtime chat channel.
+   * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + * @return Whether the channelMessage field is set. + */ + boolean hasChannelMessage(); + /** + *
+   * An incoming message on a realtime chat channel.
+   * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + * @return The channelMessage. + */ + com.heroiclabs.nakama.api.ChannelMessage getChannelMessage(); + /** + *
+   * An incoming message on a realtime chat channel.
+   * 
+ * + * .nakama.api.ChannelMessage channel_message = 5 [json_name = "channelMessage"]; + */ + com.heroiclabs.nakama.api.ChannelMessageOrBuilder getChannelMessageOrBuilder(); + + /** + *
+   * An acknowledgement received in response to sending a message on a chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + * @return Whether the channelMessageAck field is set. + */ + boolean hasChannelMessageAck(); + /** + *
+   * An acknowledgement received in response to sending a message on a chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + * @return The channelMessageAck. + */ + com.heroiclabs.nakama.rtapi.ChannelMessageAck getChannelMessageAck(); + /** + *
+   * An acknowledgement received in response to sending a message on a chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageAck channel_message_ack = 6 [json_name = "channelMessageAck"]; + */ + com.heroiclabs.nakama.rtapi.ChannelMessageAckOrBuilder getChannelMessageAckOrBuilder(); + + /** + *
+   * Send a message to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + * @return Whether the channelMessageSend field is set. + */ + boolean hasChannelMessageSend(); + /** + *
+   * Send a message to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + * @return The channelMessageSend. + */ + com.heroiclabs.nakama.rtapi.ChannelMessageSend getChannelMessageSend(); + /** + *
+   * Send a message to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageSend channel_message_send = 7 [json_name = "channelMessageSend"]; + */ + com.heroiclabs.nakama.rtapi.ChannelMessageSendOrBuilder getChannelMessageSendOrBuilder(); + + /** + *
+   * Update a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + * @return Whether the channelMessageUpdate field is set. + */ + boolean hasChannelMessageUpdate(); + /** + *
+   * Update a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + * @return The channelMessageUpdate. + */ + com.heroiclabs.nakama.rtapi.ChannelMessageUpdate getChannelMessageUpdate(); + /** + *
+   * Update a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageUpdate channel_message_update = 8 [json_name = "channelMessageUpdate"]; + */ + com.heroiclabs.nakama.rtapi.ChannelMessageUpdateOrBuilder getChannelMessageUpdateOrBuilder(); + + /** + *
+   * Remove a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + * @return Whether the channelMessageRemove field is set. + */ + boolean hasChannelMessageRemove(); + /** + *
+   * Remove a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + * @return The channelMessageRemove. + */ + com.heroiclabs.nakama.rtapi.ChannelMessageRemove getChannelMessageRemove(); + /** + *
+   * Remove a message previously sent to a realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelMessageRemove channel_message_remove = 9 [json_name = "channelMessageRemove"]; + */ + com.heroiclabs.nakama.rtapi.ChannelMessageRemoveOrBuilder getChannelMessageRemoveOrBuilder(); + + /** + *
+   * Presence update for a particular realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + * @return Whether the channelPresenceEvent field is set. + */ + boolean hasChannelPresenceEvent(); + /** + *
+   * Presence update for a particular realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + * @return The channelPresenceEvent. + */ + com.heroiclabs.nakama.rtapi.ChannelPresenceEvent getChannelPresenceEvent(); + /** + *
+   * Presence update for a particular realtime chat channel.
+   * 
+ * + * .nakama.realtime.ChannelPresenceEvent channel_presence_event = 10 [json_name = "channelPresenceEvent"]; + */ + com.heroiclabs.nakama.rtapi.ChannelPresenceEventOrBuilder getChannelPresenceEventOrBuilder(); + + /** + *
+   * Describes an error which occurred on the server.
+   * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * Describes an error which occurred on the server.
+   * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + * @return The error. + */ + com.heroiclabs.nakama.rtapi.Error getError(); + /** + *
+   * Describes an error which occurred on the server.
+   * 
+ * + * .nakama.realtime.Error error = 11 [json_name = "error"]; + */ + com.heroiclabs.nakama.rtapi.ErrorOrBuilder getErrorOrBuilder(); + + /** + *
+   * Incoming information about a realtime match.
+   * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + * @return Whether the match field is set. + */ + boolean hasMatch(); + /** + *
+   * Incoming information about a realtime match.
+   * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + * @return The match. + */ + com.heroiclabs.nakama.rtapi.Match getMatch(); + /** + *
+   * Incoming information about a realtime match.
+   * 
+ * + * .nakama.realtime.Match match = 12 [json_name = "match"]; + */ + com.heroiclabs.nakama.rtapi.MatchOrBuilder getMatchOrBuilder(); + + /** + *
+   * A client to server request to create a realtime match.
+   * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + * @return Whether the matchCreate field is set. + */ + boolean hasMatchCreate(); + /** + *
+   * A client to server request to create a realtime match.
+   * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + * @return The matchCreate. + */ + com.heroiclabs.nakama.rtapi.MatchCreate getMatchCreate(); + /** + *
+   * A client to server request to create a realtime match.
+   * 
+ * + * .nakama.realtime.MatchCreate match_create = 13 [json_name = "matchCreate"]; + */ + com.heroiclabs.nakama.rtapi.MatchCreateOrBuilder getMatchCreateOrBuilder(); + + /** + *
+   * Incoming realtime match data delivered from the server.
+   * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + * @return Whether the matchData field is set. + */ + boolean hasMatchData(); + /** + *
+   * Incoming realtime match data delivered from the server.
+   * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + * @return The matchData. + */ + com.heroiclabs.nakama.rtapi.MatchData getMatchData(); + /** + *
+   * Incoming realtime match data delivered from the server.
+   * 
+ * + * .nakama.realtime.MatchData match_data = 14 [json_name = "matchData"]; + */ + com.heroiclabs.nakama.rtapi.MatchDataOrBuilder getMatchDataOrBuilder(); + + /** + *
+   * A client to server request to send data to a realtime match.
+   * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + * @return Whether the matchDataSend field is set. + */ + boolean hasMatchDataSend(); + /** + *
+   * A client to server request to send data to a realtime match.
+   * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + * @return The matchDataSend. + */ + com.heroiclabs.nakama.rtapi.MatchDataSend getMatchDataSend(); + /** + *
+   * A client to server request to send data to a realtime match.
+   * 
+ * + * .nakama.realtime.MatchDataSend match_data_send = 15 [json_name = "matchDataSend"]; + */ + com.heroiclabs.nakama.rtapi.MatchDataSendOrBuilder getMatchDataSendOrBuilder(); + + /** + *
+   * A client to server request to join a realtime match.
+   * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + * @return Whether the matchJoin field is set. + */ + boolean hasMatchJoin(); + /** + *
+   * A client to server request to join a realtime match.
+   * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + * @return The matchJoin. + */ + com.heroiclabs.nakama.rtapi.MatchJoin getMatchJoin(); + /** + *
+   * A client to server request to join a realtime match.
+   * 
+ * + * .nakama.realtime.MatchJoin match_join = 16 [json_name = "matchJoin"]; + */ + com.heroiclabs.nakama.rtapi.MatchJoinOrBuilder getMatchJoinOrBuilder(); + + /** + *
+   * A client to server request to leave a realtime match.
+   * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + * @return Whether the matchLeave field is set. + */ + boolean hasMatchLeave(); + /** + *
+   * A client to server request to leave a realtime match.
+   * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + * @return The matchLeave. + */ + com.heroiclabs.nakama.rtapi.MatchLeave getMatchLeave(); + /** + *
+   * A client to server request to leave a realtime match.
+   * 
+ * + * .nakama.realtime.MatchLeave match_leave = 17 [json_name = "matchLeave"]; + */ + com.heroiclabs.nakama.rtapi.MatchLeaveOrBuilder getMatchLeaveOrBuilder(); + + /** + *
+   * Presence update for a particular realtime match.
+   * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + * @return Whether the matchPresenceEvent field is set. + */ + boolean hasMatchPresenceEvent(); + /** + *
+   * Presence update for a particular realtime match.
+   * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + * @return The matchPresenceEvent. + */ + com.heroiclabs.nakama.rtapi.MatchPresenceEvent getMatchPresenceEvent(); + /** + *
+   * Presence update for a particular realtime match.
+   * 
+ * + * .nakama.realtime.MatchPresenceEvent match_presence_event = 18 [json_name = "matchPresenceEvent"]; + */ + com.heroiclabs.nakama.rtapi.MatchPresenceEventOrBuilder getMatchPresenceEventOrBuilder(); + + /** + *
+   * Submit a new matchmaking process request.
+   * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + * @return Whether the matchmakerAdd field is set. + */ + boolean hasMatchmakerAdd(); + /** + *
+   * Submit a new matchmaking process request.
+   * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + * @return The matchmakerAdd. + */ + com.heroiclabs.nakama.rtapi.MatchmakerAdd getMatchmakerAdd(); + /** + *
+   * Submit a new matchmaking process request.
+   * 
+ * + * .nakama.realtime.MatchmakerAdd matchmaker_add = 19 [json_name = "matchmakerAdd"]; + */ + com.heroiclabs.nakama.rtapi.MatchmakerAddOrBuilder getMatchmakerAddOrBuilder(); + + /** + *
+   * A successful matchmaking result.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + * @return Whether the matchmakerMatched field is set. + */ + boolean hasMatchmakerMatched(); + /** + *
+   * A successful matchmaking result.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + * @return The matchmakerMatched. + */ + com.heroiclabs.nakama.rtapi.MatchmakerMatched getMatchmakerMatched(); + /** + *
+   * A successful matchmaking result.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched matchmaker_matched = 20 [json_name = "matchmakerMatched"]; + */ + com.heroiclabs.nakama.rtapi.MatchmakerMatchedOrBuilder getMatchmakerMatchedOrBuilder(); + + /** + *
+   * Cancel a matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + * @return Whether the matchmakerRemove field is set. + */ + boolean hasMatchmakerRemove(); + /** + *
+   * Cancel a matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + * @return The matchmakerRemove. + */ + com.heroiclabs.nakama.rtapi.MatchmakerRemove getMatchmakerRemove(); + /** + *
+   * Cancel a matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.MatchmakerRemove matchmaker_remove = 21 [json_name = "matchmakerRemove"]; + */ + com.heroiclabs.nakama.rtapi.MatchmakerRemoveOrBuilder getMatchmakerRemoveOrBuilder(); + + /** + *
+   * A response from starting a new matchmaking process.
+   * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + * @return Whether the matchmakerTicket field is set. + */ + boolean hasMatchmakerTicket(); + /** + *
+   * A response from starting a new matchmaking process.
+   * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + * @return The matchmakerTicket. + */ + com.heroiclabs.nakama.rtapi.MatchmakerTicket getMatchmakerTicket(); + /** + *
+   * A response from starting a new matchmaking process.
+   * 
+ * + * .nakama.realtime.MatchmakerTicket matchmaker_ticket = 22 [json_name = "matchmakerTicket"]; + */ + com.heroiclabs.nakama.rtapi.MatchmakerTicketOrBuilder getMatchmakerTicketOrBuilder(); + + /** + *
+   * Notifications send by the server.
+   * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + * @return Whether the notifications field is set. + */ + boolean hasNotifications(); + /** + *
+   * Notifications send by the server.
+   * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + * @return The notifications. + */ + com.heroiclabs.nakama.rtapi.Notifications getNotifications(); + /** + *
+   * Notifications send by the server.
+   * 
+ * + * .nakama.realtime.Notifications notifications = 23 [json_name = "notifications"]; + */ + com.heroiclabs.nakama.rtapi.NotificationsOrBuilder getNotificationsOrBuilder(); + + /** + *
+   * RPC call or response.
+   * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + * @return Whether the rpc field is set. + */ + boolean hasRpc(); + /** + *
+   * RPC call or response.
+   * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + * @return The rpc. + */ + com.heroiclabs.nakama.api.Rpc getRpc(); + /** + *
+   * RPC call or response.
+   * 
+ * + * .nakama.api.Rpc rpc = 24 [json_name = "rpc"]; + */ + com.heroiclabs.nakama.api.RpcOrBuilder getRpcOrBuilder(); + + /** + *
+   * An incoming status snapshot for some set of users.
+   * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + *
+   * An incoming status snapshot for some set of users.
+   * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + * @return The status. + */ + com.heroiclabs.nakama.rtapi.Status getStatus(); + /** + *
+   * An incoming status snapshot for some set of users.
+   * 
+ * + * .nakama.realtime.Status status = 25 [json_name = "status"]; + */ + com.heroiclabs.nakama.rtapi.StatusOrBuilder getStatusOrBuilder(); + + /** + *
+   * Start following some set of users to receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + * @return Whether the statusFollow field is set. + */ + boolean hasStatusFollow(); + /** + *
+   * Start following some set of users to receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + * @return The statusFollow. + */ + com.heroiclabs.nakama.rtapi.StatusFollow getStatusFollow(); + /** + *
+   * Start following some set of users to receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusFollow status_follow = 26 [json_name = "statusFollow"]; + */ + com.heroiclabs.nakama.rtapi.StatusFollowOrBuilder getStatusFollowOrBuilder(); + + /** + *
+   * An incoming status update.
+   * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + * @return Whether the statusPresenceEvent field is set. + */ + boolean hasStatusPresenceEvent(); + /** + *
+   * An incoming status update.
+   * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + * @return The statusPresenceEvent. + */ + com.heroiclabs.nakama.rtapi.StatusPresenceEvent getStatusPresenceEvent(); + /** + *
+   * An incoming status update.
+   * 
+ * + * .nakama.realtime.StatusPresenceEvent status_presence_event = 27 [json_name = "statusPresenceEvent"]; + */ + com.heroiclabs.nakama.rtapi.StatusPresenceEventOrBuilder getStatusPresenceEventOrBuilder(); + + /** + *
+   * Stop following some set of users to no longer receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + * @return Whether the statusUnfollow field is set. + */ + boolean hasStatusUnfollow(); + /** + *
+   * Stop following some set of users to no longer receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + * @return The statusUnfollow. + */ + com.heroiclabs.nakama.rtapi.StatusUnfollow getStatusUnfollow(); + /** + *
+   * Stop following some set of users to no longer receive their status updates.
+   * 
+ * + * .nakama.realtime.StatusUnfollow status_unfollow = 28 [json_name = "statusUnfollow"]; + */ + com.heroiclabs.nakama.rtapi.StatusUnfollowOrBuilder getStatusUnfollowOrBuilder(); + + /** + *
+   * Set the user's own status.
+   * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + * @return Whether the statusUpdate field is set. + */ + boolean hasStatusUpdate(); + /** + *
+   * Set the user's own status.
+   * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + * @return The statusUpdate. + */ + com.heroiclabs.nakama.rtapi.StatusUpdate getStatusUpdate(); + /** + *
+   * Set the user's own status.
+   * 
+ * + * .nakama.realtime.StatusUpdate status_update = 29 [json_name = "statusUpdate"]; + */ + com.heroiclabs.nakama.rtapi.StatusUpdateOrBuilder getStatusUpdateOrBuilder(); + + /** + *
+   * A data message delivered over a stream.
+   * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + * @return Whether the streamData field is set. + */ + boolean hasStreamData(); + /** + *
+   * A data message delivered over a stream.
+   * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + * @return The streamData. + */ + com.heroiclabs.nakama.rtapi.StreamData getStreamData(); + /** + *
+   * A data message delivered over a stream.
+   * 
+ * + * .nakama.realtime.StreamData stream_data = 30 [json_name = "streamData"]; + */ + com.heroiclabs.nakama.rtapi.StreamDataOrBuilder getStreamDataOrBuilder(); + + /** + *
+   * Presence update for a particular stream.
+   * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + * @return Whether the streamPresenceEvent field is set. + */ + boolean hasStreamPresenceEvent(); + /** + *
+   * Presence update for a particular stream.
+   * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + * @return The streamPresenceEvent. + */ + com.heroiclabs.nakama.rtapi.StreamPresenceEvent getStreamPresenceEvent(); + /** + *
+   * Presence update for a particular stream.
+   * 
+ * + * .nakama.realtime.StreamPresenceEvent stream_presence_event = 31 [json_name = "streamPresenceEvent"]; + */ + com.heroiclabs.nakama.rtapi.StreamPresenceEventOrBuilder getStreamPresenceEventOrBuilder(); + + /** + *
+   * Application-level heartbeat and connection check.
+   * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + * @return Whether the ping field is set. + */ + boolean hasPing(); + /** + *
+   * Application-level heartbeat and connection check.
+   * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + * @return The ping. + */ + com.heroiclabs.nakama.rtapi.Ping getPing(); + /** + *
+   * Application-level heartbeat and connection check.
+   * 
+ * + * .nakama.realtime.Ping ping = 32 [json_name = "ping"]; + */ + com.heroiclabs.nakama.rtapi.PingOrBuilder getPingOrBuilder(); + + /** + *
+   * Application-level heartbeat and connection check response.
+   * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + * @return Whether the pong field is set. + */ + boolean hasPong(); + /** + *
+   * Application-level heartbeat and connection check response.
+   * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + * @return The pong. + */ + com.heroiclabs.nakama.rtapi.Pong getPong(); + /** + *
+   * Application-level heartbeat and connection check response.
+   * 
+ * + * .nakama.realtime.Pong pong = 33 [json_name = "pong"]; + */ + com.heroiclabs.nakama.rtapi.PongOrBuilder getPongOrBuilder(); + + /** + *
+   * Incoming information about a party.
+   * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + * @return Whether the party field is set. + */ + boolean hasParty(); + /** + *
+   * Incoming information about a party.
+   * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + * @return The party. + */ + com.heroiclabs.nakama.rtapi.Party getParty(); + /** + *
+   * Incoming information about a party.
+   * 
+ * + * .nakama.realtime.Party party = 34 [json_name = "party"]; + */ + com.heroiclabs.nakama.rtapi.PartyOrBuilder getPartyOrBuilder(); + + /** + *
+   * Create a party.
+   * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + * @return Whether the partyCreate field is set. + */ + boolean hasPartyCreate(); + /** + *
+   * Create a party.
+   * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + * @return The partyCreate. + */ + com.heroiclabs.nakama.rtapi.PartyCreate getPartyCreate(); + /** + *
+   * Create a party.
+   * 
+ * + * .nakama.realtime.PartyCreate party_create = 35 [json_name = "partyCreate"]; + */ + com.heroiclabs.nakama.rtapi.PartyCreateOrBuilder getPartyCreateOrBuilder(); + + /** + *
+   * Join a party, or request to join if the party is not open.
+   * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + * @return Whether the partyJoin field is set. + */ + boolean hasPartyJoin(); + /** + *
+   * Join a party, or request to join if the party is not open.
+   * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + * @return The partyJoin. + */ + com.heroiclabs.nakama.rtapi.PartyJoin getPartyJoin(); + /** + *
+   * Join a party, or request to join if the party is not open.
+   * 
+ * + * .nakama.realtime.PartyJoin party_join = 36 [json_name = "partyJoin"]; + */ + com.heroiclabs.nakama.rtapi.PartyJoinOrBuilder getPartyJoinOrBuilder(); + + /** + *
+   * Leave a party.
+   * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + * @return Whether the partyLeave field is set. + */ + boolean hasPartyLeave(); + /** + *
+   * Leave a party.
+   * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + * @return The partyLeave. + */ + com.heroiclabs.nakama.rtapi.PartyLeave getPartyLeave(); + /** + *
+   * Leave a party.
+   * 
+ * + * .nakama.realtime.PartyLeave party_leave = 37 [json_name = "partyLeave"]; + */ + com.heroiclabs.nakama.rtapi.PartyLeaveOrBuilder getPartyLeaveOrBuilder(); + + /** + *
+   * Promote a new party leader.
+   * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + * @return Whether the partyPromote field is set. + */ + boolean hasPartyPromote(); + /** + *
+   * Promote a new party leader.
+   * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + * @return The partyPromote. + */ + com.heroiclabs.nakama.rtapi.PartyPromote getPartyPromote(); + /** + *
+   * Promote a new party leader.
+   * 
+ * + * .nakama.realtime.PartyPromote party_promote = 38 [json_name = "partyPromote"]; + */ + com.heroiclabs.nakama.rtapi.PartyPromoteOrBuilder getPartyPromoteOrBuilder(); + + /** + *
+   * Announcement of a new party leader.
+   * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + * @return Whether the partyLeader field is set. + */ + boolean hasPartyLeader(); + /** + *
+   * Announcement of a new party leader.
+   * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + * @return The partyLeader. + */ + com.heroiclabs.nakama.rtapi.PartyLeader getPartyLeader(); + /** + *
+   * Announcement of a new party leader.
+   * 
+ * + * .nakama.realtime.PartyLeader party_leader = 39 [json_name = "partyLeader"]; + */ + com.heroiclabs.nakama.rtapi.PartyLeaderOrBuilder getPartyLeaderOrBuilder(); + + /** + *
+   * Accept a request to join.
+   * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + * @return Whether the partyAccept field is set. + */ + boolean hasPartyAccept(); + /** + *
+   * Accept a request to join.
+   * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + * @return The partyAccept. + */ + com.heroiclabs.nakama.rtapi.PartyAccept getPartyAccept(); + /** + *
+   * Accept a request to join.
+   * 
+ * + * .nakama.realtime.PartyAccept party_accept = 40 [json_name = "partyAccept"]; + */ + com.heroiclabs.nakama.rtapi.PartyAcceptOrBuilder getPartyAcceptOrBuilder(); + + /** + *
+   * Kick a party member, or decline a request to join.
+   * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + * @return Whether the partyRemove field is set. + */ + boolean hasPartyRemove(); + /** + *
+   * Kick a party member, or decline a request to join.
+   * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + * @return The partyRemove. + */ + com.heroiclabs.nakama.rtapi.PartyRemove getPartyRemove(); + /** + *
+   * Kick a party member, or decline a request to join.
+   * 
+ * + * .nakama.realtime.PartyRemove party_remove = 41 [json_name = "partyRemove"]; + */ + com.heroiclabs.nakama.rtapi.PartyRemoveOrBuilder getPartyRemoveOrBuilder(); + + /** + *
+   * End a party, kicking all party members and closing it.
+   * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + * @return Whether the partyClose field is set. + */ + boolean hasPartyClose(); + /** + *
+   * End a party, kicking all party members and closing it.
+   * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + * @return The partyClose. + */ + com.heroiclabs.nakama.rtapi.PartyClose getPartyClose(); + /** + *
+   * End a party, kicking all party members and closing it.
+   * 
+ * + * .nakama.realtime.PartyClose party_close = 42 [json_name = "partyClose"]; + */ + com.heroiclabs.nakama.rtapi.PartyCloseOrBuilder getPartyCloseOrBuilder(); + + /** + *
+   * Request a list of pending join requests for a party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + * @return Whether the partyJoinRequestList field is set. + */ + boolean hasPartyJoinRequestList(); + /** + *
+   * Request a list of pending join requests for a party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + * @return The partyJoinRequestList. + */ + com.heroiclabs.nakama.rtapi.PartyJoinRequestList getPartyJoinRequestList(); + /** + *
+   * Request a list of pending join requests for a party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequestList party_join_request_list = 43 [json_name = "partyJoinRequestList"]; + */ + com.heroiclabs.nakama.rtapi.PartyJoinRequestListOrBuilder getPartyJoinRequestListOrBuilder(); + + /** + *
+   * Incoming notification for one or more new presences attempting to join the party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + * @return Whether the partyJoinRequest field is set. + */ + boolean hasPartyJoinRequest(); + /** + *
+   * Incoming notification for one or more new presences attempting to join the party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + * @return The partyJoinRequest. + */ + com.heroiclabs.nakama.rtapi.PartyJoinRequest getPartyJoinRequest(); + /** + *
+   * Incoming notification for one or more new presences attempting to join the party.
+   * 
+ * + * .nakama.realtime.PartyJoinRequest party_join_request = 44 [json_name = "partyJoinRequest"]; + */ + com.heroiclabs.nakama.rtapi.PartyJoinRequestOrBuilder getPartyJoinRequestOrBuilder(); + + /** + *
+   * Begin matchmaking as a party.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + * @return Whether the partyMatchmakerAdd field is set. + */ + boolean hasPartyMatchmakerAdd(); + /** + *
+   * Begin matchmaking as a party.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + * @return The partyMatchmakerAdd. + */ + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd getPartyMatchmakerAdd(); + /** + *
+   * Begin matchmaking as a party.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerAdd party_matchmaker_add = 45 [json_name = "partyMatchmakerAdd"]; + */ + com.heroiclabs.nakama.rtapi.PartyMatchmakerAddOrBuilder getPartyMatchmakerAddOrBuilder(); + + /** + *
+   * Cancel a party matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + * @return Whether the partyMatchmakerRemove field is set. + */ + boolean hasPartyMatchmakerRemove(); + /** + *
+   * Cancel a party matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + * @return The partyMatchmakerRemove. + */ + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove getPartyMatchmakerRemove(); + /** + *
+   * Cancel a party matchmaking process using a ticket.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerRemove party_matchmaker_remove = 46 [json_name = "partyMatchmakerRemove"]; + */ + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemoveOrBuilder getPartyMatchmakerRemoveOrBuilder(); + + /** + *
+   * A response from starting a new party matchmaking process.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + * @return Whether the partyMatchmakerTicket field is set. + */ + boolean hasPartyMatchmakerTicket(); + /** + *
+   * A response from starting a new party matchmaking process.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + * @return The partyMatchmakerTicket. + */ + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket getPartyMatchmakerTicket(); + /** + *
+   * A response from starting a new party matchmaking process.
+   * 
+ * + * .nakama.realtime.PartyMatchmakerTicket party_matchmaker_ticket = 47 [json_name = "partyMatchmakerTicket"]; + */ + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicketOrBuilder getPartyMatchmakerTicketOrBuilder(); + + /** + *
+   * Incoming party data delivered from the server.
+   * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + * @return Whether the partyData field is set. + */ + boolean hasPartyData(); + /** + *
+   * Incoming party data delivered from the server.
+   * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + * @return The partyData. + */ + com.heroiclabs.nakama.rtapi.PartyData getPartyData(); + /** + *
+   * Incoming party data delivered from the server.
+   * 
+ * + * .nakama.realtime.PartyData party_data = 48 [json_name = "partyData"]; + */ + com.heroiclabs.nakama.rtapi.PartyDataOrBuilder getPartyDataOrBuilder(); + + /** + *
+   * A client to server request to send data to a party.
+   * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + * @return Whether the partyDataSend field is set. + */ + boolean hasPartyDataSend(); + /** + *
+   * A client to server request to send data to a party.
+   * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + * @return The partyDataSend. + */ + com.heroiclabs.nakama.rtapi.PartyDataSend getPartyDataSend(); + /** + *
+   * A client to server request to send data to a party.
+   * 
+ * + * .nakama.realtime.PartyDataSend party_data_send = 49 [json_name = "partyDataSend"]; + */ + com.heroiclabs.nakama.rtapi.PartyDataSendOrBuilder getPartyDataSendOrBuilder(); + + /** + *
+   * Presence update for a particular party.
+   * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + * @return Whether the partyPresenceEvent field is set. + */ + boolean hasPartyPresenceEvent(); + /** + *
+   * Presence update for a particular party.
+   * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + * @return The partyPresenceEvent. + */ + com.heroiclabs.nakama.rtapi.PartyPresenceEvent getPartyPresenceEvent(); + /** + *
+   * Presence update for a particular party.
+   * 
+ * + * .nakama.realtime.PartyPresenceEvent party_presence_event = 50 [json_name = "partyPresenceEvent"]; + */ + com.heroiclabs.nakama.rtapi.PartyPresenceEventOrBuilder getPartyPresenceEventOrBuilder(); + + com.heroiclabs.nakama.rtapi.Envelope.MessageCase getMessageCase(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Error.java b/src/main/java/com/heroiclabs/nakama/rtapi/Error.java new file mode 100644 index 00000000..6cec6a15 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Error.java @@ -0,0 +1,1181 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A logical error which may occur on the server.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Error} + */ +public final class Error extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Error) + ErrorOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Error.class.getName()); + } + // Use Error.newBuilder() to construct. + private Error(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Error() { + message_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Error_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetContext(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Error.class, com.heroiclabs.nakama.rtapi.Error.Builder.class); + } + + /** + *
+   * The selection of possible error codes.
+   * 
+ * + * Protobuf enum {@code nakama.realtime.Error.Code} + */ + public enum Code + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * An unexpected result from the server.
+     * 
+ * + * RUNTIME_EXCEPTION = 0; + */ + RUNTIME_EXCEPTION(0), + /** + *
+     * The server received a message which is not recognised.
+     * 
+ * + * UNRECOGNIZED_PAYLOAD = 1; + */ + UNRECOGNIZED_PAYLOAD(1), + /** + *
+     * A message was expected but contains no content.
+     * 
+ * + * MISSING_PAYLOAD = 2; + */ + MISSING_PAYLOAD(2), + /** + *
+     * Fields in the message have an invalid format.
+     * 
+ * + * BAD_INPUT = 3; + */ + BAD_INPUT(3), + /** + *
+     * The match id was not found.
+     * 
+ * + * MATCH_NOT_FOUND = 4; + */ + MATCH_NOT_FOUND(4), + /** + *
+     * The match join was rejected.
+     * 
+ * + * MATCH_JOIN_REJECTED = 5; + */ + MATCH_JOIN_REJECTED(5), + /** + *
+     * The runtime function does not exist on the server.
+     * 
+ * + * RUNTIME_FUNCTION_NOT_FOUND = 6; + */ + RUNTIME_FUNCTION_NOT_FOUND(6), + /** + *
+     * The runtime function executed with an error.
+     * 
+ * + * RUNTIME_FUNCTION_EXCEPTION = 7; + */ + RUNTIME_FUNCTION_EXCEPTION(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Code.class.getName()); + } + /** + *
+     * An unexpected result from the server.
+     * 
+ * + * RUNTIME_EXCEPTION = 0; + */ + public static final int RUNTIME_EXCEPTION_VALUE = 0; + /** + *
+     * The server received a message which is not recognised.
+     * 
+ * + * UNRECOGNIZED_PAYLOAD = 1; + */ + public static final int UNRECOGNIZED_PAYLOAD_VALUE = 1; + /** + *
+     * A message was expected but contains no content.
+     * 
+ * + * MISSING_PAYLOAD = 2; + */ + public static final int MISSING_PAYLOAD_VALUE = 2; + /** + *
+     * Fields in the message have an invalid format.
+     * 
+ * + * BAD_INPUT = 3; + */ + public static final int BAD_INPUT_VALUE = 3; + /** + *
+     * The match id was not found.
+     * 
+ * + * MATCH_NOT_FOUND = 4; + */ + public static final int MATCH_NOT_FOUND_VALUE = 4; + /** + *
+     * The match join was rejected.
+     * 
+ * + * MATCH_JOIN_REJECTED = 5; + */ + public static final int MATCH_JOIN_REJECTED_VALUE = 5; + /** + *
+     * The runtime function does not exist on the server.
+     * 
+ * + * RUNTIME_FUNCTION_NOT_FOUND = 6; + */ + public static final int RUNTIME_FUNCTION_NOT_FOUND_VALUE = 6; + /** + *
+     * The runtime function executed with an error.
+     * 
+ * + * RUNTIME_FUNCTION_EXCEPTION = 7; + */ + public static final int RUNTIME_FUNCTION_EXCEPTION_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Code valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Code forNumber(int value) { + switch (value) { + case 0: return RUNTIME_EXCEPTION; + case 1: return UNRECOGNIZED_PAYLOAD; + case 2: return MISSING_PAYLOAD; + case 3: return BAD_INPUT; + case 4: return MATCH_NOT_FOUND; + case 5: return MATCH_JOIN_REJECTED; + case 6: return RUNTIME_FUNCTION_NOT_FOUND; + case 7: return RUNTIME_FUNCTION_EXCEPTION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Code> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Code findValueByNumber(int number) { + return Code.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.Error.getDescriptor().getEnumTypes().get(0); + } + + private static final Code[] VALUES = values(); + + public static Code valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Code(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:nakama.realtime.Error.Code) + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + *
+   * The error code which should be one of "Error.Code" enums.
+   * 
+ * + * int32 code = 1 [json_name = "code"]; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + *
+   * A message in English to help developers debug the response.
+   * 
+ * + * string message = 2 [json_name = "message"]; + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + *
+   * A message in English to help developers debug the response.
+   * 
+ * + * string message = 2 [json_name = "message"]; + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTEXT_FIELD_NUMBER = 3; + private static final class ContextDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Error_ContextEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> context_; + private com.google.protobuf.MapField + internalGetContext() { + if (context_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ContextDefaultEntryHolder.defaultEntry); + } + return context_; + } + public int getContextCount() { + return internalGetContext().getMap().size(); + } + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public boolean containsContext( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetContext().getMap().containsKey(key); + } + /** + * Use {@link #getContextMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getContext() { + return getContextMap(); + } + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public java.util.Map getContextMap() { + return internalGetContext().getMap(); + } + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getContextOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetContext().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public java.lang.String getContextOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetContext().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetContext(), + ContextDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); + } + for (java.util.Map.Entry entry + : internalGetContext().getMap().entrySet()) { + com.google.protobuf.MapEntry + context__ = ContextDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, context__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Error)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Error other = (com.heroiclabs.nakama.rtapi.Error) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMessage() + .equals(other.getMessage())) return false; + if (!internalGetContext().equals( + other.internalGetContext())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + if (!internalGetContext().getMap().isEmpty()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + internalGetContext().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Error parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Error parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Error parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Error prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A logical error which may occur on the server.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Error} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Error) + com.heroiclabs.nakama.rtapi.ErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Error_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetContext(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableContext(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Error.class, com.heroiclabs.nakama.rtapi.Error.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Error.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + message_ = ""; + internalGetMutableContext().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Error_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Error getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Error.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Error build() { + com.heroiclabs.nakama.rtapi.Error result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Error buildPartial() { + com.heroiclabs.nakama.rtapi.Error result = new com.heroiclabs.nakama.rtapi.Error(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Error result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.context_ = internalGetContext(); + result.context_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Error) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Error)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Error other) { + if (other == com.heroiclabs.nakama.rtapi.Error.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableContext().mergeFrom( + other.internalGetContext()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + context__ = input.readMessage( + ContextDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableContext().getMutableMap().put( + context__.getKey(), context__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + *
+     * The error code which should be one of "Error.Code" enums.
+     * 
+ * + * int32 code = 1 [json_name = "code"]; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + *
+     * The error code which should be one of "Error.Code" enums.
+     * 
+ * + * int32 code = 1 [json_name = "code"]; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The error code which should be one of "Error.Code" enums.
+     * 
+ * + * int32 code = 1 [json_name = "code"]; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + *
+     * A message in English to help developers debug the response.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A message in English to help developers debug the response.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A message in English to help developers debug the response.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A message in English to help developers debug the response.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A message in English to help developers debug the response.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> context_; + private com.google.protobuf.MapField + internalGetContext() { + if (context_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ContextDefaultEntryHolder.defaultEntry); + } + return context_; + } + private com.google.protobuf.MapField + internalGetMutableContext() { + if (context_ == null) { + context_ = com.google.protobuf.MapField.newMapField( + ContextDefaultEntryHolder.defaultEntry); + } + if (!context_.isMutable()) { + context_ = context_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return context_; + } + public int getContextCount() { + return internalGetContext().getMap().size(); + } + /** + *
+     * Additional error details which may be different for each response.
+     * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public boolean containsContext( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetContext().getMap().containsKey(key); + } + /** + * Use {@link #getContextMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getContext() { + return getContextMap(); + } + /** + *
+     * Additional error details which may be different for each response.
+     * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public java.util.Map getContextMap() { + return internalGetContext().getMap(); + } + /** + *
+     * Additional error details which may be different for each response.
+     * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getContextOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetContext().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Additional error details which may be different for each response.
+     * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + @java.lang.Override + public java.lang.String getContextOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetContext().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableContext().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Additional error details which may be different for each response.
+     * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + public Builder removeContext( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableContext().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableContext() { + bitField0_ |= 0x00000004; + return internalGetMutableContext().getMutableMap(); + } + /** + *
+     * Additional error details which may be different for each response.
+     * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + public Builder putContext( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableContext().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * Additional error details which may be different for each response.
+     * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + public Builder putAllContext( + java.util.Map values) { + internalGetMutableContext().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Error) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Error) + private static final com.heroiclabs.nakama.rtapi.Error DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Error(); + } + + public static com.heroiclabs.nakama.rtapi.Error getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Error parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Error getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/ErrorOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/ErrorOrBuilder.java new file mode 100644 index 00000000..ec3b57b9 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/ErrorOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface ErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Error) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The error code which should be one of "Error.Code" enums.
+   * 
+ * + * int32 code = 1 [json_name = "code"]; + * @return The code. + */ + int getCode(); + + /** + *
+   * A message in English to help developers debug the response.
+   * 
+ * + * string message = 2 [json_name = "message"]; + * @return The message. + */ + java.lang.String getMessage(); + /** + *
+   * A message in English to help developers debug the response.
+   * 
+ * + * string message = 2 [json_name = "message"]; + * @return The bytes for message. + */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + int getContextCount(); + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + boolean containsContext( + java.lang.String key); + /** + * Use {@link #getContextMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getContext(); + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + java.util.Map + getContextMap(); + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + /* nullable */ +java.lang.String getContextOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Additional error details which may be different for each response.
+   * 
+ * + * map<string, string> context = 3 [json_name = "context"]; + */ + java.lang.String getContextOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Match.java b/src/main/java/com/heroiclabs/nakama/rtapi/Match.java new file mode 100644 index 00000000..b26298e6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Match.java @@ -0,0 +1,1623 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A realtime match.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Match} + */ +public final class Match extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Match) + MatchOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Match.class.getName()); + } + // Use Match.newBuilder() to construct. + private Match(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Match() { + matchId_ = ""; + presences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Match_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Match_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Match.class, com.heroiclabs.nakama.rtapi.Match.Builder.class); + } + + private int bitField0_; + public static final int MATCH_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object matchId_ = ""; + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } + } + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHORITATIVE_FIELD_NUMBER = 2; + private boolean authoritative_ = false; + /** + *
+   * True if it's an server-managed authoritative match, false otherwise.
+   * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + + public static final int LABEL_FIELD_NUMBER = 3; + private com.google.protobuf.StringValue label_; + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + @java.lang.Override + public boolean hasLabel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + @java.lang.Override + public com.google.protobuf.StringValue getLabel() { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getLabelOrBuilder() { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + + public static final int SIZE_FIELD_NUMBER = 4; + private int size_ = 0; + /** + *
+   * The number of users currently in the match.
+   * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + + public static final int PRESENCES_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List presences_; + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List getPresencesList() { + return presences_; + } + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List + getPresencesOrBuilderList() { + return presences_; + } + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + @java.lang.Override + public int getPresencesCount() { + return presences_.size(); + } + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + return presences_.get(index); + } + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + return presences_.get(index); + } + + public static final int SELF_FIELD_NUMBER = 6; + private com.heroiclabs.nakama.rtapi.UserPresence self_; + /** + *
+   * A reference to the current user's presence in the match.
+   * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + * @return Whether the self field is set. + */ + @java.lang.Override + public boolean hasSelf() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * A reference to the current user's presence in the match.
+   * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + * @return The self. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getSelf() { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + /** + *
+   * A reference to the current user's presence in the match.
+   * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder() { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, matchId_); + } + if (authoritative_ != false) { + output.writeBool(2, authoritative_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLabel()); + } + if (size_ != 0) { + output.writeInt32(4, size_); + } + for (int i = 0; i < presences_.size(); i++) { + output.writeMessage(5, presences_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getSelf()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, matchId_); + } + if (authoritative_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, authoritative_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLabel()); + } + if (size_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, size_); + } + for (int i = 0; i < presences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, presences_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSelf()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Match)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Match other = (com.heroiclabs.nakama.rtapi.Match) obj; + + if (!getMatchId() + .equals(other.getMatchId())) return false; + if (getAuthoritative() + != other.getAuthoritative()) return false; + if (hasLabel() != other.hasLabel()) return false; + if (hasLabel()) { + if (!getLabel() + .equals(other.getLabel())) return false; + } + if (getSize() + != other.getSize()) return false; + if (!getPresencesList() + .equals(other.getPresencesList())) return false; + if (hasSelf() != other.hasSelf()) return false; + if (hasSelf()) { + if (!getSelf() + .equals(other.getSelf())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + hash = (37 * hash) + AUTHORITATIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAuthoritative()); + if (hasLabel()) { + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + } + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + getSize(); + if (getPresencesCount() > 0) { + hash = (37 * hash) + PRESENCES_FIELD_NUMBER; + hash = (53 * hash) + getPresencesList().hashCode(); + } + if (hasSelf()) { + hash = (37 * hash) + SELF_FIELD_NUMBER; + hash = (53 * hash) + getSelf().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Match parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Match parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Match parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Match prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A realtime match.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Match} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Match) + com.heroiclabs.nakama.rtapi.MatchOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Match_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Match_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Match.class, com.heroiclabs.nakama.rtapi.Match.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Match.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getLabelFieldBuilder(); + getPresencesFieldBuilder(); + getSelfFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchId_ = ""; + authoritative_ = false; + label_ = null; + if (labelBuilder_ != null) { + labelBuilder_.dispose(); + labelBuilder_ = null; + } + size_ = 0; + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + } else { + presences_ = null; + presencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Match_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Match getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Match.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Match build() { + com.heroiclabs.nakama.rtapi.Match result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Match buildPartial() { + com.heroiclabs.nakama.rtapi.Match result = new com.heroiclabs.nakama.rtapi.Match(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.Match result) { + if (presencesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + presences_ = java.util.Collections.unmodifiableList(presences_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.presences_ = presences_; + } else { + result.presences_ = presencesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Match result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchId_ = matchId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authoritative_ = authoritative_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.label_ = labelBuilder_ == null + ? label_ + : labelBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.size_ = size_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.self_ = selfBuilder_ == null + ? self_ + : selfBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Match) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Match)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Match other) { + if (other == com.heroiclabs.nakama.rtapi.Match.getDefaultInstance()) return this; + if (!other.getMatchId().isEmpty()) { + matchId_ = other.matchId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAuthoritative() != false) { + setAuthoritative(other.getAuthoritative()); + } + if (other.hasLabel()) { + mergeLabel(other.getLabel()); + } + if (other.getSize() != 0) { + setSize(other.getSize()); + } + if (presencesBuilder_ == null) { + if (!other.presences_.isEmpty()) { + if (presences_.isEmpty()) { + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePresencesIsMutable(); + presences_.addAll(other.presences_); + } + onChanged(); + } + } else { + if (!other.presences_.isEmpty()) { + if (presencesBuilder_.isEmpty()) { + presencesBuilder_.dispose(); + presencesBuilder_ = null; + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000010); + presencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPresencesFieldBuilder() : null; + } else { + presencesBuilder_.addAllMessages(other.presences_); + } + } + } + if (other.hasSelf()) { + mergeSelf(other.getSelf()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + matchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + authoritative_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getLabelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + size_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(m); + } else { + presencesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + input.readMessage( + getSelfFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object matchId_ = ""; + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + matchId_ = getDefaultInstance().getMatchId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean authoritative_ ; + /** + *
+     * True if it's an server-managed authoritative match, false otherwise.
+     * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + @java.lang.Override + public boolean getAuthoritative() { + return authoritative_; + } + /** + *
+     * True if it's an server-managed authoritative match, false otherwise.
+     * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @param value The authoritative to set. + * @return This builder for chaining. + */ + public Builder setAuthoritative(boolean value) { + + authoritative_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * True if it's an server-managed authoritative match, false otherwise.
+     * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return This builder for chaining. + */ + public Builder clearAuthoritative() { + bitField0_ = (bitField0_ & ~0x00000002); + authoritative_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.StringValue label_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> labelBuilder_; + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + public boolean hasLabel() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + public com.google.protobuf.StringValue getLabel() { + if (labelBuilder_ == null) { + return label_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : label_; + } else { + return labelBuilder_.getMessage(); + } + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder setLabel(com.google.protobuf.StringValue value) { + if (labelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + label_ = value; + } else { + labelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder setLabel( + com.google.protobuf.StringValue.Builder builderForValue) { + if (labelBuilder_ == null) { + label_ = builderForValue.build(); + } else { + labelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder mergeLabel(com.google.protobuf.StringValue value) { + if (labelBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + label_ != null && + label_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getLabelBuilder().mergeFrom(value); + } else { + label_ = value; + } + } else { + labelBuilder_.mergeFrom(value); + } + if (label_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public Builder clearLabel() { + bitField0_ = (bitField0_ & ~0x00000004); + label_ = null; + if (labelBuilder_ != null) { + labelBuilder_.dispose(); + labelBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public com.google.protobuf.StringValue.Builder getLabelBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLabelFieldBuilder().getBuilder(); + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + public com.google.protobuf.StringValueOrBuilder getLabelOrBuilder() { + if (labelBuilder_ != null) { + return labelBuilder_.getMessageOrBuilder(); + } else { + return label_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : label_; + } + } + /** + *
+     * Match label, if any.
+     * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getLabelFieldBuilder() { + if (labelBuilder_ == null) { + labelBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getLabel(), + getParentForChildren(), + isClean()); + label_ = null; + } + return labelBuilder_; + } + + private int size_ ; + /** + *
+     * The number of users currently in the match.
+     * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return The size. + */ + @java.lang.Override + public int getSize() { + return size_; + } + /** + *
+     * The number of users currently in the match.
+     * 
+ * + * int32 size = 4 [json_name = "size"]; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(int value) { + + size_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The number of users currently in the match.
+     * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return This builder for chaining. + */ + public Builder clearSize() { + bitField0_ = (bitField0_ & ~0x00000008); + size_ = 0; + onChanged(); + return this; + } + + private java.util.List presences_ = + java.util.Collections.emptyList(); + private void ensurePresencesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + presences_ = new java.util.ArrayList(presences_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presencesBuilder_; + + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public java.util.List getPresencesList() { + if (presencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(presences_); + } else { + return presencesBuilder_.getMessageList(); + } + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public int getPresencesCount() { + if (presencesBuilder_ == null) { + return presences_.size(); + } else { + return presencesBuilder_.getCount(); + } + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); + } else { + return presencesBuilder_.getMessage(index); + } + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.set(index, value); + onChanged(); + } else { + presencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.set(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder addPresences(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(value); + onChanged(); + } else { + presencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(index, value); + onChanged(); + } else { + presencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder addPresences( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder addAllPresences( + java.lang.Iterable values) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, presences_); + onChanged(); + } else { + presencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder clearPresences() { + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + presencesBuilder_.clear(); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public Builder removePresences(int index) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.remove(index); + onChanged(); + } else { + presencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresencesBuilder( + int index) { + return getPresencesFieldBuilder().getBuilder(index); + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); } else { + return presencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public java.util.List + getPresencesOrBuilderList() { + if (presencesBuilder_ != null) { + return presencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(presences_); + } + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder() { + return getPresencesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder( + int index) { + return getPresencesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * The users currently in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + public java.util.List + getPresencesBuilderList() { + return getPresencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresencesFieldBuilder() { + if (presencesBuilder_ == null) { + presencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + presences_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + presences_ = null; + } + return presencesBuilder_; + } + + private com.heroiclabs.nakama.rtapi.UserPresence self_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> selfBuilder_; + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + * @return Whether the self field is set. + */ + public boolean hasSelf() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + * @return The self. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getSelf() { + if (selfBuilder_ == null) { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } else { + return selfBuilder_.getMessage(); + } + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + public Builder setSelf(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (selfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + self_ = value; + } else { + selfBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + public Builder setSelf( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (selfBuilder_ == null) { + self_ = builderForValue.build(); + } else { + selfBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + public Builder mergeSelf(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (selfBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + self_ != null && + self_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getSelfBuilder().mergeFrom(value); + } else { + self_ = value; + } + } else { + selfBuilder_.mergeFrom(value); + } + if (self_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + public Builder clearSelf() { + bitField0_ = (bitField0_ & ~0x00000020); + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getSelfBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSelfFieldBuilder().getBuilder(); + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder() { + if (selfBuilder_ != null) { + return selfBuilder_.getMessageOrBuilder(); + } else { + return self_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + } + /** + *
+     * A reference to the current user's presence in the match.
+     * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getSelfFieldBuilder() { + if (selfBuilder_ == null) { + selfBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getSelf(), + getParentForChildren(), + isClean()); + self_ = null; + } + return selfBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Match) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Match) + private static final com.heroiclabs.nakama.rtapi.Match DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Match(); + } + + public static com.heroiclabs.nakama.rtapi.Match getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Match parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Match getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchCreate.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchCreate.java new file mode 100644 index 00000000..1a2b2e62 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchCreate.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Create a new realtime match.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchCreate} + */ +public final class MatchCreate extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchCreate) + MatchCreateOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchCreate.class.getName()); + } + // Use MatchCreate.newBuilder() to construct. + private MatchCreate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchCreate() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchCreate.class, com.heroiclabs.nakama.rtapi.MatchCreate.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Optional name to use when creating the match.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Optional name to use when creating the match.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchCreate)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchCreate other = (com.heroiclabs.nakama.rtapi.MatchCreate) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchCreate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchCreate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchCreate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchCreate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Create a new realtime match.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchCreate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchCreate) + com.heroiclabs.nakama.rtapi.MatchCreateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchCreate.class, com.heroiclabs.nakama.rtapi.MatchCreate.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchCreate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchCreate_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreate getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreate build() { + com.heroiclabs.nakama.rtapi.MatchCreate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreate buildPartial() { + com.heroiclabs.nakama.rtapi.MatchCreate result = new com.heroiclabs.nakama.rtapi.MatchCreate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchCreate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchCreate) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchCreate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchCreate other) { + if (other == com.heroiclabs.nakama.rtapi.MatchCreate.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Optional name to use when creating the match.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional name to use when creating the match.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional name to use when creating the match.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Optional name to use when creating the match.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Optional name to use when creating the match.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchCreate) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchCreate) + private static final com.heroiclabs.nakama.rtapi.MatchCreate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchCreate(); + } + + public static com.heroiclabs.nakama.rtapi.MatchCreate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchCreate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchCreate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchCreateOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchCreateOrBuilder.java new file mode 100644 index 00000000..b219355d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchCreateOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchCreateOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchCreate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Optional name to use when creating the match.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Optional name to use when creating the match.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchData.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchData.java new file mode 100644 index 00000000..b59c8e3f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchData.java @@ -0,0 +1,1027 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Realtime match data received from the server.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchData} + */ +public final class MatchData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchData) + MatchDataOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchData.class.getName()); + } + // Use MatchData.newBuilder() to construct. + private MatchData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchData() { + matchId_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchData.class, com.heroiclabs.nakama.rtapi.MatchData.Builder.class); + } + + private int bitField0_; + public static final int MATCH_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object matchId_ = ""; + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } + } + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCE_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + @java.lang.Override + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + + public static final int OP_CODE_FIELD_NUMBER = 3; + private long opCode_ = 0L; + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + + public static final int DATA_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int RELIABLE_FIELD_NUMBER = 5; + private boolean reliable_ = false; + /** + *
+   * True if this data was delivered reliably, false otherwise.
+   * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return The reliable. + */ + @java.lang.Override + public boolean getReliable() { + return reliable_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, matchId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPresence()); + } + if (opCode_ != 0L) { + output.writeInt64(3, opCode_); + } + if (!data_.isEmpty()) { + output.writeBytes(4, data_); + } + if (reliable_ != false) { + output.writeBool(5, reliable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, matchId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPresence()); + } + if (opCode_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, opCode_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, data_); + } + if (reliable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reliable_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchData)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchData other = (com.heroiclabs.nakama.rtapi.MatchData) obj; + + if (!getMatchId() + .equals(other.getMatchId())) return false; + if (hasPresence() != other.hasPresence()) return false; + if (hasPresence()) { + if (!getPresence() + .equals(other.getPresence())) return false; + } + if (getOpCode() + != other.getOpCode()) return false; + if (!getData() + .equals(other.getData())) return false; + if (getReliable() + != other.getReliable()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + if (hasPresence()) { + hash = (37 * hash) + PRESENCE_FIELD_NUMBER; + hash = (53 * hash) + getPresence().hashCode(); + } + hash = (37 * hash) + OP_CODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpCode()); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + RELIABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReliable()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Realtime match data received from the server.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchData) + com.heroiclabs.nakama.rtapi.MatchDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchData.class, com.heroiclabs.nakama.rtapi.MatchData.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresenceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchId_ = ""; + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + opCode_ = 0L; + data_ = com.google.protobuf.ByteString.EMPTY; + reliable_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchData_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchData getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchData build() { + com.heroiclabs.nakama.rtapi.MatchData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchData buildPartial() { + com.heroiclabs.nakama.rtapi.MatchData result = new com.heroiclabs.nakama.rtapi.MatchData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchId_ = matchId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.presence_ = presenceBuilder_ == null + ? presence_ + : presenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.opCode_ = opCode_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.data_ = data_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reliable_ = reliable_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchData) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchData other) { + if (other == com.heroiclabs.nakama.rtapi.MatchData.getDefaultInstance()) return this; + if (!other.getMatchId().isEmpty()) { + matchId_ = other.matchId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPresence()) { + mergePresence(other.getPresence()); + } + if (other.getOpCode() != 0L) { + setOpCode(other.getOpCode()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (other.getReliable() != false) { + setReliable(other.getReliable()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + matchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPresenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + opCode_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + data_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + reliable_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object matchId_ = ""; + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + matchId_ = getDefaultInstance().getMatchId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presenceBuilder_; + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + public boolean hasPresence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + if (presenceBuilder_ == null) { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } else { + return presenceBuilder_.getMessage(); + } + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + presence_ = value; + } else { + presenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presenceBuilder_ == null) { + presence_ = builderForValue.build(); + } else { + presenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder mergePresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + presence_ != null && + presence_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getPresenceBuilder().mergeFrom(value); + } else { + presence_ = value; + } + } else { + presenceBuilder_.mergeFrom(value); + } + if (presence_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder clearPresence() { + bitField0_ = (bitField0_ & ~0x00000002); + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPresenceFieldBuilder().getBuilder(); + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + if (presenceBuilder_ != null) { + return presenceBuilder_.getMessageOrBuilder(); + } else { + return presence_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresenceFieldBuilder() { + if (presenceBuilder_ == null) { + presenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getPresence(), + getParentForChildren(), + isClean()); + presence_ = null; + } + return presenceBuilder_; + } + + private long opCode_ ; + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @param value The opCode to set. + * @return This builder for chaining. + */ + public Builder setOpCode(long value) { + + opCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return This builder for chaining. + */ + public Builder clearOpCode() { + bitField0_ = (bitField0_ & ~0x00000004); + opCode_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + data_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000008); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private boolean reliable_ ; + /** + *
+     * True if this data was delivered reliably, false otherwise.
+     * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return The reliable. + */ + @java.lang.Override + public boolean getReliable() { + return reliable_; + } + /** + *
+     * True if this data was delivered reliably, false otherwise.
+     * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @param value The reliable to set. + * @return This builder for chaining. + */ + public Builder setReliable(boolean value) { + + reliable_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * True if this data was delivered reliably, false otherwise.
+     * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return This builder for chaining. + */ + public Builder clearReliable() { + bitField0_ = (bitField0_ & ~0x00000010); + reliable_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchData) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchData) + private static final com.heroiclabs.nakama.rtapi.MatchData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchData(); + } + + public static com.heroiclabs.nakama.rtapi.MatchData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataOrBuilder.java new file mode 100644 index 00000000..c59d2f54 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); + + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + boolean hasPresence(); + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresence(); + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder(); + + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return The opCode. + */ + long getOpCode(); + + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + *
+   * True if this data was delivered reliably, false otherwise.
+   * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return The reliable. + */ + boolean getReliable(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSend.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSend.java new file mode 100644 index 00000000..61abccef --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSend.java @@ -0,0 +1,1232 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Send realtime match data to the server.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchDataSend} + */ +public final class MatchDataSend extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchDataSend) + MatchDataSendOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchDataSend.class.getName()); + } + // Use MatchDataSend.newBuilder() to construct. + private MatchDataSend(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchDataSend() { + matchId_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + presences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchDataSend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchDataSend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchDataSend.class, com.heroiclabs.nakama.rtapi.MatchDataSend.Builder.class); + } + + public static final int MATCH_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object matchId_ = ""; + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } + } + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OP_CODE_FIELD_NUMBER = 2; + private long opCode_ = 0L; + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + + public static final int DATA_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int PRESENCES_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List presences_; + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List getPresencesList() { + return presences_; + } + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List + getPresencesOrBuilderList() { + return presences_; + } + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + @java.lang.Override + public int getPresencesCount() { + return presences_.size(); + } + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + return presences_.get(index); + } + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + return presences_.get(index); + } + + public static final int RELIABLE_FIELD_NUMBER = 5; + private boolean reliable_ = false; + /** + *
+   * True if the data should be sent reliably, false otherwise.
+   * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return The reliable. + */ + @java.lang.Override + public boolean getReliable() { + return reliable_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, matchId_); + } + if (opCode_ != 0L) { + output.writeInt64(2, opCode_); + } + if (!data_.isEmpty()) { + output.writeBytes(3, data_); + } + for (int i = 0; i < presences_.size(); i++) { + output.writeMessage(4, presences_.get(i)); + } + if (reliable_ != false) { + output.writeBool(5, reliable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, matchId_); + } + if (opCode_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, opCode_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, data_); + } + for (int i = 0; i < presences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, presences_.get(i)); + } + if (reliable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, reliable_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchDataSend)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchDataSend other = (com.heroiclabs.nakama.rtapi.MatchDataSend) obj; + + if (!getMatchId() + .equals(other.getMatchId())) return false; + if (getOpCode() + != other.getOpCode()) return false; + if (!getData() + .equals(other.getData())) return false; + if (!getPresencesList() + .equals(other.getPresencesList())) return false; + if (getReliable() + != other.getReliable()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + hash = (37 * hash) + OP_CODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpCode()); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (getPresencesCount() > 0) { + hash = (37 * hash) + PRESENCES_FIELD_NUMBER; + hash = (53 * hash) + getPresencesList().hashCode(); + } + hash = (37 * hash) + RELIABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReliable()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchDataSend parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchDataSend prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send realtime match data to the server.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchDataSend} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchDataSend) + com.heroiclabs.nakama.rtapi.MatchDataSendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchDataSend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchDataSend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchDataSend.class, com.heroiclabs.nakama.rtapi.MatchDataSend.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchDataSend.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchId_ = ""; + opCode_ = 0L; + data_ = com.google.protobuf.ByteString.EMPTY; + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + } else { + presences_ = null; + presencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + reliable_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchDataSend_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSend getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSend build() { + com.heroiclabs.nakama.rtapi.MatchDataSend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSend buildPartial() { + com.heroiclabs.nakama.rtapi.MatchDataSend result = new com.heroiclabs.nakama.rtapi.MatchDataSend(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.MatchDataSend result) { + if (presencesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + presences_ = java.util.Collections.unmodifiableList(presences_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.presences_ = presences_; + } else { + result.presences_ = presencesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchDataSend result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchId_ = matchId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.opCode_ = opCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.data_ = data_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reliable_ = reliable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchDataSend) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchDataSend)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchDataSend other) { + if (other == com.heroiclabs.nakama.rtapi.MatchDataSend.getDefaultInstance()) return this; + if (!other.getMatchId().isEmpty()) { + matchId_ = other.matchId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getOpCode() != 0L) { + setOpCode(other.getOpCode()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (presencesBuilder_ == null) { + if (!other.presences_.isEmpty()) { + if (presences_.isEmpty()) { + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePresencesIsMutable(); + presences_.addAll(other.presences_); + } + onChanged(); + } + } else { + if (!other.presences_.isEmpty()) { + if (presencesBuilder_.isEmpty()) { + presencesBuilder_.dispose(); + presencesBuilder_ = null; + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000008); + presencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPresencesFieldBuilder() : null; + } else { + presencesBuilder_.addAllMessages(other.presences_); + } + } + } + if (other.getReliable() != false) { + setReliable(other.getReliable()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + matchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + opCode_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + data_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(m); + } else { + presencesBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: { + reliable_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object matchId_ = ""; + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + matchId_ = getDefaultInstance().getMatchId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long opCode_ ; + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @param value The opCode to set. + * @return This builder for chaining. + */ + public Builder setOpCode(long value) { + + opCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return This builder for chaining. + */ + public Builder clearOpCode() { + bitField0_ = (bitField0_ & ~0x00000002); + opCode_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 3 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + data_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000004); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private java.util.List presences_ = + java.util.Collections.emptyList(); + private void ensurePresencesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + presences_ = new java.util.ArrayList(presences_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presencesBuilder_; + + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public java.util.List getPresencesList() { + if (presencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(presences_); + } else { + return presencesBuilder_.getMessageList(); + } + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public int getPresencesCount() { + if (presencesBuilder_ == null) { + return presences_.size(); + } else { + return presencesBuilder_.getCount(); + } + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); + } else { + return presencesBuilder_.getMessage(index); + } + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.set(index, value); + onChanged(); + } else { + presencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.set(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder addPresences(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(value); + onChanged(); + } else { + presencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(index, value); + onChanged(); + } else { + presencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder addPresences( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder addAllPresences( + java.lang.Iterable values) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, presences_); + onChanged(); + } else { + presencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder clearPresences() { + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + presencesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public Builder removePresences(int index) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.remove(index); + onChanged(); + } else { + presencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresencesBuilder( + int index) { + return getPresencesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); } else { + return presencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public java.util.List + getPresencesOrBuilderList() { + if (presencesBuilder_ != null) { + return presencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(presences_); + } + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder() { + return getPresencesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder( + int index) { + return getPresencesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + public java.util.List + getPresencesBuilderList() { + return getPresencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresencesFieldBuilder() { + if (presencesBuilder_ == null) { + presencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + presences_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + presences_ = null; + } + return presencesBuilder_; + } + + private boolean reliable_ ; + /** + *
+     * True if the data should be sent reliably, false otherwise.
+     * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return The reliable. + */ + @java.lang.Override + public boolean getReliable() { + return reliable_; + } + /** + *
+     * True if the data should be sent reliably, false otherwise.
+     * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @param value The reliable to set. + * @return This builder for chaining. + */ + public Builder setReliable(boolean value) { + + reliable_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * True if the data should be sent reliably, false otherwise.
+     * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return This builder for chaining. + */ + public Builder clearReliable() { + bitField0_ = (bitField0_ & ~0x00000010); + reliable_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchDataSend) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchDataSend) + private static final com.heroiclabs.nakama.rtapi.MatchDataSend DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchDataSend(); + } + + public static com.heroiclabs.nakama.rtapi.MatchDataSend getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchDataSend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchDataSend getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSendOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSendOrBuilder.java new file mode 100644 index 00000000..8f17f659 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchDataSendOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchDataSendOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchDataSend) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); + + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return The opCode. + */ + long getOpCode(); + + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + java.util.List + getPresencesList(); + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index); + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + int getPresencesCount(); + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + java.util.List + getPresencesOrBuilderList(); + /** + *
+   * List of presences in the match to deliver to, if filtering is required. Otherwise deliver to everyone in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 4 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index); + + /** + *
+   * True if the data should be sent reliably, false otherwise.
+   * 
+ * + * bool reliable = 5 [json_name = "reliable"]; + * @return The reliable. + */ + boolean getReliable(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchJoin.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchJoin.java new file mode 100644 index 00000000..c425142e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchJoin.java @@ -0,0 +1,1189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Join an existing realtime match.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchJoin} + */ +public final class MatchJoin extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchJoin) + MatchJoinOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchJoin.class.getName()); + } + // Use MatchJoin.newBuilder() to construct. + private MatchJoin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchJoin() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchJoin_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchJoin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchJoin.class, com.heroiclabs.nakama.rtapi.MatchJoin.Builder.class); + } + + private int idCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object id_; + public enum IdCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MATCH_ID(1), + TOKEN(2), + ID_NOT_SET(0); + private final int value; + private IdCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdCase valueOf(int value) { + return forNumber(value); + } + + public static IdCase forNumber(int value) { + switch (value) { + case 1: return MATCH_ID; + case 2: return TOKEN; + case 0: return ID_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public static final int MATCH_ID_FIELD_NUMBER = 1; + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return Whether the matchId field is set. + */ + public boolean hasMatchId() { + return idCase_ == 1; + } + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = ""; + if (idCase_ == 1) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 1) { + id_ = s; + } + return s; + } + } + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 1) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 1) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_FIELD_NUMBER = 2; + /** + *
+   * A matchmaking result token.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return Whether the token field is set. + */ + public boolean hasToken() { + return idCase_ == 2; + } + /** + *
+   * A matchmaking result token.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } + } + /** + *
+   * A matchmaking result token.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 3; + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchJoin_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (idCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (idCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, id_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetMetadata(), + MetadataDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (idCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (idCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, id_); + } + for (java.util.Map.Entry entry + : internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry + metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, metadata__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchJoin)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchJoin other = (com.heroiclabs.nakama.rtapi.MatchJoin) obj; + + if (!internalGetMetadata().equals( + other.internalGetMetadata())) return false; + if (!getIdCase().equals(other.getIdCase())) return false; + switch (idCase_) { + case 1: + if (!getMatchId() + .equals(other.getMatchId())) return false; + break; + case 2: + if (!getToken() + .equals(other.getToken())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + switch (idCase_) { + case 1: + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + break; + case 2: + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchJoin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchJoin parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchJoin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchJoin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Join an existing realtime match.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchJoin} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchJoin) + com.heroiclabs.nakama.rtapi.MatchJoinOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchJoin_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchJoin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchJoin.class, com.heroiclabs.nakama.rtapi.MatchJoin.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchJoin.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableMetadata().clear(); + idCase_ = 0; + id_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchJoin_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoin getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoin build() { + com.heroiclabs.nakama.rtapi.MatchJoin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoin buildPartial() { + com.heroiclabs.nakama.rtapi.MatchJoin result = new com.heroiclabs.nakama.rtapi.MatchJoin(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchJoin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + } + } + + private void buildPartialOneofs(com.heroiclabs.nakama.rtapi.MatchJoin result) { + result.idCase_ = idCase_; + result.id_ = this.id_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchJoin) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchJoin)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchJoin other) { + if (other == com.heroiclabs.nakama.rtapi.MatchJoin.getDefaultInstance()) return this; + internalGetMutableMetadata().mergeFrom( + other.internalGetMetadata()); + bitField0_ |= 0x00000004; + switch (other.getIdCase()) { + case MATCH_ID: { + idCase_ = 1; + id_ = other.id_; + onChanged(); + break; + } + case TOKEN: { + idCase_ = 2; + id_ = other.id_; + onChanged(); + break; + } + case ID_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 1; + id_ = s; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 2; + id_ = s; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + metadata__ = input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMetadata().getMutableMap().put( + metadata__.getKey(), metadata__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int idCase_ = 0; + private java.lang.Object id_; + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public Builder clearId() { + idCase_ = 0; + id_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return Whether the matchId field is set. + */ + @java.lang.Override + public boolean hasMatchId() { + return idCase_ == 1; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = ""; + if (idCase_ == 1) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 1) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 1) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 1) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idCase_ = 1; + id_ = value; + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + if (idCase_ == 1) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idCase_ = 1; + id_ = value; + onChanged(); + return this; + } + + /** + *
+     * A matchmaking result token.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @return Whether the token field is set. + */ + @java.lang.Override + public boolean hasToken() { + return idCase_ == 2; + } + /** + *
+     * A matchmaking result token.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A matchmaking result token.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A matchmaking result token.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + /** + *
+     * A matchmaking result token.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + if (idCase_ == 2) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A matchmaking result token.
+     * 
+ * + * string token = 2 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + private com.google.protobuf.MapField + internalGetMutableMetadata() { + if (metadata_ == null) { + metadata_ = com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+     * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+     * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+     * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableMetadata().getMutableMap() + .clear(); + return this; + } + /** + *
+     * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder removeMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMetadata().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetadata() { + bitField0_ |= 0x00000004; + return internalGetMutableMetadata().getMutableMap(); + } + /** + *
+     * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder putMetadata( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableMetadata().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder putAllMetadata( + java.util.Map values) { + internalGetMutableMetadata().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchJoin) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchJoin) + private static final com.heroiclabs.nakama.rtapi.MatchJoin DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchJoin(); + } + + public static com.heroiclabs.nakama.rtapi.MatchJoin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchJoin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchJoin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchJoinOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchJoinOrBuilder.java new file mode 100644 index 00000000..70fcf19d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchJoinOrBuilder.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchJoinOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchJoin) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return Whether the matchId field is set. + */ + boolean hasMatchId(); + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); + + /** + *
+   * A matchmaking result token.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return Whether the token field is set. + */ + boolean hasToken(); + /** + *
+   * A matchmaking result token.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * A matchmaking result token.
+   * 
+ * + * string token = 2 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + int getMetadataCount(); + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + boolean containsMetadata( + java.lang.String key); + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetadata(); + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + java.util.Map + getMetadataMap(); + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * An optional set of key-value metadata pairs to be passed to the match handler, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + java.lang.String getMetadataOrThrow( + java.lang.String key); + + com.heroiclabs.nakama.rtapi.MatchJoin.IdCase getIdCase(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchLeave.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchLeave.java new file mode 100644 index 00000000..a3ba055a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchLeave.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Leave a realtime match.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchLeave} + */ +public final class MatchLeave extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchLeave) + MatchLeaveOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchLeave.class.getName()); + } + // Use MatchLeave.newBuilder() to construct. + private MatchLeave(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchLeave() { + matchId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchLeave_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchLeave_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchLeave.class, com.heroiclabs.nakama.rtapi.MatchLeave.Builder.class); + } + + public static final int MATCH_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object matchId_ = ""; + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } + } + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, matchId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, matchId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchLeave)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchLeave other = (com.heroiclabs.nakama.rtapi.MatchLeave) obj; + + if (!getMatchId() + .equals(other.getMatchId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchLeave parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchLeave parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchLeave parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchLeave prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Leave a realtime match.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchLeave} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchLeave) + com.heroiclabs.nakama.rtapi.MatchLeaveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchLeave_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchLeave_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchLeave.class, com.heroiclabs.nakama.rtapi.MatchLeave.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchLeave.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchLeave_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeave getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeave build() { + com.heroiclabs.nakama.rtapi.MatchLeave result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeave buildPartial() { + com.heroiclabs.nakama.rtapi.MatchLeave result = new com.heroiclabs.nakama.rtapi.MatchLeave(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchLeave result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchId_ = matchId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchLeave) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchLeave)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchLeave other) { + if (other == com.heroiclabs.nakama.rtapi.MatchLeave.getDefaultInstance()) return this; + if (!other.getMatchId().isEmpty()) { + matchId_ = other.matchId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + matchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object matchId_ = ""; + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + matchId_ = getDefaultInstance().getMatchId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchLeave) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchLeave) + private static final com.heroiclabs.nakama.rtapi.MatchLeave DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchLeave(); + } + + public static com.heroiclabs.nakama.rtapi.MatchLeave getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchLeave parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchLeave getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchLeaveOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchLeaveOrBuilder.java new file mode 100644 index 00000000..892761c5 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchLeaveOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchLeaveOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchLeave) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchOrBuilder.java new file mode 100644 index 00000000..5c04bbb2 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchOrBuilder.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Match) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); + + /** + *
+   * True if it's an server-managed authoritative match, false otherwise.
+   * 
+ * + * bool authoritative = 2 [json_name = "authoritative"]; + * @return The authoritative. + */ + boolean getAuthoritative(); + + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return Whether the label field is set. + */ + boolean hasLabel(); + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + * @return The label. + */ + com.google.protobuf.StringValue getLabel(); + /** + *
+   * Match label, if any.
+   * 
+ * + * .google.protobuf.StringValue label = 3 [json_name = "label"]; + */ + com.google.protobuf.StringValueOrBuilder getLabelOrBuilder(); + + /** + *
+   * The number of users currently in the match.
+   * 
+ * + * int32 size = 4 [json_name = "size"]; + * @return The size. + */ + int getSize(); + + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + java.util.List + getPresencesList(); + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index); + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + int getPresencesCount(); + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + java.util.List + getPresencesOrBuilderList(); + /** + *
+   * The users currently in the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 5 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index); + + /** + *
+   * A reference to the current user's presence in the match.
+   * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + * @return Whether the self field is set. + */ + boolean hasSelf(); + /** + *
+   * A reference to the current user's presence in the match.
+   * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + * @return The self. + */ + com.heroiclabs.nakama.rtapi.UserPresence getSelf(); + /** + *
+   * A reference to the current user's presence in the match.
+   * 
+ * + * .nakama.realtime.UserPresence self = 6 [json_name = "self"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEvent.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEvent.java new file mode 100644 index 00000000..c96882e8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEvent.java @@ -0,0 +1,1425 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A set of joins and leaves on a particular realtime match.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchPresenceEvent} + */ +public final class MatchPresenceEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchPresenceEvent) + MatchPresenceEventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchPresenceEvent.class.getName()); + } + // Use MatchPresenceEvent.newBuilder() to construct. + private MatchPresenceEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchPresenceEvent() { + matchId_ = ""; + joins_ = java.util.Collections.emptyList(); + leaves_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchPresenceEvent.class, com.heroiclabs.nakama.rtapi.MatchPresenceEvent.Builder.class); + } + + public static final int MATCH_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object matchId_ = ""; + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } + } + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOINS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List joins_; + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List getJoinsList() { + return joins_; + } + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List + getJoinsOrBuilderList() { + return joins_; + } + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public int getJoinsCount() { + return joins_.size(); + } + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + return joins_.get(index); + } + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + return joins_.get(index); + } + + public static final int LEAVES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List leaves_; + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List getLeavesList() { + return leaves_; + } + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List + getLeavesOrBuilderList() { + return leaves_; + } + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public int getLeavesCount() { + return leaves_.size(); + } + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + return leaves_.get(index); + } + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + return leaves_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, matchId_); + } + for (int i = 0; i < joins_.size(); i++) { + output.writeMessage(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + output.writeMessage(3, leaves_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(matchId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, matchId_); + } + for (int i = 0; i < joins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, leaves_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchPresenceEvent)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchPresenceEvent other = (com.heroiclabs.nakama.rtapi.MatchPresenceEvent) obj; + + if (!getMatchId() + .equals(other.getMatchId())) return false; + if (!getJoinsList() + .equals(other.getJoinsList())) return false; + if (!getLeavesList() + .equals(other.getLeavesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + if (getJoinsCount() > 0) { + hash = (37 * hash) + JOINS_FIELD_NUMBER; + hash = (53 * hash) + getJoinsList().hashCode(); + } + if (getLeavesCount() > 0) { + hash = (37 * hash) + LEAVES_FIELD_NUMBER; + hash = (53 * hash) + getLeavesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchPresenceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of joins and leaves on a particular realtime match.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchPresenceEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchPresenceEvent) + com.heroiclabs.nakama.rtapi.MatchPresenceEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchPresenceEvent.class, com.heroiclabs.nakama.rtapi.MatchPresenceEvent.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchPresenceEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchId_ = ""; + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + } else { + joins_ = null; + joinsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + } else { + leaves_ = null; + leavesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchPresenceEvent_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEvent getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEvent build() { + com.heroiclabs.nakama.rtapi.MatchPresenceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEvent buildPartial() { + com.heroiclabs.nakama.rtapi.MatchPresenceEvent result = new com.heroiclabs.nakama.rtapi.MatchPresenceEvent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.MatchPresenceEvent result) { + if (joinsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + joins_ = java.util.Collections.unmodifiableList(joins_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.joins_ = joins_; + } else { + result.joins_ = joinsBuilder_.build(); + } + if (leavesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + leaves_ = java.util.Collections.unmodifiableList(leaves_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.leaves_ = leaves_; + } else { + result.leaves_ = leavesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchPresenceEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchId_ = matchId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchPresenceEvent) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchPresenceEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchPresenceEvent other) { + if (other == com.heroiclabs.nakama.rtapi.MatchPresenceEvent.getDefaultInstance()) return this; + if (!other.getMatchId().isEmpty()) { + matchId_ = other.matchId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (joinsBuilder_ == null) { + if (!other.joins_.isEmpty()) { + if (joins_.isEmpty()) { + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJoinsIsMutable(); + joins_.addAll(other.joins_); + } + onChanged(); + } + } else { + if (!other.joins_.isEmpty()) { + if (joinsBuilder_.isEmpty()) { + joinsBuilder_.dispose(); + joinsBuilder_ = null; + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + joinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getJoinsFieldBuilder() : null; + } else { + joinsBuilder_.addAllMessages(other.joins_); + } + } + } + if (leavesBuilder_ == null) { + if (!other.leaves_.isEmpty()) { + if (leaves_.isEmpty()) { + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLeavesIsMutable(); + leaves_.addAll(other.leaves_); + } + onChanged(); + } + } else { + if (!other.leaves_.isEmpty()) { + if (leavesBuilder_.isEmpty()) { + leavesBuilder_.dispose(); + leavesBuilder_ = null; + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + leavesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLeavesFieldBuilder() : null; + } else { + leavesBuilder_.addAllMessages(other.leaves_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + matchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(m); + } else { + joinsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(m); + } else { + leavesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object matchId_ = ""; + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = matchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + matchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = matchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + matchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + matchId_ = getDefaultInstance().getMatchId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The match unique ID.
+     * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + matchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List joins_ = + java.util.Collections.emptyList(); + private void ensureJoinsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + joins_ = new java.util.ArrayList(joins_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> joinsBuilder_; + + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List getJoinsList() { + if (joinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(joins_); + } else { + return joinsBuilder_.getMessageList(); + } + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public int getJoinsCount() { + if (joinsBuilder_ == null) { + return joins_.size(); + } else { + return joinsBuilder_.getCount(); + } + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); + } else { + return joinsBuilder_.getMessage(index); + } + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.set(index, value); + onChanged(); + } else { + joinsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.set(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(value); + onChanged(); + } else { + joinsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(index, value); + onChanged(); + } else { + joinsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addAllJoins( + java.lang.Iterable values) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, joins_); + onChanged(); + } else { + joinsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder clearJoins() { + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + joinsBuilder_.clear(); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder removeJoins(int index) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.remove(index); + onChanged(); + } else { + joinsBuilder_.remove(index); + } + return this; + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getJoinsBuilder( + int index) { + return getJoinsFieldBuilder().getBuilder(index); + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); } else { + return joinsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsOrBuilderList() { + if (joinsBuilder_ != null) { + return joinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(joins_); + } + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder() { + return getJoinsFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder( + int index) { + return getJoinsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just joined the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsBuilderList() { + return getJoinsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getJoinsFieldBuilder() { + if (joinsBuilder_ == null) { + joinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + joins_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + joins_ = null; + } + return joinsBuilder_; + } + + private java.util.List leaves_ = + java.util.Collections.emptyList(); + private void ensureLeavesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + leaves_ = new java.util.ArrayList(leaves_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> leavesBuilder_; + + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List getLeavesList() { + if (leavesBuilder_ == null) { + return java.util.Collections.unmodifiableList(leaves_); + } else { + return leavesBuilder_.getMessageList(); + } + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public int getLeavesCount() { + if (leavesBuilder_ == null) { + return leaves_.size(); + } else { + return leavesBuilder_.getCount(); + } + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); + } else { + return leavesBuilder_.getMessage(index); + } + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.set(index, value); + onChanged(); + } else { + leavesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.set(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(value); + onChanged(); + } else { + leavesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(index, value); + onChanged(); + } else { + leavesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addAllLeaves( + java.lang.Iterable values) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, leaves_); + onChanged(); + } else { + leavesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder clearLeaves() { + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + leavesBuilder_.clear(); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder removeLeaves(int index) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.remove(index); + onChanged(); + } else { + leavesBuilder_.remove(index); + } + return this; + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getLeavesBuilder( + int index) { + return getLeavesFieldBuilder().getBuilder(index); + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); } else { + return leavesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesOrBuilderList() { + if (leavesBuilder_ != null) { + return leavesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(leaves_); + } + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder() { + return getLeavesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder( + int index) { + return getLeavesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just left the match.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesBuilderList() { + return getLeavesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getLeavesFieldBuilder() { + if (leavesBuilder_ == null) { + leavesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + leaves_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + leaves_ = null; + } + return leavesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchPresenceEvent) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchPresenceEvent) + private static final com.heroiclabs.nakama.rtapi.MatchPresenceEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchPresenceEvent(); + } + + public static com.heroiclabs.nakama.rtapi.MatchPresenceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchPresenceEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchPresenceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEventOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEventOrBuilder.java new file mode 100644 index 00000000..e8604bc8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchPresenceEventOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchPresenceEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchPresenceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * The match unique ID.
+   * 
+ * + * string match_id = 1 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); + + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsList(); + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index); + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + int getJoinsCount(); + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsOrBuilderList(); + /** + *
+   * User presences that have just joined the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index); + + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesList(); + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index); + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + int getLeavesCount(); + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesOrBuilderList(); + /** + *
+   * User presences that have just left the match.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAdd.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAdd.java new file mode 100644 index 00000000..7263a43f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAdd.java @@ -0,0 +1,1556 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Start a new matchmaking process.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerAdd} + */ +public final class MatchmakerAdd extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchmakerAdd) + MatchmakerAddOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchmakerAdd.class.getName()); + } + // Use MatchmakerAdd.newBuilder() to construct. + private MatchmakerAdd(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchmakerAdd() { + query_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerAdd_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetStringProperties(); + case 5: + return internalGetNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerAdd_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerAdd.class, com.heroiclabs.nakama.rtapi.MatchmakerAdd.Builder.class); + } + + private int bitField0_; + public static final int MIN_COUNT_FIELD_NUMBER = 1; + private int minCount_ = 0; + /** + *
+   * Minimum total user count to match together.
+   * 
+ * + * int32 min_count = 1 [json_name = "minCount"]; + * @return The minCount. + */ + @java.lang.Override + public int getMinCount() { + return minCount_; + } + + public static final int MAX_COUNT_FIELD_NUMBER = 2; + private int maxCount_ = 0; + /** + *
+   * Maximum total user count to match together.
+   * 
+ * + * int32 max_count = 2 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + + public static final int QUERY_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 3 [json_name = "query"]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 3 [json_name = "query"]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRING_PROPERTIES_FIELD_NUMBER = 4; + private static final class StringPropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerAdd_StringPropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringProperties_; + private com.google.protobuf.MapField + internalGetStringProperties() { + if (stringProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + return stringProperties_; + } + public int getStringPropertiesCount() { + return internalGetStringProperties().getMap().size(); + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public boolean containsStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetStringProperties().getMap().containsKey(key); + } + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getStringProperties() { + return getStringPropertiesMap(); + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.util.Map getStringPropertiesMap() { + return internalGetStringProperties().getMap(); + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.lang.String getStringPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NUMERIC_PROPERTIES_FIELD_NUMBER = 5; + private static final class NumericPropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Double> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerAdd_NumericPropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.DOUBLE, + 0D); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> numericProperties_; + private com.google.protobuf.MapField + internalGetNumericProperties() { + if (numericProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + return numericProperties_; + } + public int getNumericPropertiesCount() { + return internalGetNumericProperties().getMap().size(); + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public boolean containsNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNumericProperties().getMap().containsKey(key); + } + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNumericProperties() { + return getNumericPropertiesMap(); + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public java.util.Map getNumericPropertiesMap() { + return internalGetNumericProperties().getMap(); + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int COUNT_MULTIPLE_FIELD_NUMBER = 6; + private com.google.protobuf.Int32Value countMultiple_; + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + * @return Whether the countMultiple field is set. + */ + @java.lang.Override + public boolean hasCountMultiple() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + * @return The countMultiple. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getCountMultiple() { + return countMultiple_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getCountMultipleOrBuilder() { + return countMultiple_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minCount_ != 0) { + output.writeInt32(1, minCount_); + } + if (maxCount_ != 0) { + output.writeInt32(2, maxCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, query_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetStringProperties(), + StringPropertiesDefaultEntryHolder.defaultEntry, + 4); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetNumericProperties(), + NumericPropertiesDefaultEntryHolder.defaultEntry, + 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCountMultiple()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, minCount_); + } + if (maxCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, query_); + } + for (java.util.Map.Entry entry + : internalGetStringProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + stringProperties__ = StringPropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, stringProperties__); + } + for (java.util.Map.Entry entry + : internalGetNumericProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + numericProperties__ = NumericPropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, numericProperties__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCountMultiple()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchmakerAdd)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchmakerAdd other = (com.heroiclabs.nakama.rtapi.MatchmakerAdd) obj; + + if (getMinCount() + != other.getMinCount()) return false; + if (getMaxCount() + != other.getMaxCount()) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (!internalGetStringProperties().equals( + other.internalGetStringProperties())) return false; + if (!internalGetNumericProperties().equals( + other.internalGetNumericProperties())) return false; + if (hasCountMultiple() != other.hasCountMultiple()) return false; + if (hasCountMultiple()) { + if (!getCountMultiple() + .equals(other.getCountMultiple())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinCount(); + hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxCount(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (!internalGetStringProperties().getMap().isEmpty()) { + hash = (37 * hash) + STRING_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetStringProperties().hashCode(); + } + if (!internalGetNumericProperties().getMap().isEmpty()) { + hash = (37 * hash) + NUMERIC_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetNumericProperties().hashCode(); + } + if (hasCountMultiple()) { + hash = (37 * hash) + COUNT_MULTIPLE_FIELD_NUMBER; + hash = (53 * hash) + getCountMultiple().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchmakerAdd prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Start a new matchmaking process.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerAdd} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchmakerAdd) + com.heroiclabs.nakama.rtapi.MatchmakerAddOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerAdd_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetStringProperties(); + case 5: + return internalGetNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableStringProperties(); + case 5: + return internalGetMutableNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerAdd_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerAdd.class, com.heroiclabs.nakama.rtapi.MatchmakerAdd.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchmakerAdd.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCountMultipleFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minCount_ = 0; + maxCount_ = 0; + query_ = ""; + internalGetMutableStringProperties().clear(); + internalGetMutableNumericProperties().clear(); + countMultiple_ = null; + if (countMultipleBuilder_ != null) { + countMultipleBuilder_.dispose(); + countMultipleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerAdd_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAdd getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAdd build() { + com.heroiclabs.nakama.rtapi.MatchmakerAdd result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAdd buildPartial() { + com.heroiclabs.nakama.rtapi.MatchmakerAdd result = new com.heroiclabs.nakama.rtapi.MatchmakerAdd(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchmakerAdd result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minCount_ = minCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxCount_ = maxCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.stringProperties_ = internalGetStringProperties(); + result.stringProperties_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.numericProperties_ = internalGetNumericProperties(); + result.numericProperties_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.countMultiple_ = countMultipleBuilder_ == null + ? countMultiple_ + : countMultipleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchmakerAdd) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchmakerAdd)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchmakerAdd other) { + if (other == com.heroiclabs.nakama.rtapi.MatchmakerAdd.getDefaultInstance()) return this; + if (other.getMinCount() != 0) { + setMinCount(other.getMinCount()); + } + if (other.getMaxCount() != 0) { + setMaxCount(other.getMaxCount()); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000004; + onChanged(); + } + internalGetMutableStringProperties().mergeFrom( + other.internalGetStringProperties()); + bitField0_ |= 0x00000008; + internalGetMutableNumericProperties().mergeFrom( + other.internalGetNumericProperties()); + bitField0_ |= 0x00000010; + if (other.hasCountMultiple()) { + mergeCountMultiple(other.getCountMultiple()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + minCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + maxCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + stringProperties__ = input.readMessage( + StringPropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableStringProperties().getMutableMap().put( + stringProperties__.getKey(), stringProperties__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + com.google.protobuf.MapEntry + numericProperties__ = input.readMessage( + NumericPropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableNumericProperties().getMutableMap().put( + numericProperties__.getKey(), numericProperties__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getCountMultipleFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int minCount_ ; + /** + *
+     * Minimum total user count to match together.
+     * 
+ * + * int32 min_count = 1 [json_name = "minCount"]; + * @return The minCount. + */ + @java.lang.Override + public int getMinCount() { + return minCount_; + } + /** + *
+     * Minimum total user count to match together.
+     * 
+ * + * int32 min_count = 1 [json_name = "minCount"]; + * @param value The minCount to set. + * @return This builder for chaining. + */ + public Builder setMinCount(int value) { + + minCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Minimum total user count to match together.
+     * 
+ * + * int32 min_count = 1 [json_name = "minCount"]; + * @return This builder for chaining. + */ + public Builder clearMinCount() { + bitField0_ = (bitField0_ & ~0x00000001); + minCount_ = 0; + onChanged(); + return this; + } + + private int maxCount_ ; + /** + *
+     * Maximum total user count to match together.
+     * 
+ * + * int32 max_count = 2 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + /** + *
+     * Maximum total user count to match together.
+     * 
+ * + * int32 max_count = 2 [json_name = "maxCount"]; + * @param value The maxCount to set. + * @return This builder for chaining. + */ + public Builder setMaxCount(int value) { + + maxCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Maximum total user count to match together.
+     * 
+ * + * int32 max_count = 2 [json_name = "maxCount"]; + * @return This builder for chaining. + */ + public Builder clearMaxCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 3 [json_name = "query"]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 3 [json_name = "query"]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 3 [json_name = "query"]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + query_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 3 [json_name = "query"]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 3 [json_name = "query"]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringProperties_; + private com.google.protobuf.MapField + internalGetStringProperties() { + if (stringProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + return stringProperties_; + } + private com.google.protobuf.MapField + internalGetMutableStringProperties() { + if (stringProperties_ == null) { + stringProperties_ = com.google.protobuf.MapField.newMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + if (!stringProperties_.isMutable()) { + stringProperties_ = stringProperties_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return stringProperties_; + } + public int getStringPropertiesCount() { + return internalGetStringProperties().getMap().size(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public boolean containsStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetStringProperties().getMap().containsKey(key); + } + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getStringProperties() { + return getStringPropertiesMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.util.Map getStringPropertiesMap() { + return internalGetStringProperties().getMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.lang.String getStringPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearStringProperties() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableStringProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + public Builder removeStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableStringProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableStringProperties() { + bitField0_ |= 0x00000008; + return internalGetMutableStringProperties().getMutableMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + public Builder putStringProperties( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableStringProperties().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + public Builder putAllStringProperties( + java.util.Map values) { + internalGetMutableStringProperties().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> numericProperties_; + private com.google.protobuf.MapField + internalGetNumericProperties() { + if (numericProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + return numericProperties_; + } + private com.google.protobuf.MapField + internalGetMutableNumericProperties() { + if (numericProperties_ == null) { + numericProperties_ = com.google.protobuf.MapField.newMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + if (!numericProperties_.isMutable()) { + numericProperties_ = numericProperties_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return numericProperties_; + } + public int getNumericPropertiesCount() { + return internalGetNumericProperties().getMap().size(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public boolean containsNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNumericProperties().getMap().containsKey(key); + } + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNumericProperties() { + return getNumericPropertiesMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public java.util.Map getNumericPropertiesMap() { + return internalGetNumericProperties().getMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearNumericProperties() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableNumericProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + public Builder removeNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableNumericProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableNumericProperties() { + bitField0_ |= 0x00000010; + return internalGetMutableNumericProperties().getMutableMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + public Builder putNumericProperties( + java.lang.String key, + double value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableNumericProperties().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + public Builder putAllNumericProperties( + java.util.Map values) { + internalGetMutableNumericProperties().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.Int32Value countMultiple_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> countMultipleBuilder_; + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + * @return Whether the countMultiple field is set. + */ + public boolean hasCountMultiple() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + * @return The countMultiple. + */ + public com.google.protobuf.Int32Value getCountMultiple() { + if (countMultipleBuilder_ == null) { + return countMultiple_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } else { + return countMultipleBuilder_.getMessage(); + } + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + public Builder setCountMultiple(com.google.protobuf.Int32Value value) { + if (countMultipleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + countMultiple_ = value; + } else { + countMultipleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + public Builder setCountMultiple( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (countMultipleBuilder_ == null) { + countMultiple_ = builderForValue.build(); + } else { + countMultipleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + public Builder mergeCountMultiple(com.google.protobuf.Int32Value value) { + if (countMultipleBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + countMultiple_ != null && + countMultiple_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getCountMultipleBuilder().mergeFrom(value); + } else { + countMultiple_ = value; + } + } else { + countMultipleBuilder_.mergeFrom(value); + } + if (countMultiple_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + public Builder clearCountMultiple() { + bitField0_ = (bitField0_ & ~0x00000020); + countMultiple_ = null; + if (countMultipleBuilder_ != null) { + countMultipleBuilder_.dispose(); + countMultipleBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + public com.google.protobuf.Int32Value.Builder getCountMultipleBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCountMultipleFieldBuilder().getBuilder(); + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getCountMultipleOrBuilder() { + if (countMultipleBuilder_ != null) { + return countMultipleBuilder_.getMessageOrBuilder(); + } else { + return countMultiple_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getCountMultipleFieldBuilder() { + if (countMultipleBuilder_ == null) { + countMultipleBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getCountMultiple(), + getParentForChildren(), + isClean()); + countMultiple_ = null; + } + return countMultipleBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchmakerAdd) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchmakerAdd) + private static final com.heroiclabs.nakama.rtapi.MatchmakerAdd DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchmakerAdd(); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerAdd getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchmakerAdd parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerAdd getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAddOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAddOrBuilder.java new file mode 100644 index 00000000..89da3294 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerAddOrBuilder.java @@ -0,0 +1,184 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchmakerAddOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchmakerAdd) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Minimum total user count to match together.
+   * 
+ * + * int32 min_count = 1 [json_name = "minCount"]; + * @return The minCount. + */ + int getMinCount(); + + /** + *
+   * Maximum total user count to match together.
+   * 
+ * + * int32 max_count = 2 [json_name = "maxCount"]; + * @return The maxCount. + */ + int getMaxCount(); + + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 3 [json_name = "query"]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 3 [json_name = "query"]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + int getStringPropertiesCount(); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + boolean containsStringProperties( + java.lang.String key); + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getStringProperties(); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + java.util.Map + getStringPropertiesMap(); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 4 [json_name = "stringProperties"]; + */ + java.lang.String getStringPropertiesOrThrow( + java.lang.String key); + + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + int getNumericPropertiesCount(); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + boolean containsNumericProperties( + java.lang.String key); + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getNumericProperties(); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + java.util.Map + getNumericPropertiesMap(); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 5 [json_name = "numericProperties"]; + */ + double getNumericPropertiesOrThrow( + java.lang.String key); + + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + * @return Whether the countMultiple field is set. + */ + boolean hasCountMultiple(); + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + * @return The countMultiple. + */ + com.google.protobuf.Int32Value getCountMultiple(); + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 6 [json_name = "countMultiple"]; + */ + com.google.protobuf.Int32ValueOrBuilder getCountMultipleOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatched.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatched.java new file mode 100644 index 00000000..7b06ae4b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatched.java @@ -0,0 +1,3252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A successful matchmaking result.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerMatched} + */ +public final class MatchmakerMatched extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchmakerMatched) + MatchmakerMatchedOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchmakerMatched.class.getName()); + } + // Use MatchmakerMatched.newBuilder() to construct. + private MatchmakerMatched(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchmakerMatched() { + ticket_ = ""; + users_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.class, com.heroiclabs.nakama.rtapi.MatchmakerMatched.Builder.class); + } + + public interface MatchmakerUserOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchmakerMatched.MatchmakerUser) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * User info.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + boolean hasPresence(); + /** + *
+     * User info.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + * @return The presence. + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresence(); + /** + *
+     * User info.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder(); + + /** + *
+     * Party identifier, if this user was matched as a party member.
+     * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+     * Party identifier, if this user was matched as a party member.
+     * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + int getStringPropertiesCount(); + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + boolean containsStringProperties( + java.lang.String key); + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getStringProperties(); + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + java.util.Map + getStringPropertiesMap(); + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + java.lang.String getStringPropertiesOrThrow( + java.lang.String key); + + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + int getNumericPropertiesCount(); + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + boolean containsNumericProperties( + java.lang.String key); + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getNumericProperties(); + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + java.util.Map + getNumericPropertiesMap(); + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue); + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + double getNumericPropertiesOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code nakama.realtime.MatchmakerMatched.MatchmakerUser} + */ + public static final class MatchmakerUser extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchmakerMatched.MatchmakerUser) + MatchmakerUserOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchmakerUser.class.getName()); + } + // Use MatchmakerUser.newBuilder() to construct. + private MatchmakerUser(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchmakerUser() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetStringProperties(); + case 6: + return internalGetNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.class, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder.class); + } + + private int bitField0_; + public static final int PRESENCE_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + /** + *
+     * User info.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + @java.lang.Override + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * User info.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + * @return The presence. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + /** + *
+     * User info.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + + public static final int PARTY_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+     * Party identifier, if this user was matched as a party member.
+     * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+     * Party identifier, if this user was matched as a party member.
+     * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRING_PROPERTIES_FIELD_NUMBER = 5; + private static final class StringPropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_StringPropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringProperties_; + private com.google.protobuf.MapField + internalGetStringProperties() { + if (stringProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + return stringProperties_; + } + public int getStringPropertiesCount() { + return internalGetStringProperties().getMap().size(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public boolean containsStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetStringProperties().getMap().containsKey(key); + } + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getStringProperties() { + return getStringPropertiesMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.util.Map getStringPropertiesMap() { + return internalGetStringProperties().getMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.lang.String getStringPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NUMERIC_PROPERTIES_FIELD_NUMBER = 6; + private static final class NumericPropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Double> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.DOUBLE, + 0D); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> numericProperties_; + private com.google.protobuf.MapField + internalGetNumericProperties() { + if (numericProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + return numericProperties_; + } + public int getNumericPropertiesCount() { + return internalGetNumericProperties().getMap().size(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public boolean containsNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNumericProperties().getMap().containsKey(key); + } + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNumericProperties() { + return getNumericPropertiesMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public java.util.Map getNumericPropertiesMap() { + return internalGetNumericProperties().getMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPresence()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, partyId_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetStringProperties(), + StringPropertiesDefaultEntryHolder.defaultEntry, + 5); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetNumericProperties(), + NumericPropertiesDefaultEntryHolder.defaultEntry, + 6); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPresence()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, partyId_); + } + for (java.util.Map.Entry entry + : internalGetStringProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + stringProperties__ = StringPropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, stringProperties__); + } + for (java.util.Map.Entry entry + : internalGetNumericProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + numericProperties__ = NumericPropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, numericProperties__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser other = (com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser) obj; + + if (hasPresence() != other.hasPresence()) return false; + if (hasPresence()) { + if (!getPresence() + .equals(other.getPresence())) return false; + } + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!internalGetStringProperties().equals( + other.internalGetStringProperties())) return false; + if (!internalGetNumericProperties().equals( + other.internalGetNumericProperties())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPresence()) { + hash = (37 * hash) + PRESENCE_FIELD_NUMBER; + hash = (53 * hash) + getPresence().hashCode(); + } + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (!internalGetStringProperties().getMap().isEmpty()) { + hash = (37 * hash) + STRING_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetStringProperties().hashCode(); + } + if (!internalGetNumericProperties().getMap().isEmpty()) { + hash = (37 * hash) + NUMERIC_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetNumericProperties().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code nakama.realtime.MatchmakerMatched.MatchmakerUser} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchmakerMatched.MatchmakerUser) + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetStringProperties(); + case 6: + return internalGetNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableStringProperties(); + case 6: + return internalGetMutableNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.class, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresenceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + partyId_ = ""; + internalGetMutableStringProperties().clear(); + internalGetMutableNumericProperties().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser build() { + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser buildPartial() { + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser result = new com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.presence_ = presenceBuilder_ == null + ? presence_ + : presenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.partyId_ = partyId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stringProperties_ = internalGetStringProperties(); + result.stringProperties_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.numericProperties_ = internalGetNumericProperties(); + result.numericProperties_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser other) { + if (other == com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance()) return this; + if (other.hasPresence()) { + mergePresence(other.getPresence()); + } + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableStringProperties().mergeFrom( + other.internalGetStringProperties()); + bitField0_ |= 0x00000004; + internalGetMutableNumericProperties().mergeFrom( + other.internalGetNumericProperties()); + bitField0_ |= 0x00000008; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getPresenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 42: { + com.google.protobuf.MapEntry + stringProperties__ = input.readMessage( + StringPropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableStringProperties().getMutableMap().put( + stringProperties__.getKey(), stringProperties__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: { + com.google.protobuf.MapEntry + numericProperties__ = input.readMessage( + NumericPropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableNumericProperties().getMutableMap().put( + numericProperties__.getKey(), numericProperties__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presenceBuilder_; + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + * @return The presence. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + if (presenceBuilder_ == null) { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } else { + return presenceBuilder_.getMessage(); + } + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + public Builder setPresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + presence_ = value; + } else { + presenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + public Builder setPresence( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presenceBuilder_ == null) { + presence_ = builderForValue.build(); + } else { + presenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + public Builder mergePresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + presence_ != null && + presence_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getPresenceBuilder().mergeFrom(value); + } else { + presence_ = value; + } + } else { + presenceBuilder_.mergeFrom(value); + } + if (presence_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + public Builder clearPresence() { + bitField0_ = (bitField0_ & ~0x00000001); + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresenceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPresenceFieldBuilder().getBuilder(); + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + if (presenceBuilder_ != null) { + return presenceBuilder_.getMessageOrBuilder(); + } else { + return presence_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + } + /** + *
+       * User info.
+       * 
+ * + * .nakama.realtime.UserPresence presence = 1 [json_name = "presence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresenceFieldBuilder() { + if (presenceBuilder_ == null) { + presenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getPresence(), + getParentForChildren(), + isClean()); + presence_ = null; + } + return presenceBuilder_; + } + + private java.lang.Object partyId_ = ""; + /** + *
+       * Party identifier, if this user was matched as a party member.
+       * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Party identifier, if this user was matched as a party member.
+       * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Party identifier, if this user was matched as a party member.
+       * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Party identifier, if this user was matched as a party member.
+       * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Party identifier, if this user was matched as a party member.
+       * 
+ * + * string party_id = 2 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringProperties_; + private com.google.protobuf.MapField + internalGetStringProperties() { + if (stringProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + return stringProperties_; + } + private com.google.protobuf.MapField + internalGetMutableStringProperties() { + if (stringProperties_ == null) { + stringProperties_ = com.google.protobuf.MapField.newMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + if (!stringProperties_.isMutable()) { + stringProperties_ = stringProperties_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return stringProperties_; + } + public int getStringPropertiesCount() { + return internalGetStringProperties().getMap().size(); + } + /** + *
+       * String properties.
+       * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public boolean containsStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetStringProperties().getMap().containsKey(key); + } + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getStringProperties() { + return getStringPropertiesMap(); + } + /** + *
+       * String properties.
+       * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.util.Map getStringPropertiesMap() { + return internalGetStringProperties().getMap(); + } + /** + *
+       * String properties.
+       * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * String properties.
+       * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.lang.String getStringPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearStringProperties() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableStringProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+       * String properties.
+       * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + public Builder removeStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableStringProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableStringProperties() { + bitField0_ |= 0x00000004; + return internalGetMutableStringProperties().getMutableMap(); + } + /** + *
+       * String properties.
+       * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + public Builder putStringProperties( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableStringProperties().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+       * String properties.
+       * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + public Builder putAllStringProperties( + java.util.Map values) { + internalGetMutableStringProperties().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> numericProperties_; + private com.google.protobuf.MapField + internalGetNumericProperties() { + if (numericProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + return numericProperties_; + } + private com.google.protobuf.MapField + internalGetMutableNumericProperties() { + if (numericProperties_ == null) { + numericProperties_ = com.google.protobuf.MapField.newMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + if (!numericProperties_.isMutable()) { + numericProperties_ = numericProperties_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return numericProperties_; + } + public int getNumericPropertiesCount() { + return internalGetNumericProperties().getMap().size(); + } + /** + *
+       * Numeric properties.
+       * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public boolean containsNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNumericProperties().getMap().containsKey(key); + } + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNumericProperties() { + return getNumericPropertiesMap(); + } + /** + *
+       * Numeric properties.
+       * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public java.util.Map getNumericPropertiesMap() { + return internalGetNumericProperties().getMap(); + } + /** + *
+       * Numeric properties.
+       * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Numeric properties.
+       * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearNumericProperties() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableNumericProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Numeric properties.
+       * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + public Builder removeNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableNumericProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableNumericProperties() { + bitField0_ |= 0x00000008; + return internalGetMutableNumericProperties().getMutableMap(); + } + /** + *
+       * Numeric properties.
+       * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + public Builder putNumericProperties( + java.lang.String key, + double value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableNumericProperties().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + *
+       * Numeric properties.
+       * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + public Builder putAllNumericProperties( + java.util.Map values) { + internalGetMutableNumericProperties().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchmakerMatched.MatchmakerUser) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchmakerMatched.MatchmakerUser) + private static final com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser(); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchmakerUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + private int idCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object id_; + public enum IdCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MATCH_ID(2), + TOKEN(3), + ID_NOT_SET(0); + private final int value; + private IdCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdCase valueOf(int value) { + return forNumber(value); + } + + public static IdCase forNumber(int value) { + switch (value) { + case 2: return MATCH_ID; + case 3: return TOKEN; + case 0: return ID_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public static final int TICKET_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object ticket_ = ""; + /** + *
+   * The matchmaking ticket that has completed.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + @java.lang.Override + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } + } + /** + *
+   * The matchmaking ticket that has completed.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCH_ID_FIELD_NUMBER = 2; + /** + *
+   * Match ID.
+   * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return Whether the matchId field is set. + */ + public boolean hasMatchId() { + return idCase_ == 2; + } + /** + *
+   * Match ID.
+   * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return The matchId. + */ + public java.lang.String getMatchId() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } + } + /** + *
+   * Match ID.
+   * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_FIELD_NUMBER = 3; + /** + *
+   * Match join token.
+   * 
+ * + * string token = 3 [json_name = "token"]; + * @return Whether the token field is set. + */ + public boolean hasToken() { + return idCase_ == 3; + } + /** + *
+   * Match join token.
+   * 
+ * + * string token = 3 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 3) { + id_ = s; + } + return s; + } + } + /** + *
+   * Match join token.
+   * 
+ * + * string token = 3 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 3) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List users_; + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + @java.lang.Override + public java.util.List getUsersList() { + return users_; + } + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + @java.lang.Override + public java.util.List + getUsersOrBuilderList() { + return users_; + } + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + @java.lang.Override + public int getUsersCount() { + return users_.size(); + } + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getUsers(int index) { + return users_.get(index); + } + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder getUsersOrBuilder( + int index) { + return users_.get(index); + } + + public static final int SELF_FIELD_NUMBER = 5; + private com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser self_; + /** + *
+   * A reference to the current user and their properties.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + * @return Whether the self field is set. + */ + @java.lang.Override + public boolean hasSelf() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * A reference to the current user and their properties.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + * @return The self. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getSelf() { + return self_ == null ? com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance() : self_; + } + /** + *
+   * A reference to the current user and their properties.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder getSelfOrBuilder() { + return self_ == null ? com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance() : self_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ticket_); + } + if (idCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, id_); + } + if (idCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, id_); + } + for (int i = 0; i < users_.size(); i++) { + output.writeMessage(4, users_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getSelf()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ticket_); + } + if (idCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, id_); + } + if (idCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, id_); + } + for (int i = 0; i < users_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, users_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getSelf()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchmakerMatched)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchmakerMatched other = (com.heroiclabs.nakama.rtapi.MatchmakerMatched) obj; + + if (!getTicket() + .equals(other.getTicket())) return false; + if (!getUsersList() + .equals(other.getUsersList())) return false; + if (hasSelf() != other.hasSelf()) return false; + if (hasSelf()) { + if (!getSelf() + .equals(other.getSelf())) return false; + } + if (!getIdCase().equals(other.getIdCase())) return false; + switch (idCase_) { + case 2: + if (!getMatchId() + .equals(other.getMatchId())) return false; + break; + case 3: + if (!getToken() + .equals(other.getToken())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TICKET_FIELD_NUMBER; + hash = (53 * hash) + getTicket().hashCode(); + if (getUsersCount() > 0) { + hash = (37 * hash) + USERS_FIELD_NUMBER; + hash = (53 * hash) + getUsersList().hashCode(); + } + if (hasSelf()) { + hash = (37 * hash) + SELF_FIELD_NUMBER; + hash = (53 * hash) + getSelf().hashCode(); + } + switch (idCase_) { + case 2: + hash = (37 * hash) + MATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getMatchId().hashCode(); + break; + case 3: + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchmakerMatched prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A successful matchmaking result.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerMatched} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchmakerMatched) + com.heroiclabs.nakama.rtapi.MatchmakerMatchedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.class, com.heroiclabs.nakama.rtapi.MatchmakerMatched.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchmakerMatched.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getUsersFieldBuilder(); + getSelfFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ticket_ = ""; + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + } else { + users_ = null; + usersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + idCase_ = 0; + id_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerMatched_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched build() { + com.heroiclabs.nakama.rtapi.MatchmakerMatched result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched buildPartial() { + com.heroiclabs.nakama.rtapi.MatchmakerMatched result = new com.heroiclabs.nakama.rtapi.MatchmakerMatched(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.MatchmakerMatched result) { + if (usersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + users_ = java.util.Collections.unmodifiableList(users_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.users_ = users_; + } else { + result.users_ = usersBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchmakerMatched result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ticket_ = ticket_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.self_ = selfBuilder_ == null + ? self_ + : selfBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.heroiclabs.nakama.rtapi.MatchmakerMatched result) { + result.idCase_ = idCase_; + result.id_ = this.id_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchmakerMatched) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchmakerMatched)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchmakerMatched other) { + if (other == com.heroiclabs.nakama.rtapi.MatchmakerMatched.getDefaultInstance()) return this; + if (!other.getTicket().isEmpty()) { + ticket_ = other.ticket_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (usersBuilder_ == null) { + if (!other.users_.isEmpty()) { + if (users_.isEmpty()) { + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureUsersIsMutable(); + users_.addAll(other.users_); + } + onChanged(); + } + } else { + if (!other.users_.isEmpty()) { + if (usersBuilder_.isEmpty()) { + usersBuilder_.dispose(); + usersBuilder_ = null; + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000008); + usersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getUsersFieldBuilder() : null; + } else { + usersBuilder_.addAllMessages(other.users_); + } + } + } + if (other.hasSelf()) { + mergeSelf(other.getSelf()); + } + switch (other.getIdCase()) { + case MATCH_ID: { + idCase_ = 2; + id_ = other.id_; + onChanged(); + break; + } + case TOKEN: { + idCase_ = 3; + id_ = other.id_; + onChanged(); + break; + } + case ID_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + ticket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 2; + id_ = s; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + idCase_ = 3; + id_ = s; + break; + } // case 26 + case 34: { + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser m = + input.readMessage( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.parser(), + extensionRegistry); + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(m); + } else { + usersBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + input.readMessage( + getSelfFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int idCase_ = 0; + private java.lang.Object id_; + public IdCase + getIdCase() { + return IdCase.forNumber( + idCase_); + } + + public Builder clearId() { + idCase_ = 0; + id_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object ticket_ = ""; + /** + *
+     * The matchmaking ticket that has completed.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The matchmaking ticket that has completed.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The matchmaking ticket that has completed.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @param value The ticket to set. + * @return This builder for chaining. + */ + public Builder setTicket( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ticket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The matchmaking ticket that has completed.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return This builder for chaining. + */ + public Builder clearTicket() { + ticket_ = getDefaultInstance().getTicket(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The matchmaking ticket that has completed.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @param value The bytes for ticket to set. + * @return This builder for chaining. + */ + public Builder setTicketBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ticket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + *
+     * Match ID.
+     * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return Whether the matchId field is set. + */ + @java.lang.Override + public boolean hasMatchId() { + return idCase_ == 2; + } + /** + *
+     * Match ID.
+     * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return The matchId. + */ + @java.lang.Override + public java.lang.String getMatchId() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 2) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Match ID.
+     * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMatchIdBytes() { + java.lang.Object ref = ""; + if (idCase_ == 2) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 2) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Match ID.
+     * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @param value The matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + /** + *
+     * Match ID.
+     * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return This builder for chaining. + */ + public Builder clearMatchId() { + if (idCase_ == 2) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Match ID.
+     * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @param value The bytes for matchId to set. + * @return This builder for chaining. + */ + public Builder setMatchIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idCase_ = 2; + id_ = value; + onChanged(); + return this; + } + + /** + *
+     * Match join token.
+     * 
+ * + * string token = 3 [json_name = "token"]; + * @return Whether the token field is set. + */ + @java.lang.Override + public boolean hasToken() { + return idCase_ == 3; + } + /** + *
+     * Match join token.
+     * 
+ * + * string token = 3 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idCase_ == 3) { + id_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Match join token.
+     * 
+ * + * string token = 3 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = ""; + if (idCase_ == 3) { + ref = id_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idCase_ == 3) { + id_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Match join token.
+     * 
+ * + * string token = 3 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idCase_ = 3; + id_ = value; + onChanged(); + return this; + } + /** + *
+     * Match join token.
+     * 
+ * + * string token = 3 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + if (idCase_ == 3) { + idCase_ = 0; + id_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Match join token.
+     * 
+ * + * string token = 3 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idCase_ = 3; + id_ = value; + onChanged(); + return this; + } + + private java.util.List users_ = + java.util.Collections.emptyList(); + private void ensureUsersIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + users_ = new java.util.ArrayList(users_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder> usersBuilder_; + + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public java.util.List getUsersList() { + if (usersBuilder_ == null) { + return java.util.Collections.unmodifiableList(users_); + } else { + return usersBuilder_.getMessageList(); + } + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public int getUsersCount() { + if (usersBuilder_ == null) { + return users_.size(); + } else { + return usersBuilder_.getCount(); + } + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getUsers(int index) { + if (usersBuilder_ == null) { + return users_.get(index); + } else { + return usersBuilder_.getMessage(index); + } + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder setUsers( + int index, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.set(index, value); + onChanged(); + } else { + usersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder setUsers( + int index, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.set(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder addUsers(com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(value); + onChanged(); + } else { + usersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder addUsers( + int index, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(index, value); + onChanged(); + } else { + usersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder addUsers( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder addUsers( + int index, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder addAllUsers( + java.lang.Iterable values) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, users_); + onChanged(); + } else { + usersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder clearUsers() { + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + usersBuilder_.clear(); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public Builder removeUsers(int index) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.remove(index); + onChanged(); + } else { + usersBuilder_.remove(index); + } + return this; + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder getUsersBuilder( + int index) { + return getUsersFieldBuilder().getBuilder(index); + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder getUsersOrBuilder( + int index) { + if (usersBuilder_ == null) { + return users_.get(index); } else { + return usersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public java.util.List + getUsersOrBuilderList() { + if (usersBuilder_ != null) { + return usersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(users_); + } + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder addUsersBuilder() { + return getUsersFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance()); + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder addUsersBuilder( + int index) { + return getUsersFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance()); + } + /** + *
+     * The users that have been matched together, and information about their matchmaking data.
+     * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + public java.util.List + getUsersBuilderList() { + return getUsersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder> + getUsersFieldBuilder() { + if (usersBuilder_ == null) { + usersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder>( + users_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + users_ = null; + } + return usersBuilder_; + } + + private com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser self_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder> selfBuilder_; + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + * @return Whether the self field is set. + */ + public boolean hasSelf() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + * @return The self. + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getSelf() { + if (selfBuilder_ == null) { + return self_ == null ? com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance() : self_; + } else { + return selfBuilder_.getMessage(); + } + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + public Builder setSelf(com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser value) { + if (selfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + self_ = value; + } else { + selfBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + public Builder setSelf( + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder builderForValue) { + if (selfBuilder_ == null) { + self_ = builderForValue.build(); + } else { + selfBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + public Builder mergeSelf(com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser value) { + if (selfBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + self_ != null && + self_ != com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance()) { + getSelfBuilder().mergeFrom(value); + } else { + self_ = value; + } + } else { + selfBuilder_.mergeFrom(value); + } + if (self_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + public Builder clearSelf() { + bitField0_ = (bitField0_ & ~0x00000010); + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder getSelfBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSelfFieldBuilder().getBuilder(); + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder getSelfOrBuilder() { + if (selfBuilder_ != null) { + return selfBuilder_.getMessageOrBuilder(); + } else { + return self_ == null ? + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.getDefaultInstance() : self_; + } + } + /** + *
+     * A reference to the current user and their properties.
+     * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder> + getSelfFieldBuilder() { + if (selfBuilder_ == null) { + selfBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser.Builder, com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder>( + getSelf(), + getParentForChildren(), + isClean()); + self_ = null; + } + return selfBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchmakerMatched) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchmakerMatched) + private static final com.heroiclabs.nakama.rtapi.MatchmakerMatched DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchmakerMatched(); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerMatched getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchmakerMatched parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerMatched getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatchedOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatchedOrBuilder.java new file mode 100644 index 00000000..d284e32a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerMatchedOrBuilder.java @@ -0,0 +1,162 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchmakerMatchedOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchmakerMatched) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The matchmaking ticket that has completed.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + java.lang.String getTicket(); + /** + *
+   * The matchmaking ticket that has completed.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + com.google.protobuf.ByteString + getTicketBytes(); + + /** + *
+   * Match ID.
+   * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return Whether the matchId field is set. + */ + boolean hasMatchId(); + /** + *
+   * Match ID.
+   * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return The matchId. + */ + java.lang.String getMatchId(); + /** + *
+   * Match ID.
+   * 
+ * + * string match_id = 2 [json_name = "matchId"]; + * @return The bytes for matchId. + */ + com.google.protobuf.ByteString + getMatchIdBytes(); + + /** + *
+   * Match join token.
+   * 
+ * + * string token = 3 [json_name = "token"]; + * @return Whether the token field is set. + */ + boolean hasToken(); + /** + *
+   * Match join token.
+   * 
+ * + * string token = 3 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * Match join token.
+   * 
+ * + * string token = 3 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + java.util.List + getUsersList(); + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getUsers(int index); + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + int getUsersCount(); + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + java.util.List + getUsersOrBuilderList(); + /** + *
+   * The users that have been matched together, and information about their matchmaking data.
+   * 
+ * + * repeated .nakama.realtime.MatchmakerMatched.MatchmakerUser users = 4 [json_name = "users"]; + */ + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder getUsersOrBuilder( + int index); + + /** + *
+   * A reference to the current user and their properties.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + * @return Whether the self field is set. + */ + boolean hasSelf(); + /** + *
+   * A reference to the current user and their properties.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + * @return The self. + */ + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUser getSelf(); + /** + *
+   * A reference to the current user and their properties.
+   * 
+ * + * .nakama.realtime.MatchmakerMatched.MatchmakerUser self = 5 [json_name = "self"]; + */ + com.heroiclabs.nakama.rtapi.MatchmakerMatched.MatchmakerUserOrBuilder getSelfOrBuilder(); + + com.heroiclabs.nakama.rtapi.MatchmakerMatched.IdCase getIdCase(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemove.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemove.java new file mode 100644 index 00000000..dcc13be3 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemove.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Cancel an existing ongoing matchmaking process.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerRemove} + */ +public final class MatchmakerRemove extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchmakerRemove) + MatchmakerRemoveOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchmakerRemove.class.getName()); + } + // Use MatchmakerRemove.newBuilder() to construct. + private MatchmakerRemove(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchmakerRemove() { + ticket_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerRemove.class, com.heroiclabs.nakama.rtapi.MatchmakerRemove.Builder.class); + } + + public static final int TICKET_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object ticket_ = ""; + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + @java.lang.Override + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } + } + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ticket_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ticket_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchmakerRemove)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchmakerRemove other = (com.heroiclabs.nakama.rtapi.MatchmakerRemove) obj; + + if (!getTicket() + .equals(other.getTicket())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TICKET_FIELD_NUMBER; + hash = (53 * hash) + getTicket().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchmakerRemove prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Cancel an existing ongoing matchmaking process.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerRemove} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchmakerRemove) + com.heroiclabs.nakama.rtapi.MatchmakerRemoveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerRemove.class, com.heroiclabs.nakama.rtapi.MatchmakerRemove.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchmakerRemove.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ticket_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerRemove_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemove getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemove build() { + com.heroiclabs.nakama.rtapi.MatchmakerRemove result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemove buildPartial() { + com.heroiclabs.nakama.rtapi.MatchmakerRemove result = new com.heroiclabs.nakama.rtapi.MatchmakerRemove(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchmakerRemove result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ticket_ = ticket_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchmakerRemove) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchmakerRemove)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchmakerRemove other) { + if (other == com.heroiclabs.nakama.rtapi.MatchmakerRemove.getDefaultInstance()) return this; + if (!other.getTicket().isEmpty()) { + ticket_ = other.ticket_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + ticket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object ticket_ = ""; + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @param value The ticket to set. + * @return This builder for chaining. + */ + public Builder setTicket( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ticket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return This builder for chaining. + */ + public Builder clearTicket() { + ticket_ = getDefaultInstance().getTicket(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @param value The bytes for ticket to set. + * @return This builder for chaining. + */ + public Builder setTicketBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ticket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchmakerRemove) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchmakerRemove) + private static final com.heroiclabs.nakama.rtapi.MatchmakerRemove DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchmakerRemove(); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerRemove getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchmakerRemove parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerRemove getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemoveOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemoveOrBuilder.java new file mode 100644 index 00000000..25ddfb6b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerRemoveOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchmakerRemoveOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchmakerRemove) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + java.lang.String getTicket(); + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + com.google.protobuf.ByteString + getTicketBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicket.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicket.java new file mode 100644 index 00000000..24041cb5 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicket.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A ticket representing a new matchmaking process.
+ * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerTicket} + */ +public final class MatchmakerTicket extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.MatchmakerTicket) + MatchmakerTicketOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + MatchmakerTicket.class.getName()); + } + // Use MatchmakerTicket.newBuilder() to construct. + private MatchmakerTicket(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MatchmakerTicket() { + ticket_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerTicket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerTicket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerTicket.class, com.heroiclabs.nakama.rtapi.MatchmakerTicket.Builder.class); + } + + public static final int TICKET_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object ticket_ = ""; + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + @java.lang.Override + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } + } + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ticket_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ticket_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.MatchmakerTicket)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.MatchmakerTicket other = (com.heroiclabs.nakama.rtapi.MatchmakerTicket) obj; + + if (!getTicket() + .equals(other.getTicket())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TICKET_FIELD_NUMBER; + hash = (53 * hash) + getTicket().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.MatchmakerTicket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A ticket representing a new matchmaking process.
+   * 
+ * + * Protobuf type {@code nakama.realtime.MatchmakerTicket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.MatchmakerTicket) + com.heroiclabs.nakama.rtapi.MatchmakerTicketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerTicket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerTicket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.MatchmakerTicket.class, com.heroiclabs.nakama.rtapi.MatchmakerTicket.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.MatchmakerTicket.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ticket_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_MatchmakerTicket_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicket getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicket build() { + com.heroiclabs.nakama.rtapi.MatchmakerTicket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicket buildPartial() { + com.heroiclabs.nakama.rtapi.MatchmakerTicket result = new com.heroiclabs.nakama.rtapi.MatchmakerTicket(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.MatchmakerTicket result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ticket_ = ticket_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.MatchmakerTicket) { + return mergeFrom((com.heroiclabs.nakama.rtapi.MatchmakerTicket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.MatchmakerTicket other) { + if (other == com.heroiclabs.nakama.rtapi.MatchmakerTicket.getDefaultInstance()) return this; + if (!other.getTicket().isEmpty()) { + ticket_ = other.ticket_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + ticket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object ticket_ = ""; + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @param value The ticket to set. + * @return This builder for chaining. + */ + public Builder setTicket( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ticket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return This builder for chaining. + */ + public Builder clearTicket() { + ticket_ = getDefaultInstance().getTicket(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @param value The bytes for ticket to set. + * @return This builder for chaining. + */ + public Builder setTicketBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ticket_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.MatchmakerTicket) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.MatchmakerTicket) + private static final com.heroiclabs.nakama.rtapi.MatchmakerTicket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.MatchmakerTicket(); + } + + public static com.heroiclabs.nakama.rtapi.MatchmakerTicket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchmakerTicket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.MatchmakerTicket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicketOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicketOrBuilder.java new file mode 100644 index 00000000..f6115f19 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/MatchmakerTicketOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface MatchmakerTicketOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.MatchmakerTicket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The ticket. + */ + java.lang.String getTicket(); + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 1 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + com.google.protobuf.ByteString + getTicketBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Notifications.java b/src/main/java/com/heroiclabs/nakama/rtapi/Notifications.java new file mode 100644 index 00000000..554190b5 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Notifications.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A collection of zero or more notifications.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Notifications} + */ +public final class Notifications extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Notifications) + NotificationsOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Notifications.class.getName()); + } + // Use Notifications.newBuilder() to construct. + private Notifications(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Notifications() { + notifications_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Notifications_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Notifications_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Notifications.class, com.heroiclabs.nakama.rtapi.Notifications.Builder.class); + } + + public static final int NOTIFICATIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List notifications_; + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public java.util.List getNotificationsList() { + return notifications_; + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public java.util.List + getNotificationsOrBuilderList() { + return notifications_; + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public int getNotificationsCount() { + return notifications_.size(); + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.Notification getNotifications(int index) { + return notifications_.get(index); + } + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.api.NotificationOrBuilder getNotificationsOrBuilder( + int index) { + return notifications_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < notifications_.size(); i++) { + output.writeMessage(1, notifications_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < notifications_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, notifications_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Notifications)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Notifications other = (com.heroiclabs.nakama.rtapi.Notifications) obj; + + if (!getNotificationsList() + .equals(other.getNotificationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNotificationsCount() > 0) { + hash = (37 * hash) + NOTIFICATIONS_FIELD_NUMBER; + hash = (53 * hash) + getNotificationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Notifications parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Notifications parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Notifications parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Notifications prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A collection of zero or more notifications.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Notifications} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Notifications) + com.heroiclabs.nakama.rtapi.NotificationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Notifications_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Notifications_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Notifications.class, com.heroiclabs.nakama.rtapi.Notifications.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Notifications.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (notificationsBuilder_ == null) { + notifications_ = java.util.Collections.emptyList(); + } else { + notifications_ = null; + notificationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Notifications_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Notifications getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Notifications build() { + com.heroiclabs.nakama.rtapi.Notifications result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Notifications buildPartial() { + com.heroiclabs.nakama.rtapi.Notifications result = new com.heroiclabs.nakama.rtapi.Notifications(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.Notifications result) { + if (notificationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + notifications_ = java.util.Collections.unmodifiableList(notifications_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.notifications_ = notifications_; + } else { + result.notifications_ = notificationsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Notifications result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Notifications) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Notifications)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Notifications other) { + if (other == com.heroiclabs.nakama.rtapi.Notifications.getDefaultInstance()) return this; + if (notificationsBuilder_ == null) { + if (!other.notifications_.isEmpty()) { + if (notifications_.isEmpty()) { + notifications_ = other.notifications_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNotificationsIsMutable(); + notifications_.addAll(other.notifications_); + } + onChanged(); + } + } else { + if (!other.notifications_.isEmpty()) { + if (notificationsBuilder_.isEmpty()) { + notificationsBuilder_.dispose(); + notificationsBuilder_ = null; + notifications_ = other.notifications_; + bitField0_ = (bitField0_ & ~0x00000001); + notificationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getNotificationsFieldBuilder() : null; + } else { + notificationsBuilder_.addAllMessages(other.notifications_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.api.Notification m = + input.readMessage( + com.heroiclabs.nakama.api.Notification.parser(), + extensionRegistry); + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.add(m); + } else { + notificationsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List notifications_ = + java.util.Collections.emptyList(); + private void ensureNotificationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + notifications_ = new java.util.ArrayList(notifications_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Notification, com.heroiclabs.nakama.api.Notification.Builder, com.heroiclabs.nakama.api.NotificationOrBuilder> notificationsBuilder_; + + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public java.util.List getNotificationsList() { + if (notificationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(notifications_); + } else { + return notificationsBuilder_.getMessageList(); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public int getNotificationsCount() { + if (notificationsBuilder_ == null) { + return notifications_.size(); + } else { + return notificationsBuilder_.getCount(); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification getNotifications(int index) { + if (notificationsBuilder_ == null) { + return notifications_.get(index); + } else { + return notificationsBuilder_.getMessage(index); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder setNotifications( + int index, com.heroiclabs.nakama.api.Notification value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotificationsIsMutable(); + notifications_.set(index, value); + onChanged(); + } else { + notificationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder setNotifications( + int index, com.heroiclabs.nakama.api.Notification.Builder builderForValue) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.set(index, builderForValue.build()); + onChanged(); + } else { + notificationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications(com.heroiclabs.nakama.api.Notification value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotificationsIsMutable(); + notifications_.add(value); + onChanged(); + } else { + notificationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications( + int index, com.heroiclabs.nakama.api.Notification value) { + if (notificationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNotificationsIsMutable(); + notifications_.add(index, value); + onChanged(); + } else { + notificationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications( + com.heroiclabs.nakama.api.Notification.Builder builderForValue) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.add(builderForValue.build()); + onChanged(); + } else { + notificationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addNotifications( + int index, com.heroiclabs.nakama.api.Notification.Builder builderForValue) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.add(index, builderForValue.build()); + onChanged(); + } else { + notificationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder addAllNotifications( + java.lang.Iterable values) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, notifications_); + onChanged(); + } else { + notificationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder clearNotifications() { + if (notificationsBuilder_ == null) { + notifications_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + notificationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public Builder removeNotifications(int index) { + if (notificationsBuilder_ == null) { + ensureNotificationsIsMutable(); + notifications_.remove(index); + onChanged(); + } else { + notificationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification.Builder getNotificationsBuilder( + int index) { + return getNotificationsFieldBuilder().getBuilder(index); + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.NotificationOrBuilder getNotificationsOrBuilder( + int index) { + if (notificationsBuilder_ == null) { + return notifications_.get(index); } else { + return notificationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public java.util.List + getNotificationsOrBuilderList() { + if (notificationsBuilder_ != null) { + return notificationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(notifications_); + } + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification.Builder addNotificationsBuilder() { + return getNotificationsFieldBuilder().addBuilder( + com.heroiclabs.nakama.api.Notification.getDefaultInstance()); + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public com.heroiclabs.nakama.api.Notification.Builder addNotificationsBuilder( + int index) { + return getNotificationsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.api.Notification.getDefaultInstance()); + } + /** + *
+     * Collection of notifications.
+     * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + public java.util.List + getNotificationsBuilderList() { + return getNotificationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Notification, com.heroiclabs.nakama.api.Notification.Builder, com.heroiclabs.nakama.api.NotificationOrBuilder> + getNotificationsFieldBuilder() { + if (notificationsBuilder_ == null) { + notificationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.api.Notification, com.heroiclabs.nakama.api.Notification.Builder, com.heroiclabs.nakama.api.NotificationOrBuilder>( + notifications_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + notifications_ = null; + } + return notificationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Notifications) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Notifications) + private static final com.heroiclabs.nakama.rtapi.Notifications DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Notifications(); + } + + public static com.heroiclabs.nakama.rtapi.Notifications getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Notifications parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Notifications getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/NotificationsOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/NotificationsOrBuilder.java new file mode 100644 index 00000000..e3c63e31 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/NotificationsOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface NotificationsOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Notifications) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + java.util.List + getNotificationsList(); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + com.heroiclabs.nakama.api.Notification getNotifications(int index); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + int getNotificationsCount(); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + java.util.List + getNotificationsOrBuilderList(); + /** + *
+   * Collection of notifications.
+   * 
+ * + * repeated .nakama.api.Notification notifications = 1 [json_name = "notifications"]; + */ + com.heroiclabs.nakama.api.NotificationOrBuilder getNotificationsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Party.java b/src/main/java/com/heroiclabs/nakama/rtapi/Party.java new file mode 100644 index 00000000..fcd8460c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Party.java @@ -0,0 +1,1623 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Incoming information about a party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Party} + */ +public final class Party extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Party) + PartyOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Party.class.getName()); + } + // Use Party.newBuilder() to construct. + private Party(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Party() { + partyId_ = ""; + presences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Party_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Party_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Party.class, com.heroiclabs.nakama.rtapi.Party.Builder.class); + } + + private int bitField0_; + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Unique party identifier.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Unique party identifier.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPEN_FIELD_NUMBER = 2; + private boolean open_ = false; + /** + *
+   * Open flag.
+   * 
+ * + * bool open = 2 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public boolean getOpen() { + return open_; + } + + public static final int MAX_SIZE_FIELD_NUMBER = 3; + private int maxSize_ = 0; + /** + *
+   * Maximum number of party members.
+   * 
+ * + * int32 max_size = 3 [json_name = "maxSize"]; + * @return The maxSize. + */ + @java.lang.Override + public int getMaxSize() { + return maxSize_; + } + + public static final int SELF_FIELD_NUMBER = 4; + private com.heroiclabs.nakama.rtapi.UserPresence self_; + /** + *
+   * Self.
+   * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + * @return Whether the self field is set. + */ + @java.lang.Override + public boolean hasSelf() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Self.
+   * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + * @return The self. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getSelf() { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + /** + *
+   * Self.
+   * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder() { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + + public static final int LEADER_FIELD_NUMBER = 5; + private com.heroiclabs.nakama.rtapi.UserPresence leader_; + /** + *
+   * Leader.
+   * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + * @return Whether the leader field is set. + */ + @java.lang.Override + public boolean hasLeader() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * Leader.
+   * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + * @return The leader. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getLeader() { + return leader_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : leader_; + } + /** + *
+   * Leader.
+   * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeaderOrBuilder() { + return leader_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : leader_; + } + + public static final int PRESENCES_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private java.util.List presences_; + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List getPresencesList() { + return presences_; + } + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List + getPresencesOrBuilderList() { + return presences_; + } + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + @java.lang.Override + public int getPresencesCount() { + return presences_.size(); + } + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + return presences_.get(index); + } + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + return presences_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (open_ != false) { + output.writeBool(2, open_); + } + if (maxSize_ != 0) { + output.writeInt32(3, maxSize_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getSelf()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getLeader()); + } + for (int i = 0; i < presences_.size(); i++) { + output.writeMessage(6, presences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (open_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, open_); + } + if (maxSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, maxSize_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getSelf()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLeader()); + } + for (int i = 0; i < presences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, presences_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Party)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Party other = (com.heroiclabs.nakama.rtapi.Party) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (getOpen() + != other.getOpen()) return false; + if (getMaxSize() + != other.getMaxSize()) return false; + if (hasSelf() != other.hasSelf()) return false; + if (hasSelf()) { + if (!getSelf() + .equals(other.getSelf())) return false; + } + if (hasLeader() != other.hasLeader()) return false; + if (hasLeader()) { + if (!getLeader() + .equals(other.getLeader())) return false; + } + if (!getPresencesList() + .equals(other.getPresencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (37 * hash) + OPEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOpen()); + hash = (37 * hash) + MAX_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxSize(); + if (hasSelf()) { + hash = (37 * hash) + SELF_FIELD_NUMBER; + hash = (53 * hash) + getSelf().hashCode(); + } + if (hasLeader()) { + hash = (37 * hash) + LEADER_FIELD_NUMBER; + hash = (53 * hash) + getLeader().hashCode(); + } + if (getPresencesCount() > 0) { + hash = (37 * hash) + PRESENCES_FIELD_NUMBER; + hash = (53 * hash) + getPresencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Party parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Party parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Party parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Party prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Incoming information about a party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Party} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Party) + com.heroiclabs.nakama.rtapi.PartyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Party_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Party_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Party.class, com.heroiclabs.nakama.rtapi.Party.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Party.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getSelfFieldBuilder(); + getLeaderFieldBuilder(); + getPresencesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + open_ = false; + maxSize_ = 0; + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + leader_ = null; + if (leaderBuilder_ != null) { + leaderBuilder_.dispose(); + leaderBuilder_ = null; + } + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + } else { + presences_ = null; + presencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Party_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Party getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Party.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Party build() { + com.heroiclabs.nakama.rtapi.Party result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Party buildPartial() { + com.heroiclabs.nakama.rtapi.Party result = new com.heroiclabs.nakama.rtapi.Party(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.Party result) { + if (presencesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + presences_ = java.util.Collections.unmodifiableList(presences_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.presences_ = presences_; + } else { + result.presences_ = presencesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Party result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.open_ = open_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxSize_ = maxSize_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.self_ = selfBuilder_ == null + ? self_ + : selfBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.leader_ = leaderBuilder_ == null + ? leader_ + : leaderBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Party) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Party)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Party other) { + if (other == com.heroiclabs.nakama.rtapi.Party.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getOpen() != false) { + setOpen(other.getOpen()); + } + if (other.getMaxSize() != 0) { + setMaxSize(other.getMaxSize()); + } + if (other.hasSelf()) { + mergeSelf(other.getSelf()); + } + if (other.hasLeader()) { + mergeLeader(other.getLeader()); + } + if (presencesBuilder_ == null) { + if (!other.presences_.isEmpty()) { + if (presences_.isEmpty()) { + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensurePresencesIsMutable(); + presences_.addAll(other.presences_); + } + onChanged(); + } + } else { + if (!other.presences_.isEmpty()) { + if (presencesBuilder_.isEmpty()) { + presencesBuilder_.dispose(); + presencesBuilder_ = null; + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000020); + presencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPresencesFieldBuilder() : null; + } else { + presencesBuilder_.addAllMessages(other.presences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + open_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + maxSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getSelfFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getLeaderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(m); + } else { + presencesBuilder_.addMessage(m); + } + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Unique party identifier.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Unique party identifier.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Unique party identifier.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Unique party identifier.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Unique party identifier.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean open_ ; + /** + *
+     * Open flag.
+     * 
+ * + * bool open = 2 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public boolean getOpen() { + return open_; + } + /** + *
+     * Open flag.
+     * 
+ * + * bool open = 2 [json_name = "open"]; + * @param value The open to set. + * @return This builder for chaining. + */ + public Builder setOpen(boolean value) { + + open_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Open flag.
+     * 
+ * + * bool open = 2 [json_name = "open"]; + * @return This builder for chaining. + */ + public Builder clearOpen() { + bitField0_ = (bitField0_ & ~0x00000002); + open_ = false; + onChanged(); + return this; + } + + private int maxSize_ ; + /** + *
+     * Maximum number of party members.
+     * 
+ * + * int32 max_size = 3 [json_name = "maxSize"]; + * @return The maxSize. + */ + @java.lang.Override + public int getMaxSize() { + return maxSize_; + } + /** + *
+     * Maximum number of party members.
+     * 
+ * + * int32 max_size = 3 [json_name = "maxSize"]; + * @param value The maxSize to set. + * @return This builder for chaining. + */ + public Builder setMaxSize(int value) { + + maxSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Maximum number of party members.
+     * 
+ * + * int32 max_size = 3 [json_name = "maxSize"]; + * @return This builder for chaining. + */ + public Builder clearMaxSize() { + bitField0_ = (bitField0_ & ~0x00000004); + maxSize_ = 0; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.rtapi.UserPresence self_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> selfBuilder_; + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + * @return Whether the self field is set. + */ + public boolean hasSelf() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + * @return The self. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getSelf() { + if (selfBuilder_ == null) { + return self_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } else { + return selfBuilder_.getMessage(); + } + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + public Builder setSelf(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (selfBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + self_ = value; + } else { + selfBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + public Builder setSelf( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (selfBuilder_ == null) { + self_ = builderForValue.build(); + } else { + selfBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + public Builder mergeSelf(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (selfBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + self_ != null && + self_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getSelfBuilder().mergeFrom(value); + } else { + self_ = value; + } + } else { + selfBuilder_.mergeFrom(value); + } + if (self_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + public Builder clearSelf() { + bitField0_ = (bitField0_ & ~0x00000008); + self_ = null; + if (selfBuilder_ != null) { + selfBuilder_.dispose(); + selfBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getSelfBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSelfFieldBuilder().getBuilder(); + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder() { + if (selfBuilder_ != null) { + return selfBuilder_.getMessageOrBuilder(); + } else { + return self_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : self_; + } + } + /** + *
+     * Self.
+     * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getSelfFieldBuilder() { + if (selfBuilder_ == null) { + selfBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getSelf(), + getParentForChildren(), + isClean()); + self_ = null; + } + return selfBuilder_; + } + + private com.heroiclabs.nakama.rtapi.UserPresence leader_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> leaderBuilder_; + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + * @return Whether the leader field is set. + */ + public boolean hasLeader() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + * @return The leader. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getLeader() { + if (leaderBuilder_ == null) { + return leader_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : leader_; + } else { + return leaderBuilder_.getMessage(); + } + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + public Builder setLeader(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leaderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + leader_ = value; + } else { + leaderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + public Builder setLeader( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leaderBuilder_ == null) { + leader_ = builderForValue.build(); + } else { + leaderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + public Builder mergeLeader(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leaderBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + leader_ != null && + leader_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getLeaderBuilder().mergeFrom(value); + } else { + leader_ = value; + } + } else { + leaderBuilder_.mergeFrom(value); + } + if (leader_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + public Builder clearLeader() { + bitField0_ = (bitField0_ & ~0x00000010); + leader_ = null; + if (leaderBuilder_ != null) { + leaderBuilder_.dispose(); + leaderBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getLeaderBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLeaderFieldBuilder().getBuilder(); + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeaderOrBuilder() { + if (leaderBuilder_ != null) { + return leaderBuilder_.getMessageOrBuilder(); + } else { + return leader_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : leader_; + } + } + /** + *
+     * Leader.
+     * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getLeaderFieldBuilder() { + if (leaderBuilder_ == null) { + leaderBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getLeader(), + getParentForChildren(), + isClean()); + leader_ = null; + } + return leaderBuilder_; + } + + private java.util.List presences_ = + java.util.Collections.emptyList(); + private void ensurePresencesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + presences_ = new java.util.ArrayList(presences_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presencesBuilder_; + + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public java.util.List getPresencesList() { + if (presencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(presences_); + } else { + return presencesBuilder_.getMessageList(); + } + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public int getPresencesCount() { + if (presencesBuilder_ == null) { + return presences_.size(); + } else { + return presencesBuilder_.getCount(); + } + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); + } else { + return presencesBuilder_.getMessage(index); + } + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.set(index, value); + onChanged(); + } else { + presencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.set(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder addPresences(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(value); + onChanged(); + } else { + presencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(index, value); + onChanged(); + } else { + presencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder addPresences( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder addAllPresences( + java.lang.Iterable values) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, presences_); + onChanged(); + } else { + presencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder clearPresences() { + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + presencesBuilder_.clear(); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public Builder removePresences(int index) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.remove(index); + onChanged(); + } else { + presencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresencesBuilder( + int index) { + return getPresencesFieldBuilder().getBuilder(index); + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); } else { + return presencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public java.util.List + getPresencesOrBuilderList() { + if (presencesBuilder_ != null) { + return presencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(presences_); + } + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder() { + return getPresencesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder( + int index) { + return getPresencesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * All current party members.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + public java.util.List + getPresencesBuilderList() { + return getPresencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresencesFieldBuilder() { + if (presencesBuilder_ == null) { + presencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + presences_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + presences_ = null; + } + return presencesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Party) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Party) + private static final com.heroiclabs.nakama.rtapi.Party DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Party(); + } + + public static com.heroiclabs.nakama.rtapi.Party getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Party parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Party getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyAccept.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyAccept.java new file mode 100644 index 00000000..9b9d2a55 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyAccept.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Accept a request to join.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyAccept} + */ +public final class PartyAccept extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyAccept) + PartyAcceptOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyAccept.class.getName()); + } + // Use PartyAccept.newBuilder() to construct. + private PartyAccept(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyAccept() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyAccept_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyAccept_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyAccept.class, com.heroiclabs.nakama.rtapi.PartyAccept.Builder.class); + } + + private int bitField0_; + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to accept a join request for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to accept a join request for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCE_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + /** + *
+   * The presence to accept as a party member.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + @java.lang.Override + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The presence to accept as a party member.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + /** + *
+   * The presence to accept as a party member.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPresence()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPresence()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyAccept)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyAccept other = (com.heroiclabs.nakama.rtapi.PartyAccept) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (hasPresence() != other.hasPresence()) return false; + if (hasPresence()) { + if (!getPresence() + .equals(other.getPresence())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (hasPresence()) { + hash = (37 * hash) + PRESENCE_FIELD_NUMBER; + hash = (53 * hash) + getPresence().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyAccept parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyAccept parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyAccept parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyAccept prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Accept a request to join.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyAccept} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyAccept) + com.heroiclabs.nakama.rtapi.PartyAcceptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyAccept_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyAccept_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyAccept.class, com.heroiclabs.nakama.rtapi.PartyAccept.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyAccept.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresenceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyAccept_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAccept getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAccept build() { + com.heroiclabs.nakama.rtapi.PartyAccept result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAccept buildPartial() { + com.heroiclabs.nakama.rtapi.PartyAccept result = new com.heroiclabs.nakama.rtapi.PartyAccept(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyAccept result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.presence_ = presenceBuilder_ == null + ? presence_ + : presenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyAccept) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyAccept)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyAccept other) { + if (other == com.heroiclabs.nakama.rtapi.PartyAccept.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPresence()) { + mergePresence(other.getPresence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPresenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to accept a join request for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to accept a join request for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to accept a join request for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to accept a join request for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to accept a join request for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presenceBuilder_; + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + public boolean hasPresence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + if (presenceBuilder_ == null) { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } else { + return presenceBuilder_.getMessage(); + } + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + presence_ = value; + } else { + presenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presenceBuilder_ == null) { + presence_ = builderForValue.build(); + } else { + presenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder mergePresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + presence_ != null && + presence_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getPresenceBuilder().mergeFrom(value); + } else { + presence_ = value; + } + } else { + presenceBuilder_.mergeFrom(value); + } + if (presence_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder clearPresence() { + bitField0_ = (bitField0_ & ~0x00000002); + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPresenceFieldBuilder().getBuilder(); + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + if (presenceBuilder_ != null) { + return presenceBuilder_.getMessageOrBuilder(); + } else { + return presence_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + } + /** + *
+     * The presence to accept as a party member.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresenceFieldBuilder() { + if (presenceBuilder_ == null) { + presenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getPresence(), + getParentForChildren(), + isClean()); + presence_ = null; + } + return presenceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyAccept) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyAccept) + private static final com.heroiclabs.nakama.rtapi.PartyAccept DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyAccept(); + } + + public static com.heroiclabs.nakama.rtapi.PartyAccept getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyAccept parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyAccept getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyAcceptOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyAcceptOrBuilder.java new file mode 100644 index 00000000..9b89858c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyAcceptOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyAcceptOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyAccept) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to accept a join request for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to accept a join request for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * The presence to accept as a party member.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + boolean hasPresence(); + /** + *
+   * The presence to accept as a party member.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresence(); + /** + *
+   * The presence to accept as a party member.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyClose.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyClose.java new file mode 100644 index 00000000..b832fee3 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyClose.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * End a party, kicking all party members and closing it.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyClose} + */ +public final class PartyClose extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyClose) + PartyCloseOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyClose.class.getName()); + } + // Use PartyClose.newBuilder() to construct. + private PartyClose(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyClose() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyClose_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyClose_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyClose.class, com.heroiclabs.nakama.rtapi.PartyClose.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to close.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to close.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyClose)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyClose other = (com.heroiclabs.nakama.rtapi.PartyClose) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyClose parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyClose parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyClose parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyClose prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * End a party, kicking all party members and closing it.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyClose} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyClose) + com.heroiclabs.nakama.rtapi.PartyCloseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyClose_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyClose_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyClose.class, com.heroiclabs.nakama.rtapi.PartyClose.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyClose.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyClose_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyClose getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyClose build() { + com.heroiclabs.nakama.rtapi.PartyClose result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyClose buildPartial() { + com.heroiclabs.nakama.rtapi.PartyClose result = new com.heroiclabs.nakama.rtapi.PartyClose(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyClose result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyClose) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyClose)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyClose other) { + if (other == com.heroiclabs.nakama.rtapi.PartyClose.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to close.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to close.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to close.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to close.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to close.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyClose) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyClose) + private static final com.heroiclabs.nakama.rtapi.PartyClose DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyClose(); + } + + public static com.heroiclabs.nakama.rtapi.PartyClose getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyClose parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyClose getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyCloseOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyCloseOrBuilder.java new file mode 100644 index 00000000..6e653bf7 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyCloseOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyCloseOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyClose) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to close.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to close.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyCreate.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyCreate.java new file mode 100644 index 00000000..f364ecce --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyCreate.java @@ -0,0 +1,538 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Create a party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyCreate} + */ +public final class PartyCreate extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyCreate) + PartyCreateOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyCreate.class.getName()); + } + // Use PartyCreate.newBuilder() to construct. + private PartyCreate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyCreate() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyCreate.class, com.heroiclabs.nakama.rtapi.PartyCreate.Builder.class); + } + + public static final int OPEN_FIELD_NUMBER = 1; + private boolean open_ = false; + /** + *
+   * Whether or not the party will require join requests to be approved by the party leader.
+   * 
+ * + * bool open = 1 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public boolean getOpen() { + return open_; + } + + public static final int MAX_SIZE_FIELD_NUMBER = 2; + private int maxSize_ = 0; + /** + *
+   * Maximum number of party members.
+   * 
+ * + * int32 max_size = 2 [json_name = "maxSize"]; + * @return The maxSize. + */ + @java.lang.Override + public int getMaxSize() { + return maxSize_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (open_ != false) { + output.writeBool(1, open_); + } + if (maxSize_ != 0) { + output.writeInt32(2, maxSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (open_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, open_); + } + if (maxSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxSize_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyCreate)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyCreate other = (com.heroiclabs.nakama.rtapi.PartyCreate) obj; + + if (getOpen() + != other.getOpen()) return false; + if (getMaxSize() + != other.getMaxSize()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOpen()); + hash = (37 * hash) + MAX_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxSize(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyCreate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyCreate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyCreate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyCreate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Create a party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyCreate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyCreate) + com.heroiclabs.nakama.rtapi.PartyCreateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyCreate.class, com.heroiclabs.nakama.rtapi.PartyCreate.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyCreate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + open_ = false; + maxSize_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyCreate_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreate getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreate build() { + com.heroiclabs.nakama.rtapi.PartyCreate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreate buildPartial() { + com.heroiclabs.nakama.rtapi.PartyCreate result = new com.heroiclabs.nakama.rtapi.PartyCreate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyCreate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.open_ = open_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxSize_ = maxSize_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyCreate) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyCreate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyCreate other) { + if (other == com.heroiclabs.nakama.rtapi.PartyCreate.getDefaultInstance()) return this; + if (other.getOpen() != false) { + setOpen(other.getOpen()); + } + if (other.getMaxSize() != 0) { + setMaxSize(other.getMaxSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + open_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + maxSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean open_ ; + /** + *
+     * Whether or not the party will require join requests to be approved by the party leader.
+     * 
+ * + * bool open = 1 [json_name = "open"]; + * @return The open. + */ + @java.lang.Override + public boolean getOpen() { + return open_; + } + /** + *
+     * Whether or not the party will require join requests to be approved by the party leader.
+     * 
+ * + * bool open = 1 [json_name = "open"]; + * @param value The open to set. + * @return This builder for chaining. + */ + public Builder setOpen(boolean value) { + + open_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Whether or not the party will require join requests to be approved by the party leader.
+     * 
+ * + * bool open = 1 [json_name = "open"]; + * @return This builder for chaining. + */ + public Builder clearOpen() { + bitField0_ = (bitField0_ & ~0x00000001); + open_ = false; + onChanged(); + return this; + } + + private int maxSize_ ; + /** + *
+     * Maximum number of party members.
+     * 
+ * + * int32 max_size = 2 [json_name = "maxSize"]; + * @return The maxSize. + */ + @java.lang.Override + public int getMaxSize() { + return maxSize_; + } + /** + *
+     * Maximum number of party members.
+     * 
+ * + * int32 max_size = 2 [json_name = "maxSize"]; + * @param value The maxSize to set. + * @return This builder for chaining. + */ + public Builder setMaxSize(int value) { + + maxSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Maximum number of party members.
+     * 
+ * + * int32 max_size = 2 [json_name = "maxSize"]; + * @return This builder for chaining. + */ + public Builder clearMaxSize() { + bitField0_ = (bitField0_ & ~0x00000002); + maxSize_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyCreate) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyCreate) + private static final com.heroiclabs.nakama.rtapi.PartyCreate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyCreate(); + } + + public static com.heroiclabs.nakama.rtapi.PartyCreate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyCreate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyCreate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyCreateOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyCreateOrBuilder.java new file mode 100644 index 00000000..c1eabbd1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyCreateOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyCreateOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyCreate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether or not the party will require join requests to be approved by the party leader.
+   * 
+ * + * bool open = 1 [json_name = "open"]; + * @return The open. + */ + boolean getOpen(); + + /** + *
+   * Maximum number of party members.
+   * 
+ * + * int32 max_size = 2 [json_name = "maxSize"]; + * @return The maxSize. + */ + int getMaxSize(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyData.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyData.java new file mode 100644 index 00000000..fc429a88 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyData.java @@ -0,0 +1,944 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Incoming party data delivered from the server.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyData} + */ +public final class PartyData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyData) + PartyDataOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyData.class.getName()); + } + // Use PartyData.newBuilder() to construct. + private PartyData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyData() { + partyId_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyData.class, com.heroiclabs.nakama.rtapi.PartyData.Builder.class); + } + + private int bitField0_; + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCE_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + @java.lang.Override + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + + public static final int OP_CODE_FIELD_NUMBER = 3; + private long opCode_ = 0L; + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + + public static final int DATA_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPresence()); + } + if (opCode_ != 0L) { + output.writeInt64(3, opCode_); + } + if (!data_.isEmpty()) { + output.writeBytes(4, data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPresence()); + } + if (opCode_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, opCode_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyData)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyData other = (com.heroiclabs.nakama.rtapi.PartyData) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (hasPresence() != other.hasPresence()) return false; + if (hasPresence()) { + if (!getPresence() + .equals(other.getPresence())) return false; + } + if (getOpCode() + != other.getOpCode()) return false; + if (!getData() + .equals(other.getData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (hasPresence()) { + hash = (37 * hash) + PRESENCE_FIELD_NUMBER; + hash = (53 * hash) + getPresence().hashCode(); + } + hash = (37 * hash) + OP_CODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpCode()); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Incoming party data delivered from the server.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyData) + com.heroiclabs.nakama.rtapi.PartyDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyData.class, com.heroiclabs.nakama.rtapi.PartyData.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresenceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + opCode_ = 0L; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyData_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyData getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyData build() { + com.heroiclabs.nakama.rtapi.PartyData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyData buildPartial() { + com.heroiclabs.nakama.rtapi.PartyData result = new com.heroiclabs.nakama.rtapi.PartyData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.presence_ = presenceBuilder_ == null + ? presence_ + : presenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.opCode_ = opCode_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.data_ = data_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyData) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyData other) { + if (other == com.heroiclabs.nakama.rtapi.PartyData.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPresence()) { + mergePresence(other.getPresence()); + } + if (other.getOpCode() != 0L) { + setOpCode(other.getOpCode()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPresenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + opCode_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + data_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presenceBuilder_; + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + public boolean hasPresence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + if (presenceBuilder_ == null) { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } else { + return presenceBuilder_.getMessage(); + } + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + presence_ = value; + } else { + presenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presenceBuilder_ == null) { + presence_ = builderForValue.build(); + } else { + presenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder mergePresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + presence_ != null && + presence_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getPresenceBuilder().mergeFrom(value); + } else { + presence_ = value; + } + } else { + presenceBuilder_.mergeFrom(value); + } + if (presence_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder clearPresence() { + bitField0_ = (bitField0_ & ~0x00000002); + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPresenceFieldBuilder().getBuilder(); + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + if (presenceBuilder_ != null) { + return presenceBuilder_.getMessageOrBuilder(); + } else { + return presence_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + } + /** + *
+     * A reference to the user presence that sent this data, if any.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresenceFieldBuilder() { + if (presenceBuilder_ == null) { + presenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getPresence(), + getParentForChildren(), + isClean()); + presence_ = null; + } + return presenceBuilder_; + } + + private long opCode_ ; + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @param value The opCode to set. + * @return This builder for chaining. + */ + public Builder setOpCode(long value) { + + opCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return This builder for chaining. + */ + public Builder clearOpCode() { + bitField0_ = (bitField0_ & ~0x00000004); + opCode_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + data_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000008); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyData) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyData) + private static final com.heroiclabs.nakama.rtapi.PartyData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyData(); + } + + public static com.heroiclabs.nakama.rtapi.PartyData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataOrBuilder.java new file mode 100644 index 00000000..26245a4c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + boolean hasPresence(); + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresence(); + /** + *
+   * A reference to the user presence that sent this data, if any.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder(); + + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 3 [json_name = "opCode"]; + * @return The opCode. + */ + long getOpCode(); + + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSend.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSend.java new file mode 100644 index 00000000..844e3e6f --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSend.java @@ -0,0 +1,703 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Send data to a party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyDataSend} + */ +public final class PartyDataSend extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyDataSend) + PartyDataSendOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyDataSend.class.getName()); + } + // Use PartyDataSend.newBuilder() to construct. + private PartyDataSend(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyDataSend() { + partyId_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyDataSend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyDataSend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyDataSend.class, com.heroiclabs.nakama.rtapi.PartyDataSend.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to send to.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to send to.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OP_CODE_FIELD_NUMBER = 2; + private long opCode_ = 0L; + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + + public static final int DATA_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (opCode_ != 0L) { + output.writeInt64(2, opCode_); + } + if (!data_.isEmpty()) { + output.writeBytes(3, data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (opCode_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, opCode_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyDataSend)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyDataSend other = (com.heroiclabs.nakama.rtapi.PartyDataSend) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (getOpCode() + != other.getOpCode()) return false; + if (!getData() + .equals(other.getData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (37 * hash) + OP_CODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpCode()); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyDataSend parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyDataSend prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Send data to a party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyDataSend} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyDataSend) + com.heroiclabs.nakama.rtapi.PartyDataSendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyDataSend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyDataSend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyDataSend.class, com.heroiclabs.nakama.rtapi.PartyDataSend.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyDataSend.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + opCode_ = 0L; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyDataSend_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSend getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSend build() { + com.heroiclabs.nakama.rtapi.PartyDataSend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSend buildPartial() { + com.heroiclabs.nakama.rtapi.PartyDataSend result = new com.heroiclabs.nakama.rtapi.PartyDataSend(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyDataSend result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.opCode_ = opCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.data_ = data_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyDataSend) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyDataSend)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyDataSend other) { + if (other == com.heroiclabs.nakama.rtapi.PartyDataSend.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getOpCode() != 0L) { + setOpCode(other.getOpCode()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + opCode_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + data_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to send to.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to send to.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to send to.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to send to.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to send to.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long opCode_ ; + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return The opCode. + */ + @java.lang.Override + public long getOpCode() { + return opCode_; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @param value The opCode to set. + * @return This builder for chaining. + */ + public Builder setOpCode(long value) { + + opCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Op code value.
+     * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return This builder for chaining. + */ + public Builder clearOpCode() { + bitField0_ = (bitField0_ & ~0x00000002); + opCode_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 3 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + data_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Data payload, if any.
+     * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000004); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyDataSend) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyDataSend) + private static final com.heroiclabs.nakama.rtapi.PartyDataSend DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyDataSend(); + } + + public static com.heroiclabs.nakama.rtapi.PartyDataSend getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyDataSend parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyDataSend getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSendOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSendOrBuilder.java new file mode 100644 index 00000000..b572b196 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyDataSendOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyDataSendOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyDataSend) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to send to.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to send to.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * Op code value.
+   * 
+ * + * int64 op_code = 2 [json_name = "opCode"]; + * @return The opCode. + */ + long getOpCode(); + + /** + *
+   * Data payload, if any.
+   * 
+ * + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoin.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoin.java new file mode 100644 index 00000000..a2468fb6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoin.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Join a party, or request to join if the party is not open.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyJoin} + */ +public final class PartyJoin extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyJoin) + PartyJoinOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyJoin.class.getName()); + } + // Use PartyJoin.newBuilder() to construct. + private PartyJoin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyJoin() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyJoin.class, com.heroiclabs.nakama.rtapi.PartyJoin.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyJoin)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyJoin other = (com.heroiclabs.nakama.rtapi.PartyJoin) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoin parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyJoin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyJoin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Join a party, or request to join if the party is not open.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyJoin} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyJoin) + com.heroiclabs.nakama.rtapi.PartyJoinOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoin_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyJoin.class, com.heroiclabs.nakama.rtapi.PartyJoin.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyJoin.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoin_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoin getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoin build() { + com.heroiclabs.nakama.rtapi.PartyJoin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoin buildPartial() { + com.heroiclabs.nakama.rtapi.PartyJoin result = new com.heroiclabs.nakama.rtapi.PartyJoin(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyJoin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyJoin) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyJoin)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyJoin other) { + if (other == com.heroiclabs.nakama.rtapi.PartyJoin.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyJoin) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyJoin) + private static final com.heroiclabs.nakama.rtapi.PartyJoin DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyJoin(); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyJoin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinOrBuilder.java new file mode 100644 index 00000000..754add9d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyJoinOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyJoin) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequest.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequest.java new file mode 100644 index 00000000..1e14e782 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequest.java @@ -0,0 +1,983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Incoming notification for one or more new presences attempting to join the party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyJoinRequest} + */ +public final class PartyJoinRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyJoinRequest) + PartyJoinRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyJoinRequest.class.getName()); + } + // Use PartyJoinRequest.newBuilder() to construct. + private PartyJoinRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyJoinRequest() { + partyId_ = ""; + presences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyJoinRequest.class, com.heroiclabs.nakama.rtapi.PartyJoinRequest.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID these presences are attempting to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID these presences are attempting to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List presences_; + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List getPresencesList() { + return presences_; + } + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List + getPresencesOrBuilderList() { + return presences_; + } + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public int getPresencesCount() { + return presences_.size(); + } + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + return presences_.get(index); + } + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + return presences_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + for (int i = 0; i < presences_.size(); i++) { + output.writeMessage(2, presences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + for (int i = 0; i < presences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, presences_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyJoinRequest)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyJoinRequest other = (com.heroiclabs.nakama.rtapi.PartyJoinRequest) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getPresencesList() + .equals(other.getPresencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (getPresencesCount() > 0) { + hash = (37 * hash) + PRESENCES_FIELD_NUMBER; + hash = (53 * hash) + getPresencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyJoinRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Incoming notification for one or more new presences attempting to join the party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyJoinRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyJoinRequest) + com.heroiclabs.nakama.rtapi.PartyJoinRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyJoinRequest.class, com.heroiclabs.nakama.rtapi.PartyJoinRequest.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyJoinRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + } else { + presences_ = null; + presencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequest getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequest build() { + com.heroiclabs.nakama.rtapi.PartyJoinRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequest buildPartial() { + com.heroiclabs.nakama.rtapi.PartyJoinRequest result = new com.heroiclabs.nakama.rtapi.PartyJoinRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.PartyJoinRequest result) { + if (presencesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + presences_ = java.util.Collections.unmodifiableList(presences_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.presences_ = presences_; + } else { + result.presences_ = presencesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyJoinRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyJoinRequest) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyJoinRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyJoinRequest other) { + if (other == com.heroiclabs.nakama.rtapi.PartyJoinRequest.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (presencesBuilder_ == null) { + if (!other.presences_.isEmpty()) { + if (presences_.isEmpty()) { + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePresencesIsMutable(); + presences_.addAll(other.presences_); + } + onChanged(); + } + } else { + if (!other.presences_.isEmpty()) { + if (presencesBuilder_.isEmpty()) { + presencesBuilder_.dispose(); + presencesBuilder_ = null; + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000002); + presencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPresencesFieldBuilder() : null; + } else { + presencesBuilder_.addAllMessages(other.presences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(m); + } else { + presencesBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID these presences are attempting to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID these presences are attempting to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID these presences are attempting to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID these presences are attempting to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID these presences are attempting to join.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List presences_ = + java.util.Collections.emptyList(); + private void ensurePresencesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + presences_ = new java.util.ArrayList(presences_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presencesBuilder_; + + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public java.util.List getPresencesList() { + if (presencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(presences_); + } else { + return presencesBuilder_.getMessageList(); + } + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public int getPresencesCount() { + if (presencesBuilder_ == null) { + return presences_.size(); + } else { + return presencesBuilder_.getCount(); + } + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); + } else { + return presencesBuilder_.getMessage(index); + } + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.set(index, value); + onChanged(); + } else { + presencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.set(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(value); + onChanged(); + } else { + presencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(index, value); + onChanged(); + } else { + presencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder addAllPresences( + java.lang.Iterable values) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, presences_); + onChanged(); + } else { + presencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder clearPresences() { + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + presencesBuilder_.clear(); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public Builder removePresences(int index) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.remove(index); + onChanged(); + } else { + presencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresencesBuilder( + int index) { + return getPresencesFieldBuilder().getBuilder(index); + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); } else { + return presencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public java.util.List + getPresencesOrBuilderList() { + if (presencesBuilder_ != null) { + return presencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(presences_); + } + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder() { + return getPresencesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder( + int index) { + return getPresencesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences attempting to join.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + public java.util.List + getPresencesBuilderList() { + return getPresencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresencesFieldBuilder() { + if (presencesBuilder_ == null) { + presencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + presences_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + presences_ = null; + } + return presencesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyJoinRequest) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyJoinRequest) + private static final com.heroiclabs.nakama.rtapi.PartyJoinRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyJoinRequest(); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyJoinRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestList.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestList.java new file mode 100644 index 00000000..898fb19e --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestList.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Request a list of pending join requests for a party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyJoinRequestList} + */ +public final class PartyJoinRequestList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyJoinRequestList) + PartyJoinRequestListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyJoinRequestList.class.getName()); + } + // Use PartyJoinRequestList.newBuilder() to construct. + private PartyJoinRequestList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyJoinRequestList() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequestList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequestList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyJoinRequestList.class, com.heroiclabs.nakama.rtapi.PartyJoinRequestList.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to get a list of join requests for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to get a list of join requests for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyJoinRequestList)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyJoinRequestList other = (com.heroiclabs.nakama.rtapi.PartyJoinRequestList) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyJoinRequestList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request a list of pending join requests for a party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyJoinRequestList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyJoinRequestList) + com.heroiclabs.nakama.rtapi.PartyJoinRequestListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequestList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequestList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyJoinRequestList.class, com.heroiclabs.nakama.rtapi.PartyJoinRequestList.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyJoinRequestList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyJoinRequestList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestList getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestList build() { + com.heroiclabs.nakama.rtapi.PartyJoinRequestList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestList buildPartial() { + com.heroiclabs.nakama.rtapi.PartyJoinRequestList result = new com.heroiclabs.nakama.rtapi.PartyJoinRequestList(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyJoinRequestList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyJoinRequestList) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyJoinRequestList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyJoinRequestList other) { + if (other == com.heroiclabs.nakama.rtapi.PartyJoinRequestList.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to get a list of join requests for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to get a list of join requests for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to get a list of join requests for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to get a list of join requests for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to get a list of join requests for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyJoinRequestList) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyJoinRequestList) + private static final com.heroiclabs.nakama.rtapi.PartyJoinRequestList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyJoinRequestList(); + } + + public static com.heroiclabs.nakama.rtapi.PartyJoinRequestList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyJoinRequestList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyJoinRequestList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestListOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestListOrBuilder.java new file mode 100644 index 00000000..5fe09a06 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestListOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyJoinRequestListOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyJoinRequestList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to get a list of join requests for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to get a list of join requests for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestOrBuilder.java new file mode 100644 index 00000000..25c8854c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyJoinRequestOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyJoinRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyJoinRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID these presences are attempting to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID these presences are attempting to join.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + java.util.List + getPresencesList(); + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index); + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + int getPresencesCount(); + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + java.util.List + getPresencesOrBuilderList(); + /** + *
+   * Presences attempting to join.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 2 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeader.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeader.java new file mode 100644 index 00000000..f0a3326a --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeader.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Announcement of a new party leader.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyLeader} + */ +public final class PartyLeader extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyLeader) + PartyLeaderOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyLeader.class.getName()); + } + // Use PartyLeader.newBuilder() to construct. + private PartyLeader(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyLeader() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyLeader.class, com.heroiclabs.nakama.rtapi.PartyLeader.Builder.class); + } + + private int bitField0_; + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to announce the new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to announce the new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCE_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + /** + *
+   * The presence of the new party leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + @java.lang.Override + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The presence of the new party leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + /** + *
+   * The presence of the new party leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPresence()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPresence()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyLeader)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyLeader other = (com.heroiclabs.nakama.rtapi.PartyLeader) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (hasPresence() != other.hasPresence()) return false; + if (hasPresence()) { + if (!getPresence() + .equals(other.getPresence())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (hasPresence()) { + hash = (37 * hash) + PRESENCE_FIELD_NUMBER; + hash = (53 * hash) + getPresence().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyLeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyLeader parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyLeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyLeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Announcement of a new party leader.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyLeader} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyLeader) + com.heroiclabs.nakama.rtapi.PartyLeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyLeader.class, com.heroiclabs.nakama.rtapi.PartyLeader.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyLeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresenceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeader_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeader getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeader build() { + com.heroiclabs.nakama.rtapi.PartyLeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeader buildPartial() { + com.heroiclabs.nakama.rtapi.PartyLeader result = new com.heroiclabs.nakama.rtapi.PartyLeader(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyLeader result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.presence_ = presenceBuilder_ == null + ? presence_ + : presenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyLeader) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyLeader)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyLeader other) { + if (other == com.heroiclabs.nakama.rtapi.PartyLeader.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPresence()) { + mergePresence(other.getPresence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPresenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to announce the new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to announce the new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to announce the new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to announce the new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to announce the new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presenceBuilder_; + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + public boolean hasPresence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + if (presenceBuilder_ == null) { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } else { + return presenceBuilder_.getMessage(); + } + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + presence_ = value; + } else { + presenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presenceBuilder_ == null) { + presence_ = builderForValue.build(); + } else { + presenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder mergePresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + presence_ != null && + presence_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getPresenceBuilder().mergeFrom(value); + } else { + presence_ = value; + } + } else { + presenceBuilder_.mergeFrom(value); + } + if (presence_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder clearPresence() { + bitField0_ = (bitField0_ & ~0x00000002); + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPresenceFieldBuilder().getBuilder(); + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + if (presenceBuilder_ != null) { + return presenceBuilder_.getMessageOrBuilder(); + } else { + return presence_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + } + /** + *
+     * The presence of the new party leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresenceFieldBuilder() { + if (presenceBuilder_ == null) { + presenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getPresence(), + getParentForChildren(), + isClean()); + presence_ = null; + } + return presenceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyLeader) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyLeader) + private static final com.heroiclabs.nakama.rtapi.PartyLeader DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyLeader(); + } + + public static com.heroiclabs.nakama.rtapi.PartyLeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyLeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaderOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaderOrBuilder.java new file mode 100644 index 00000000..92694784 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaderOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyLeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyLeader) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to announce the new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to announce the new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * The presence of the new party leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + boolean hasPresence(); + /** + *
+   * The presence of the new party leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresence(); + /** + *
+   * The presence of the new party leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeave.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeave.java new file mode 100644 index 00000000..76644213 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeave.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Leave a party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyLeave} + */ +public final class PartyLeave extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyLeave) + PartyLeaveOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyLeave.class.getName()); + } + // Use PartyLeave.newBuilder() to construct. + private PartyLeave(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyLeave() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeave_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeave_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyLeave.class, com.heroiclabs.nakama.rtapi.PartyLeave.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to leave.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to leave.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyLeave)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyLeave other = (com.heroiclabs.nakama.rtapi.PartyLeave) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyLeave parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyLeave parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyLeave parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyLeave prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Leave a party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyLeave} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyLeave) + com.heroiclabs.nakama.rtapi.PartyLeaveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeave_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeave_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyLeave.class, com.heroiclabs.nakama.rtapi.PartyLeave.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyLeave.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyLeave_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeave getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeave build() { + com.heroiclabs.nakama.rtapi.PartyLeave result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeave buildPartial() { + com.heroiclabs.nakama.rtapi.PartyLeave result = new com.heroiclabs.nakama.rtapi.PartyLeave(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyLeave result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyLeave) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyLeave)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyLeave other) { + if (other == com.heroiclabs.nakama.rtapi.PartyLeave.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to leave.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to leave.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to leave.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to leave.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to leave.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyLeave) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyLeave) + private static final com.heroiclabs.nakama.rtapi.PartyLeave DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyLeave(); + } + + public static com.heroiclabs.nakama.rtapi.PartyLeave getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyLeave parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyLeave getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaveOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaveOrBuilder.java new file mode 100644 index 00000000..fc442350 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyLeaveOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyLeaveOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyLeave) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to leave.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to leave.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAdd.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAdd.java new file mode 100644 index 00000000..cd93e661 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAdd.java @@ -0,0 +1,1720 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Begin matchmaking as a party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyMatchmakerAdd} + */ +public final class PartyMatchmakerAdd extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyMatchmakerAdd) + PartyMatchmakerAddOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyMatchmakerAdd.class.getName()); + } + // Use PartyMatchmakerAdd.newBuilder() to construct. + private PartyMatchmakerAdd(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyMatchmakerAdd() { + partyId_ = ""; + query_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetStringProperties(); + case 6: + return internalGetNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerAdd_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.class, com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.Builder.class); + } + + private int bitField0_; + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIN_COUNT_FIELD_NUMBER = 2; + private int minCount_ = 0; + /** + *
+   * Minimum total user count to match together.
+   * 
+ * + * int32 min_count = 2 [json_name = "minCount"]; + * @return The minCount. + */ + @java.lang.Override + public int getMinCount() { + return minCount_; + } + + public static final int MAX_COUNT_FIELD_NUMBER = 3; + private int maxCount_ = 0; + /** + *
+   * Maximum total user count to match together.
+   * 
+ * + * int32 max_count = 3 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + + public static final int QUERY_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 4 [json_name = "query"]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 4 [json_name = "query"]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRING_PROPERTIES_FIELD_NUMBER = 5; + private static final class StringPropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerAdd_StringPropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringProperties_; + private com.google.protobuf.MapField + internalGetStringProperties() { + if (stringProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + return stringProperties_; + } + public int getStringPropertiesCount() { + return internalGetStringProperties().getMap().size(); + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public boolean containsStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetStringProperties().getMap().containsKey(key); + } + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getStringProperties() { + return getStringPropertiesMap(); + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.util.Map getStringPropertiesMap() { + return internalGetStringProperties().getMap(); + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.lang.String getStringPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NUMERIC_PROPERTIES_FIELD_NUMBER = 6; + private static final class NumericPropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Double> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerAdd_NumericPropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.DOUBLE, + 0D); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> numericProperties_; + private com.google.protobuf.MapField + internalGetNumericProperties() { + if (numericProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + return numericProperties_; + } + public int getNumericPropertiesCount() { + return internalGetNumericProperties().getMap().size(); + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public boolean containsNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNumericProperties().getMap().containsKey(key); + } + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNumericProperties() { + return getNumericPropertiesMap(); + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public java.util.Map getNumericPropertiesMap() { + return internalGetNumericProperties().getMap(); + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int COUNT_MULTIPLE_FIELD_NUMBER = 7; + private com.google.protobuf.Int32Value countMultiple_; + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + * @return Whether the countMultiple field is set. + */ + @java.lang.Override + public boolean hasCountMultiple() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + * @return The countMultiple. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getCountMultiple() { + return countMultiple_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getCountMultipleOrBuilder() { + return countMultiple_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (minCount_ != 0) { + output.writeInt32(2, minCount_); + } + if (maxCount_ != 0) { + output.writeInt32(3, maxCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, query_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetStringProperties(), + StringPropertiesDefaultEntryHolder.defaultEntry, + 5); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetNumericProperties(), + NumericPropertiesDefaultEntryHolder.defaultEntry, + 6); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCountMultiple()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (minCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, minCount_); + } + if (maxCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, maxCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, query_); + } + for (java.util.Map.Entry entry + : internalGetStringProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + stringProperties__ = StringPropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, stringProperties__); + } + for (java.util.Map.Entry entry + : internalGetNumericProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + numericProperties__ = NumericPropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, numericProperties__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getCountMultiple()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd other = (com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (getMinCount() + != other.getMinCount()) return false; + if (getMaxCount() + != other.getMaxCount()) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (!internalGetStringProperties().equals( + other.internalGetStringProperties())) return false; + if (!internalGetNumericProperties().equals( + other.internalGetNumericProperties())) return false; + if (hasCountMultiple() != other.hasCountMultiple()) return false; + if (hasCountMultiple()) { + if (!getCountMultiple() + .equals(other.getCountMultiple())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (37 * hash) + MIN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinCount(); + hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxCount(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (!internalGetStringProperties().getMap().isEmpty()) { + hash = (37 * hash) + STRING_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetStringProperties().hashCode(); + } + if (!internalGetNumericProperties().getMap().isEmpty()) { + hash = (37 * hash) + NUMERIC_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetNumericProperties().hashCode(); + } + if (hasCountMultiple()) { + hash = (37 * hash) + COUNT_MULTIPLE_FIELD_NUMBER; + hash = (53 * hash) + getCountMultiple().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Begin matchmaking as a party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyMatchmakerAdd} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyMatchmakerAdd) + com.heroiclabs.nakama.rtapi.PartyMatchmakerAddOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetStringProperties(); + case 6: + return internalGetNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableStringProperties(); + case 6: + return internalGetMutableNumericProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerAdd_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.class, com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getCountMultipleFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + minCount_ = 0; + maxCount_ = 0; + query_ = ""; + internalGetMutableStringProperties().clear(); + internalGetMutableNumericProperties().clear(); + countMultiple_ = null; + if (countMultipleBuilder_ != null) { + countMultipleBuilder_.dispose(); + countMultipleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd build() { + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd buildPartial() { + com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd result = new com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minCount_ = minCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxCount_ = maxCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.stringProperties_ = internalGetStringProperties(); + result.stringProperties_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.numericProperties_ = internalGetNumericProperties(); + result.numericProperties_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.countMultiple_ = countMultipleBuilder_ == null + ? countMultiple_ + : countMultipleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd other) { + if (other == com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getMinCount() != 0) { + setMinCount(other.getMinCount()); + } + if (other.getMaxCount() != 0) { + setMaxCount(other.getMaxCount()); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableStringProperties().mergeFrom( + other.internalGetStringProperties()); + bitField0_ |= 0x00000010; + internalGetMutableNumericProperties().mergeFrom( + other.internalGetNumericProperties()); + bitField0_ |= 0x00000020; + if (other.hasCountMultiple()) { + mergeCountMultiple(other.getCountMultiple()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + minCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + maxCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + com.google.protobuf.MapEntry + stringProperties__ = input.readMessage( + StringPropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableStringProperties().getMutableMap().put( + stringProperties__.getKey(), stringProperties__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + com.google.protobuf.MapEntry + numericProperties__ = input.readMessage( + NumericPropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableNumericProperties().getMutableMap().put( + numericProperties__.getKey(), numericProperties__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getCountMultipleFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int minCount_ ; + /** + *
+     * Minimum total user count to match together.
+     * 
+ * + * int32 min_count = 2 [json_name = "minCount"]; + * @return The minCount. + */ + @java.lang.Override + public int getMinCount() { + return minCount_; + } + /** + *
+     * Minimum total user count to match together.
+     * 
+ * + * int32 min_count = 2 [json_name = "minCount"]; + * @param value The minCount to set. + * @return This builder for chaining. + */ + public Builder setMinCount(int value) { + + minCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Minimum total user count to match together.
+     * 
+ * + * int32 min_count = 2 [json_name = "minCount"]; + * @return This builder for chaining. + */ + public Builder clearMinCount() { + bitField0_ = (bitField0_ & ~0x00000002); + minCount_ = 0; + onChanged(); + return this; + } + + private int maxCount_ ; + /** + *
+     * Maximum total user count to match together.
+     * 
+ * + * int32 max_count = 3 [json_name = "maxCount"]; + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + /** + *
+     * Maximum total user count to match together.
+     * 
+ * + * int32 max_count = 3 [json_name = "maxCount"]; + * @param value The maxCount to set. + * @return This builder for chaining. + */ + public Builder setMaxCount(int value) { + + maxCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Maximum total user count to match together.
+     * 
+ * + * int32 max_count = 3 [json_name = "maxCount"]; + * @return This builder for chaining. + */ + public Builder clearMaxCount() { + bitField0_ = (bitField0_ & ~0x00000004); + maxCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 4 [json_name = "query"]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 4 [json_name = "query"]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 4 [json_name = "query"]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + query_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 4 [json_name = "query"]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Filter query used to identify suitable users.
+     * 
+ * + * string query = 4 [json_name = "query"]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> stringProperties_; + private com.google.protobuf.MapField + internalGetStringProperties() { + if (stringProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + return stringProperties_; + } + private com.google.protobuf.MapField + internalGetMutableStringProperties() { + if (stringProperties_ == null) { + stringProperties_ = com.google.protobuf.MapField.newMapField( + StringPropertiesDefaultEntryHolder.defaultEntry); + } + if (!stringProperties_.isMutable()) { + stringProperties_ = stringProperties_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return stringProperties_; + } + public int getStringPropertiesCount() { + return internalGetStringProperties().getMap().size(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public boolean containsStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetStringProperties().getMap().containsKey(key); + } + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getStringProperties() { + return getStringPropertiesMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.util.Map getStringPropertiesMap() { + return internalGetStringProperties().getMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + @java.lang.Override + public java.lang.String getStringPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetStringProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearStringProperties() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableStringProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + public Builder removeStringProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableStringProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableStringProperties() { + bitField0_ |= 0x00000010; + return internalGetMutableStringProperties().getMutableMap(); + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + public Builder putStringProperties( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableStringProperties().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + *
+     * String properties.
+     * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + public Builder putAllStringProperties( + java.util.Map values) { + internalGetMutableStringProperties().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Double> numericProperties_; + private com.google.protobuf.MapField + internalGetNumericProperties() { + if (numericProperties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + return numericProperties_; + } + private com.google.protobuf.MapField + internalGetMutableNumericProperties() { + if (numericProperties_ == null) { + numericProperties_ = com.google.protobuf.MapField.newMapField( + NumericPropertiesDefaultEntryHolder.defaultEntry); + } + if (!numericProperties_.isMutable()) { + numericProperties_ = numericProperties_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return numericProperties_; + } + public int getNumericPropertiesCount() { + return internalGetNumericProperties().getMap().size(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public boolean containsNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetNumericProperties().getMap().containsKey(key); + } + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getNumericProperties() { + return getNumericPropertiesMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public java.util.Map getNumericPropertiesMap() { + return internalGetNumericProperties().getMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + @java.lang.Override + public double getNumericPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetNumericProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearNumericProperties() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableNumericProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + public Builder removeNumericProperties( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableNumericProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableNumericProperties() { + bitField0_ |= 0x00000020; + return internalGetMutableNumericProperties().getMutableMap(); + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + public Builder putNumericProperties( + java.lang.String key, + double value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableNumericProperties().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + *
+     * Numeric properties.
+     * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + public Builder putAllNumericProperties( + java.util.Map values) { + internalGetMutableNumericProperties().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.protobuf.Int32Value countMultiple_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> countMultipleBuilder_; + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + * @return Whether the countMultiple field is set. + */ + public boolean hasCountMultiple() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + * @return The countMultiple. + */ + public com.google.protobuf.Int32Value getCountMultiple() { + if (countMultipleBuilder_ == null) { + return countMultiple_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } else { + return countMultipleBuilder_.getMessage(); + } + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + public Builder setCountMultiple(com.google.protobuf.Int32Value value) { + if (countMultipleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + countMultiple_ = value; + } else { + countMultipleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + public Builder setCountMultiple( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (countMultipleBuilder_ == null) { + countMultiple_ = builderForValue.build(); + } else { + countMultipleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + public Builder mergeCountMultiple(com.google.protobuf.Int32Value value) { + if (countMultipleBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + countMultiple_ != null && + countMultiple_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getCountMultipleBuilder().mergeFrom(value); + } else { + countMultiple_ = value; + } + } else { + countMultipleBuilder_.mergeFrom(value); + } + if (countMultiple_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + public Builder clearCountMultiple() { + bitField0_ = (bitField0_ & ~0x00000040); + countMultiple_ = null; + if (countMultipleBuilder_ != null) { + countMultipleBuilder_.dispose(); + countMultipleBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + public com.google.protobuf.Int32Value.Builder getCountMultipleBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCountMultipleFieldBuilder().getBuilder(); + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + public com.google.protobuf.Int32ValueOrBuilder getCountMultipleOrBuilder() { + if (countMultipleBuilder_ != null) { + return countMultipleBuilder_.getMessageOrBuilder(); + } else { + return countMultiple_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : countMultiple_; + } + } + /** + *
+     * Optional multiple of the count that must be satisfied.
+     * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getCountMultipleFieldBuilder() { + if (countMultipleBuilder_ == null) { + countMultipleBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getCountMultiple(), + getParentForChildren(), + isClean()); + countMultiple_ = null; + } + return countMultipleBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyMatchmakerAdd) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyMatchmakerAdd) + private static final com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd(); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyMatchmakerAdd parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerAdd getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAddOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAddOrBuilder.java new file mode 100644 index 00000000..573989ac --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerAddOrBuilder.java @@ -0,0 +1,204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyMatchmakerAddOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyMatchmakerAdd) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * Minimum total user count to match together.
+   * 
+ * + * int32 min_count = 2 [json_name = "minCount"]; + * @return The minCount. + */ + int getMinCount(); + + /** + *
+   * Maximum total user count to match together.
+   * 
+ * + * int32 max_count = 3 [json_name = "maxCount"]; + * @return The maxCount. + */ + int getMaxCount(); + + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 4 [json_name = "query"]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Filter query used to identify suitable users.
+   * 
+ * + * string query = 4 [json_name = "query"]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + int getStringPropertiesCount(); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + boolean containsStringProperties( + java.lang.String key); + /** + * Use {@link #getStringPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getStringProperties(); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + java.util.Map + getStringPropertiesMap(); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + /* nullable */ +java.lang.String getStringPropertiesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * String properties.
+   * 
+ * + * map<string, string> string_properties = 5 [json_name = "stringProperties"]; + */ + java.lang.String getStringPropertiesOrThrow( + java.lang.String key); + + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + int getNumericPropertiesCount(); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + boolean containsNumericProperties( + java.lang.String key); + /** + * Use {@link #getNumericPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getNumericProperties(); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + java.util.Map + getNumericPropertiesMap(); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + double getNumericPropertiesOrDefault( + java.lang.String key, + double defaultValue); + /** + *
+   * Numeric properties.
+   * 
+ * + * map<string, double> numeric_properties = 6 [json_name = "numericProperties"]; + */ + double getNumericPropertiesOrThrow( + java.lang.String key); + + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + * @return Whether the countMultiple field is set. + */ + boolean hasCountMultiple(); + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + * @return The countMultiple. + */ + com.google.protobuf.Int32Value getCountMultiple(); + /** + *
+   * Optional multiple of the count that must be satisfied.
+   * 
+ * + * .google.protobuf.Int32Value count_multiple = 7 [json_name = "countMultiple"]; + */ + com.google.protobuf.Int32ValueOrBuilder getCountMultipleOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemove.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemove.java new file mode 100644 index 00000000..f4389361 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemove.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Cancel a party matchmaking process using a ticket.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyMatchmakerRemove} + */ +public final class PartyMatchmakerRemove extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyMatchmakerRemove) + PartyMatchmakerRemoveOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyMatchmakerRemove.class.getName()); + } + // Use PartyMatchmakerRemove.newBuilder() to construct. + private PartyMatchmakerRemove(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyMatchmakerRemove() { + partyId_ = ""; + ticket_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.class, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TICKET_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object ticket_ = ""; + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The ticket. + */ + @java.lang.Override + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } + } + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ticket_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ticket_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove other = (com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getTicket() + .equals(other.getTicket())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (37 * hash) + TICKET_FIELD_NUMBER; + hash = (53 * hash) + getTicket().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Cancel a party matchmaking process using a ticket.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyMatchmakerRemove} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyMatchmakerRemove) + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemoveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.class, com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + ticket_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerRemove_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove build() { + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove buildPartial() { + com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove result = new com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ticket_ = ticket_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove other) { + if (other == com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTicket().isEmpty()) { + ticket_ = other.ticket_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + ticket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object ticket_ = ""; + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The ticket. + */ + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @param value The ticket to set. + * @return This builder for chaining. + */ + public Builder setTicket( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ticket_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return This builder for chaining. + */ + public Builder clearTicket() { + ticket_ = getDefaultInstance().getTicket(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ticket to cancel.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @param value The bytes for ticket to set. + * @return This builder for chaining. + */ + public Builder setTicketBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ticket_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyMatchmakerRemove) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyMatchmakerRemove) + private static final com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove(); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyMatchmakerRemove parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerRemove getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemoveOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemoveOrBuilder.java new file mode 100644 index 00000000..3854f408 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerRemoveOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyMatchmakerRemoveOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyMatchmakerRemove) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The ticket. + */ + java.lang.String getTicket(); + /** + *
+   * The ticket to cancel.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + com.google.protobuf.ByteString + getTicketBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicket.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicket.java new file mode 100644 index 00000000..86bfd8c8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicket.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A response from starting a new party matchmaking process.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyMatchmakerTicket} + */ +public final class PartyMatchmakerTicket extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyMatchmakerTicket) + PartyMatchmakerTicketOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyMatchmakerTicket.class.getName()); + } + // Use PartyMatchmakerTicket.newBuilder() to construct. + private PartyMatchmakerTicket(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyMatchmakerTicket() { + partyId_ = ""; + ticket_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerTicket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerTicket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.class, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TICKET_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object ticket_ = ""; + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The ticket. + */ + @java.lang.Override + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } + } + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ticket_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ticket_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ticket_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket other = (com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getTicket() + .equals(other.getTicket())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + hash = (37 * hash) + TICKET_FIELD_NUMBER; + hash = (53 * hash) + getTicket().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A response from starting a new party matchmaking process.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyMatchmakerTicket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyMatchmakerTicket) + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerTicket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerTicket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.class, com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + ticket_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyMatchmakerTicket_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket build() { + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket buildPartial() { + com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket result = new com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ticket_ = ticket_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket other) { + if (other == com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTicket().isEmpty()) { + ticket_ = other.ticket_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + ticket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object ticket_ = ""; + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The ticket. + */ + public java.lang.String getTicket() { + java.lang.Object ref = ticket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ticket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + public com.google.protobuf.ByteString + getTicketBytes() { + java.lang.Object ref = ticket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ticket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @param value The ticket to set. + * @return This builder for chaining. + */ + public Builder setTicket( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ticket_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return This builder for chaining. + */ + public Builder clearTicket() { + ticket_ = getDefaultInstance().getTicket(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ticket that can be used to cancel matchmaking.
+     * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @param value The bytes for ticket to set. + * @return This builder for chaining. + */ + public Builder setTicketBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ticket_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyMatchmakerTicket) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyMatchmakerTicket) + private static final com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket(); + } + + public static com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyMatchmakerTicket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyMatchmakerTicket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicketOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicketOrBuilder.java new file mode 100644 index 00000000..59089c15 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyMatchmakerTicketOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyMatchmakerTicketOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyMatchmakerTicket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The ticket. + */ + java.lang.String getTicket(); + /** + *
+   * The ticket that can be used to cancel matchmaking.
+   * 
+ * + * string ticket = 2 [json_name = "ticket"]; + * @return The bytes for ticket. + */ + com.google.protobuf.ByteString + getTicketBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyOrBuilder.java new file mode 100644 index 00000000..214ee3d8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyOrBuilder.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Party) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Unique party identifier.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Unique party identifier.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * Open flag.
+   * 
+ * + * bool open = 2 [json_name = "open"]; + * @return The open. + */ + boolean getOpen(); + + /** + *
+   * Maximum number of party members.
+   * 
+ * + * int32 max_size = 3 [json_name = "maxSize"]; + * @return The maxSize. + */ + int getMaxSize(); + + /** + *
+   * Self.
+   * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + * @return Whether the self field is set. + */ + boolean hasSelf(); + /** + *
+   * Self.
+   * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + * @return The self. + */ + com.heroiclabs.nakama.rtapi.UserPresence getSelf(); + /** + *
+   * Self.
+   * 
+ * + * .nakama.realtime.UserPresence self = 4 [json_name = "self"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSelfOrBuilder(); + + /** + *
+   * Leader.
+   * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + * @return Whether the leader field is set. + */ + boolean hasLeader(); + /** + *
+   * Leader.
+   * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + * @return The leader. + */ + com.heroiclabs.nakama.rtapi.UserPresence getLeader(); + /** + *
+   * Leader.
+   * 
+ * + * .nakama.realtime.UserPresence leader = 5 [json_name = "leader"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeaderOrBuilder(); + + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + java.util.List + getPresencesList(); + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index); + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + int getPresencesCount(); + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + java.util.List + getPresencesOrBuilderList(); + /** + *
+   * All current party members.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 6 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEvent.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEvent.java new file mode 100644 index 00000000..dcc8af14 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEvent.java @@ -0,0 +1,1425 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Presence update for a particular party.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyPresenceEvent} + */ +public final class PartyPresenceEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyPresenceEvent) + PartyPresenceEventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyPresenceEvent.class.getName()); + } + // Use PartyPresenceEvent.newBuilder() to construct. + private PartyPresenceEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyPresenceEvent() { + partyId_ = ""; + joins_ = java.util.Collections.emptyList(); + leaves_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyPresenceEvent.class, com.heroiclabs.nakama.rtapi.PartyPresenceEvent.Builder.class); + } + + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOINS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List joins_; + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List getJoinsList() { + return joins_; + } + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List + getJoinsOrBuilderList() { + return joins_; + } + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public int getJoinsCount() { + return joins_.size(); + } + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + return joins_.get(index); + } + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + return joins_.get(index); + } + + public static final int LEAVES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List leaves_; + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List getLeavesList() { + return leaves_; + } + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List + getLeavesOrBuilderList() { + return leaves_; + } + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public int getLeavesCount() { + return leaves_.size(); + } + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + return leaves_.get(index); + } + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + return leaves_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + for (int i = 0; i < joins_.size(); i++) { + output.writeMessage(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + output.writeMessage(3, leaves_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + for (int i = 0; i < joins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, leaves_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyPresenceEvent)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyPresenceEvent other = (com.heroiclabs.nakama.rtapi.PartyPresenceEvent) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (!getJoinsList() + .equals(other.getJoinsList())) return false; + if (!getLeavesList() + .equals(other.getLeavesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (getJoinsCount() > 0) { + hash = (37 * hash) + JOINS_FIELD_NUMBER; + hash = (53 * hash) + getJoinsList().hashCode(); + } + if (getLeavesCount() > 0) { + hash = (37 * hash) + LEAVES_FIELD_NUMBER; + hash = (53 * hash) + getLeavesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyPresenceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Presence update for a particular party.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyPresenceEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyPresenceEvent) + com.heroiclabs.nakama.rtapi.PartyPresenceEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyPresenceEvent.class, com.heroiclabs.nakama.rtapi.PartyPresenceEvent.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyPresenceEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + } else { + joins_ = null; + joinsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + } else { + leaves_ = null; + leavesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPresenceEvent_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEvent getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEvent build() { + com.heroiclabs.nakama.rtapi.PartyPresenceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEvent buildPartial() { + com.heroiclabs.nakama.rtapi.PartyPresenceEvent result = new com.heroiclabs.nakama.rtapi.PartyPresenceEvent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.PartyPresenceEvent result) { + if (joinsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + joins_ = java.util.Collections.unmodifiableList(joins_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.joins_ = joins_; + } else { + result.joins_ = joinsBuilder_.build(); + } + if (leavesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + leaves_ = java.util.Collections.unmodifiableList(leaves_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.leaves_ = leaves_; + } else { + result.leaves_ = leavesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyPresenceEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyPresenceEvent) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyPresenceEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyPresenceEvent other) { + if (other == com.heroiclabs.nakama.rtapi.PartyPresenceEvent.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (joinsBuilder_ == null) { + if (!other.joins_.isEmpty()) { + if (joins_.isEmpty()) { + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJoinsIsMutable(); + joins_.addAll(other.joins_); + } + onChanged(); + } + } else { + if (!other.joins_.isEmpty()) { + if (joinsBuilder_.isEmpty()) { + joinsBuilder_.dispose(); + joinsBuilder_ = null; + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + joinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getJoinsFieldBuilder() : null; + } else { + joinsBuilder_.addAllMessages(other.joins_); + } + } + } + if (leavesBuilder_ == null) { + if (!other.leaves_.isEmpty()) { + if (leaves_.isEmpty()) { + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLeavesIsMutable(); + leaves_.addAll(other.leaves_); + } + onChanged(); + } + } else { + if (!other.leaves_.isEmpty()) { + if (leavesBuilder_.isEmpty()) { + leavesBuilder_.dispose(); + leavesBuilder_ = null; + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + leavesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLeavesFieldBuilder() : null; + } else { + leavesBuilder_.addAllMessages(other.leaves_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(m); + } else { + joinsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(m); + } else { + leavesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The party ID.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List joins_ = + java.util.Collections.emptyList(); + private void ensureJoinsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + joins_ = new java.util.ArrayList(joins_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> joinsBuilder_; + + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List getJoinsList() { + if (joinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(joins_); + } else { + return joinsBuilder_.getMessageList(); + } + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public int getJoinsCount() { + if (joinsBuilder_ == null) { + return joins_.size(); + } else { + return joinsBuilder_.getCount(); + } + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); + } else { + return joinsBuilder_.getMessage(index); + } + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.set(index, value); + onChanged(); + } else { + joinsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.set(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(value); + onChanged(); + } else { + joinsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(index, value); + onChanged(); + } else { + joinsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addAllJoins( + java.lang.Iterable values) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, joins_); + onChanged(); + } else { + joinsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder clearJoins() { + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + joinsBuilder_.clear(); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder removeJoins(int index) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.remove(index); + onChanged(); + } else { + joinsBuilder_.remove(index); + } + return this; + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getJoinsBuilder( + int index) { + return getJoinsFieldBuilder().getBuilder(index); + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); } else { + return joinsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsOrBuilderList() { + if (joinsBuilder_ != null) { + return joinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(joins_); + } + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder() { + return getJoinsFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder( + int index) { + return getJoinsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just joined the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsBuilderList() { + return getJoinsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getJoinsFieldBuilder() { + if (joinsBuilder_ == null) { + joinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + joins_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + joins_ = null; + } + return joinsBuilder_; + } + + private java.util.List leaves_ = + java.util.Collections.emptyList(); + private void ensureLeavesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + leaves_ = new java.util.ArrayList(leaves_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> leavesBuilder_; + + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List getLeavesList() { + if (leavesBuilder_ == null) { + return java.util.Collections.unmodifiableList(leaves_); + } else { + return leavesBuilder_.getMessageList(); + } + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public int getLeavesCount() { + if (leavesBuilder_ == null) { + return leaves_.size(); + } else { + return leavesBuilder_.getCount(); + } + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); + } else { + return leavesBuilder_.getMessage(index); + } + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.set(index, value); + onChanged(); + } else { + leavesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.set(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(value); + onChanged(); + } else { + leavesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(index, value); + onChanged(); + } else { + leavesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addAllLeaves( + java.lang.Iterable values) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, leaves_); + onChanged(); + } else { + leavesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder clearLeaves() { + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + leavesBuilder_.clear(); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder removeLeaves(int index) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.remove(index); + onChanged(); + } else { + leavesBuilder_.remove(index); + } + return this; + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getLeavesBuilder( + int index) { + return getLeavesFieldBuilder().getBuilder(index); + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); } else { + return leavesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesOrBuilderList() { + if (leavesBuilder_ != null) { + return leavesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(leaves_); + } + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder() { + return getLeavesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder( + int index) { + return getLeavesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User presences that have just left the party.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesBuilderList() { + return getLeavesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getLeavesFieldBuilder() { + if (leavesBuilder_ == null) { + leavesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + leaves_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + leaves_ = null; + } + return leavesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyPresenceEvent) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyPresenceEvent) + private static final com.heroiclabs.nakama.rtapi.PartyPresenceEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyPresenceEvent(); + } + + public static com.heroiclabs.nakama.rtapi.PartyPresenceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyPresenceEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPresenceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEventOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEventOrBuilder.java new file mode 100644 index 00000000..7543745b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPresenceEventOrBuilder.java @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyPresenceEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyPresenceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * The party ID.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsList(); + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index); + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + int getJoinsCount(); + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsOrBuilderList(); + /** + *
+   * User presences that have just joined the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index); + + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesList(); + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index); + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + int getLeavesCount(); + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesOrBuilderList(); + /** + *
+   * User presences that have just left the party.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyPromote.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPromote.java new file mode 100644 index 00000000..d2e405e0 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPromote.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Promote a new party leader.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyPromote} + */ +public final class PartyPromote extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyPromote) + PartyPromoteOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyPromote.class.getName()); + } + // Use PartyPromote.newBuilder() to construct. + private PartyPromote(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyPromote() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPromote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPromote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyPromote.class, com.heroiclabs.nakama.rtapi.PartyPromote.Builder.class); + } + + private int bitField0_; + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to promote a new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to promote a new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCE_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + /** + *
+   * The presence of an existing party member to promote as the new leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + @java.lang.Override + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The presence of an existing party member to promote as the new leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + /** + *
+   * The presence of an existing party member to promote as the new leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPresence()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPresence()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyPromote)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyPromote other = (com.heroiclabs.nakama.rtapi.PartyPromote) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (hasPresence() != other.hasPresence()) return false; + if (hasPresence()) { + if (!getPresence() + .equals(other.getPresence())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (hasPresence()) { + hash = (37 * hash) + PRESENCE_FIELD_NUMBER; + hash = (53 * hash) + getPresence().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyPromote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyPromote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyPromote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyPromote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Promote a new party leader.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyPromote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyPromote) + com.heroiclabs.nakama.rtapi.PartyPromoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPromote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPromote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyPromote.class, com.heroiclabs.nakama.rtapi.PartyPromote.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyPromote.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresenceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyPromote_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromote getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromote build() { + com.heroiclabs.nakama.rtapi.PartyPromote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromote buildPartial() { + com.heroiclabs.nakama.rtapi.PartyPromote result = new com.heroiclabs.nakama.rtapi.PartyPromote(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyPromote result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.presence_ = presenceBuilder_ == null + ? presence_ + : presenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyPromote) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyPromote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyPromote other) { + if (other == com.heroiclabs.nakama.rtapi.PartyPromote.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPresence()) { + mergePresence(other.getPresence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPresenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to promote a new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to promote a new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to promote a new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to promote a new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to promote a new leader for.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presenceBuilder_; + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + public boolean hasPresence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + if (presenceBuilder_ == null) { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } else { + return presenceBuilder_.getMessage(); + } + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + presence_ = value; + } else { + presenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presenceBuilder_ == null) { + presence_ = builderForValue.build(); + } else { + presenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder mergePresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + presence_ != null && + presence_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getPresenceBuilder().mergeFrom(value); + } else { + presence_ = value; + } + } else { + presenceBuilder_.mergeFrom(value); + } + if (presence_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder clearPresence() { + bitField0_ = (bitField0_ & ~0x00000002); + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPresenceFieldBuilder().getBuilder(); + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + if (presenceBuilder_ != null) { + return presenceBuilder_.getMessageOrBuilder(); + } else { + return presence_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + } + /** + *
+     * The presence of an existing party member to promote as the new leader.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresenceFieldBuilder() { + if (presenceBuilder_ == null) { + presenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getPresence(), + getParentForChildren(), + isClean()); + presence_ = null; + } + return presenceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyPromote) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyPromote) + private static final com.heroiclabs.nakama.rtapi.PartyPromote DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyPromote(); + } + + public static com.heroiclabs.nakama.rtapi.PartyPromote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyPromote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyPromote getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyPromoteOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPromoteOrBuilder.java new file mode 100644 index 00000000..b6c51265 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyPromoteOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyPromoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyPromote) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to promote a new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to promote a new leader for.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * The presence of an existing party member to promote as the new leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + boolean hasPresence(); + /** + *
+   * The presence of an existing party member to promote as the new leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresence(); + /** + *
+   * The presence of an existing party member to promote as the new leader.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyRemove.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyRemove.java new file mode 100644 index 00000000..727cfced --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyRemove.java @@ -0,0 +1,778 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Kick a party member, or decline a request to join.
+ * 
+ * + * Protobuf type {@code nakama.realtime.PartyRemove} + */ +public final class PartyRemove extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.PartyRemove) + PartyRemoveOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + PartyRemove.class.getName()); + } + // Use PartyRemove.newBuilder() to construct. + private PartyRemove(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PartyRemove() { + partyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyRemove.class, com.heroiclabs.nakama.rtapi.PartyRemove.Builder.class); + } + + private int bitField0_; + public static final int PARTY_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object partyId_ = ""; + /** + *
+   * Party ID to remove/reject from.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + @java.lang.Override + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } + } + /** + *
+   * Party ID to remove/reject from.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRESENCE_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + /** + *
+   * The presence to remove or reject.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + @java.lang.Override + public boolean hasPresence() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The presence to remove or reject.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + /** + *
+   * The presence to remove or reject.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPresence()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, partyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPresence()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.PartyRemove)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.PartyRemove other = (com.heroiclabs.nakama.rtapi.PartyRemove) obj; + + if (!getPartyId() + .equals(other.getPartyId())) return false; + if (hasPresence() != other.hasPresence()) return false; + if (hasPresence()) { + if (!getPresence() + .equals(other.getPresence())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartyId().hashCode(); + if (hasPresence()) { + hash = (37 * hash) + PRESENCE_FIELD_NUMBER; + hash = (53 * hash) + getPresence().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.PartyRemove parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.PartyRemove parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.PartyRemove parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.PartyRemove prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Kick a party member, or decline a request to join.
+   * 
+ * + * Protobuf type {@code nakama.realtime.PartyRemove} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.PartyRemove) + com.heroiclabs.nakama.rtapi.PartyRemoveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyRemove_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyRemove_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.PartyRemove.class, com.heroiclabs.nakama.rtapi.PartyRemove.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.PartyRemove.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPresenceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partyId_ = ""; + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_PartyRemove_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemove getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemove build() { + com.heroiclabs.nakama.rtapi.PartyRemove result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemove buildPartial() { + com.heroiclabs.nakama.rtapi.PartyRemove result = new com.heroiclabs.nakama.rtapi.PartyRemove(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.PartyRemove result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partyId_ = partyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.presence_ = presenceBuilder_ == null + ? presence_ + : presenceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.PartyRemove) { + return mergeFrom((com.heroiclabs.nakama.rtapi.PartyRemove)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.PartyRemove other) { + if (other == com.heroiclabs.nakama.rtapi.PartyRemove.getDefaultInstance()) return this; + if (!other.getPartyId().isEmpty()) { + partyId_ = other.partyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPresence()) { + mergePresence(other.getPresence()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + partyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getPresenceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object partyId_ = ""; + /** + *
+     * Party ID to remove/reject from.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + public java.lang.String getPartyId() { + java.lang.Object ref = partyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Party ID to remove/reject from.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + public com.google.protobuf.ByteString + getPartyIdBytes() { + java.lang.Object ref = partyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + partyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Party ID to remove/reject from.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Party ID to remove/reject from.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return This builder for chaining. + */ + public Builder clearPartyId() { + partyId_ = getDefaultInstance().getPartyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Party ID to remove/reject from.
+     * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @param value The bytes for partyId to set. + * @return This builder for chaining. + */ + public Builder setPartyIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + partyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.heroiclabs.nakama.rtapi.UserPresence presence_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presenceBuilder_; + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + public boolean hasPresence() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresence() { + if (presenceBuilder_ == null) { + return presence_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } else { + return presenceBuilder_.getMessage(); + } + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + presence_ = value; + } else { + presenceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder setPresence( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presenceBuilder_ == null) { + presence_ = builderForValue.build(); + } else { + presenceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder mergePresence(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presenceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + presence_ != null && + presence_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getPresenceBuilder().mergeFrom(value); + } else { + presence_ = value; + } + } else { + presenceBuilder_.mergeFrom(value); + } + if (presence_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public Builder clearPresence() { + bitField0_ = (bitField0_ & ~0x00000002); + presence_ = null; + if (presenceBuilder_ != null) { + presenceBuilder_.dispose(); + presenceBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresenceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPresenceFieldBuilder().getBuilder(); + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder() { + if (presenceBuilder_ != null) { + return presenceBuilder_.getMessageOrBuilder(); + } else { + return presence_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : presence_; + } + } + /** + *
+     * The presence to remove or reject.
+     * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresenceFieldBuilder() { + if (presenceBuilder_ == null) { + presenceBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getPresence(), + getParentForChildren(), + isClean()); + presence_ = null; + } + return presenceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.PartyRemove) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.PartyRemove) + private static final com.heroiclabs.nakama.rtapi.PartyRemove DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.PartyRemove(); + } + + public static com.heroiclabs.nakama.rtapi.PartyRemove getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartyRemove parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.PartyRemove getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PartyRemoveOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PartyRemoveOrBuilder.java new file mode 100644 index 00000000..4535c66c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PartyRemoveOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PartyRemoveOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.PartyRemove) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Party ID to remove/reject from.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The partyId. + */ + java.lang.String getPartyId(); + /** + *
+   * Party ID to remove/reject from.
+   * 
+ * + * string party_id = 1 [json_name = "partyId"]; + * @return The bytes for partyId. + */ + com.google.protobuf.ByteString + getPartyIdBytes(); + + /** + *
+   * The presence to remove or reject.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return Whether the presence field is set. + */ + boolean hasPresence(); + /** + *
+   * The presence to remove or reject.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + * @return The presence. + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresence(); + /** + *
+   * The presence to remove or reject.
+   * 
+ * + * .nakama.realtime.UserPresence presence = 2 [json_name = "presence"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresenceOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Ping.java b/src/main/java/com/heroiclabs/nakama/rtapi/Ping.java new file mode 100644 index 00000000..4a81bb71 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Ping.java @@ -0,0 +1,366 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Application-level heartbeat and connection check.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Ping} + */ +public final class Ping extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Ping) + PingOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Ping.class.getName()); + } + // Use Ping.newBuilder() to construct. + private Ping(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Ping() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Ping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Ping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Ping.class, com.heroiclabs.nakama.rtapi.Ping.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Ping)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Ping other = (com.heroiclabs.nakama.rtapi.Ping) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Ping parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Ping parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Ping parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Ping prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Application-level heartbeat and connection check.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Ping} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Ping) + com.heroiclabs.nakama.rtapi.PingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Ping_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Ping_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Ping.class, com.heroiclabs.nakama.rtapi.Ping.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Ping.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Ping_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Ping getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Ping build() { + com.heroiclabs.nakama.rtapi.Ping result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Ping buildPartial() { + com.heroiclabs.nakama.rtapi.Ping result = new com.heroiclabs.nakama.rtapi.Ping(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Ping) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Ping)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Ping other) { + if (other == com.heroiclabs.nakama.rtapi.Ping.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Ping) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Ping) + private static final com.heroiclabs.nakama.rtapi.Ping DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Ping(); + } + + public static com.heroiclabs.nakama.rtapi.Ping getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Ping parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Ping getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PingOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PingOrBuilder.java new file mode 100644 index 00000000..65c0bf29 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PingOrBuilder.java @@ -0,0 +1,11 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PingOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Ping) + com.google.protobuf.MessageOrBuilder { +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Pong.java b/src/main/java/com/heroiclabs/nakama/rtapi/Pong.java new file mode 100644 index 00000000..6178153b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Pong.java @@ -0,0 +1,366 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Application-level heartbeat and connection check response.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Pong} + */ +public final class Pong extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Pong) + PongOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Pong.class.getName()); + } + // Use Pong.newBuilder() to construct. + private Pong(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Pong() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Pong_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Pong_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Pong.class, com.heroiclabs.nakama.rtapi.Pong.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Pong)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Pong other = (com.heroiclabs.nakama.rtapi.Pong) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Pong parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Pong parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Pong parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Pong prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Application-level heartbeat and connection check response.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Pong} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Pong) + com.heroiclabs.nakama.rtapi.PongOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Pong_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Pong_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Pong.class, com.heroiclabs.nakama.rtapi.Pong.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Pong.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Pong_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Pong getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Pong build() { + com.heroiclabs.nakama.rtapi.Pong result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Pong buildPartial() { + com.heroiclabs.nakama.rtapi.Pong result = new com.heroiclabs.nakama.rtapi.Pong(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Pong) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Pong)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Pong other) { + if (other == com.heroiclabs.nakama.rtapi.Pong.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Pong) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Pong) + private static final com.heroiclabs.nakama.rtapi.Pong DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Pong(); + } + + public static com.heroiclabs.nakama.rtapi.Pong getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pong parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Pong getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/PongOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/PongOrBuilder.java new file mode 100644 index 00000000..2ee55474 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/PongOrBuilder.java @@ -0,0 +1,11 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface PongOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Pong) + com.google.protobuf.MessageOrBuilder { +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/RealtimeProto.java b/src/main/java/com/heroiclabs/nakama/rtapi/RealtimeProto.java new file mode 100644 index 00000000..49b873ab --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/RealtimeProto.java @@ -0,0 +1,989 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public final class RealtimeProto { + private RealtimeProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + RealtimeProto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Envelope_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Envelope_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Channel_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Channel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_ChannelJoin_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_ChannelJoin_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_ChannelLeave_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_ChannelLeave_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_ChannelMessageAck_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_ChannelMessageAck_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_ChannelMessageSend_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_ChannelMessageSend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_ChannelMessageUpdate_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_ChannelMessageUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_ChannelMessageRemove_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_ChannelMessageRemove_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_ChannelPresenceEvent_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_ChannelPresenceEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Error_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Error_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Error_ContextEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Error_ContextEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Match_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Match_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchCreate_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchCreate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchData_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchDataSend_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchDataSend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchJoin_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchJoin_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchJoin_MetadataEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchJoin_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchLeave_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchLeave_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchPresenceEvent_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchPresenceEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerAdd_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerAdd_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerAdd_StringPropertiesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerAdd_StringPropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerAdd_NumericPropertiesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerAdd_NumericPropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerMatched_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerMatched_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_StringPropertiesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_StringPropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerRemove_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerRemove_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_MatchmakerTicket_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_MatchmakerTicket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Notifications_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Notifications_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Party_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Party_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyCreate_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyCreate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyJoin_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyJoin_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyLeave_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyLeave_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyPromote_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyPromote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyLeader_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyLeader_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyAccept_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyAccept_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyRemove_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyRemove_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyClose_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyClose_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyJoinRequestList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyJoinRequestList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyJoinRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyJoinRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyMatchmakerAdd_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyMatchmakerAdd_StringPropertiesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyMatchmakerAdd_StringPropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyMatchmakerAdd_NumericPropertiesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyMatchmakerAdd_NumericPropertiesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyMatchmakerRemove_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyMatchmakerRemove_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyMatchmakerTicket_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyMatchmakerTicket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyData_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyDataSend_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyDataSend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_PartyPresenceEvent_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_PartyPresenceEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Ping_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Ping_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Pong_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Pong_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Status_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Status_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_StatusFollow_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_StatusFollow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_StatusPresenceEvent_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_StatusPresenceEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_StatusUnfollow_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_StatusUnfollow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_StatusUpdate_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_StatusUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_Stream_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_Stream_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_StreamData_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_StreamData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_StreamPresenceEvent_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_StreamPresenceEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_nakama_realtime_UserPresence_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_nakama_realtime_UserPresence_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n8github.com/heroiclabs/nakama-common/rt" + + "api/realtime.proto\022\017nakama.realtime\032\037goo" + + "gle/protobuf/timestamp.proto\032\036google/pro" + + "tobuf/wrappers.proto\0321github.com/heroicl" + + "abs/nakama-common/api/api.proto\"\364\033\n\010Enve" + + "lope\022\020\n\003cid\030\001 \001(\tR\003cid\0224\n\007channel\030\002 \001(\0132" + + "\030.nakama.realtime.ChannelH\000R\007channel\022A\n\014" + + "channel_join\030\003 \001(\0132\034.nakama.realtime.Cha" + + "nnelJoinH\000R\013channelJoin\022D\n\rchannel_leave" + + "\030\004 \001(\0132\035.nakama.realtime.ChannelLeaveH\000R" + + "\014channelLeave\022E\n\017channel_message\030\005 \001(\0132\032" + + ".nakama.api.ChannelMessageH\000R\016channelMes" + + "sage\022T\n\023channel_message_ack\030\006 \001(\0132\".naka" + + "ma.realtime.ChannelMessageAckH\000R\021channel" + + "MessageAck\022W\n\024channel_message_send\030\007 \001(\013" + + "2#.nakama.realtime.ChannelMessageSendH\000R" + + "\022channelMessageSend\022]\n\026channel_message_u" + + "pdate\030\010 \001(\0132%.nakama.realtime.ChannelMes" + + "sageUpdateH\000R\024channelMessageUpdate\022]\n\026ch" + + "annel_message_remove\030\t \001(\0132%.nakama.real" + + "time.ChannelMessageRemoveH\000R\024channelMess" + + "ageRemove\022]\n\026channel_presence_event\030\n \001(" + + "\0132%.nakama.realtime.ChannelPresenceEvent" + + "H\000R\024channelPresenceEvent\022.\n\005error\030\013 \001(\0132" + + "\026.nakama.realtime.ErrorH\000R\005error\022.\n\005matc" + + "h\030\014 \001(\0132\026.nakama.realtime.MatchH\000R\005match" + + "\022A\n\014match_create\030\r \001(\0132\034.nakama.realtime" + + ".MatchCreateH\000R\013matchCreate\022;\n\nmatch_dat" + + "a\030\016 \001(\0132\032.nakama.realtime.MatchDataH\000R\tm" + + "atchData\022H\n\017match_data_send\030\017 \001(\0132\036.naka" + + "ma.realtime.MatchDataSendH\000R\rmatchDataSe" + + "nd\022;\n\nmatch_join\030\020 \001(\0132\032.nakama.realtime" + + ".MatchJoinH\000R\tmatchJoin\022>\n\013match_leave\030\021" + + " \001(\0132\033.nakama.realtime.MatchLeaveH\000R\nmat" + + "chLeave\022W\n\024match_presence_event\030\022 \001(\0132#." + + "nakama.realtime.MatchPresenceEventH\000R\022ma" + + "tchPresenceEvent\022G\n\016matchmaker_add\030\023 \001(\013" + + "2\036.nakama.realtime.MatchmakerAddH\000R\rmatc" + + "hmakerAdd\022S\n\022matchmaker_matched\030\024 \001(\0132\"." + + "nakama.realtime.MatchmakerMatchedH\000R\021mat" + + "chmakerMatched\022P\n\021matchmaker_remove\030\025 \001(" + + "\0132!.nakama.realtime.MatchmakerRemoveH\000R\020" + + "matchmakerRemove\022P\n\021matchmaker_ticket\030\026 " + + "\001(\0132!.nakama.realtime.MatchmakerTicketH\000" + + "R\020matchmakerTicket\022F\n\rnotifications\030\027 \001(" + + "\0132\036.nakama.realtime.NotificationsH\000R\rnot" + + "ifications\022#\n\003rpc\030\030 \001(\0132\017.nakama.api.Rpc" + + "H\000R\003rpc\0221\n\006status\030\031 \001(\0132\027.nakama.realtim" + + "e.StatusH\000R\006status\022D\n\rstatus_follow\030\032 \001(" + + "\0132\035.nakama.realtime.StatusFollowH\000R\014stat" + + "usFollow\022Z\n\025status_presence_event\030\033 \001(\0132" + + "$.nakama.realtime.StatusPresenceEventH\000R" + + "\023statusPresenceEvent\022J\n\017status_unfollow\030" + + "\034 \001(\0132\037.nakama.realtime.StatusUnfollowH\000" + + "R\016statusUnfollow\022D\n\rstatus_update\030\035 \001(\0132" + + "\035.nakama.realtime.StatusUpdateH\000R\014status" + + "Update\022>\n\013stream_data\030\036 \001(\0132\033.nakama.rea" + + "ltime.StreamDataH\000R\nstreamData\022Z\n\025stream" + + "_presence_event\030\037 \001(\0132$.nakama.realtime." + + "StreamPresenceEventH\000R\023streamPresenceEve" + + "nt\022+\n\004ping\030 \001(\0132\025.nakama.realtime.PingH" + + "\000R\004ping\022+\n\004pong\030! \001(\0132\025.nakama.realtime." + + "PongH\000R\004pong\022.\n\005party\030\" \001(\0132\026.nakama.rea" + + "ltime.PartyH\000R\005party\022A\n\014party_create\030# \001" + + "(\0132\034.nakama.realtime.PartyCreateH\000R\013part" + + "yCreate\022;\n\nparty_join\030$ \001(\0132\032.nakama.rea" + + "ltime.PartyJoinH\000R\tpartyJoin\022>\n\013party_le" + + "ave\030% \001(\0132\033.nakama.realtime.PartyLeaveH\000" + + "R\npartyLeave\022D\n\rparty_promote\030& \001(\0132\035.na" + + "kama.realtime.PartyPromoteH\000R\014partyPromo" + + "te\022A\n\014party_leader\030\' \001(\0132\034.nakama.realti" + + "me.PartyLeaderH\000R\013partyLeader\022A\n\014party_a" + + "ccept\030( \001(\0132\034.nakama.realtime.PartyAccep" + + "tH\000R\013partyAccept\022A\n\014party_remove\030) \001(\0132\034" + + ".nakama.realtime.PartyRemoveH\000R\013partyRem" + + "ove\022>\n\013party_close\030* \001(\0132\033.nakama.realti" + + "me.PartyCloseH\000R\npartyClose\022^\n\027party_joi" + + "n_request_list\030+ \001(\0132%.nakama.realtime.P" + + "artyJoinRequestListH\000R\024partyJoinRequestL" + + "ist\022Q\n\022party_join_request\030, \001(\0132!.nakama" + + ".realtime.PartyJoinRequestH\000R\020partyJoinR" + + "equest\022W\n\024party_matchmaker_add\030- \001(\0132#.n" + + "akama.realtime.PartyMatchmakerAddH\000R\022par" + + "tyMatchmakerAdd\022`\n\027party_matchmaker_remo" + + "ve\030. \001(\0132&.nakama.realtime.PartyMatchmak" + + "erRemoveH\000R\025partyMatchmakerRemove\022`\n\027par" + + "ty_matchmaker_ticket\030/ \001(\0132&.nakama.real" + + "time.PartyMatchmakerTicketH\000R\025partyMatch" + + "makerTicket\022;\n\nparty_data\0300 \001(\0132\032.nakama" + + ".realtime.PartyDataH\000R\tpartyData\022H\n\017part" + + "y_data_send\0301 \001(\0132\036.nakama.realtime.Part" + + "yDataSendH\000R\rpartyDataSend\022W\n\024party_pres" + + "ence_event\0302 \001(\0132#.nakama.realtime.Party" + + "PresenceEventH\000R\022partyPresenceEventB\t\n\007m" + + "essage\"\201\002\n\007Channel\022\016\n\002id\030\001 \001(\tR\002id\022;\n\tpr" + + "esences\030\002 \003(\0132\035.nakama.realtime.UserPres" + + "enceR\tpresences\0221\n\004self\030\003 \001(\0132\035.nakama.r" + + "ealtime.UserPresenceR\004self\022\033\n\troom_name\030" + + "\004 \001(\tR\010roomName\022\031\n\010group_id\030\005 \001(\tR\007group" + + "Id\022\036\n\013user_id_one\030\006 \001(\tR\tuserIdOne\022\036\n\013us" + + "er_id_two\030\007 \001(\tR\tuserIdTwo\"\362\001\n\013ChannelJo" + + "in\022\026\n\006target\030\001 \001(\tR\006target\022\022\n\004type\030\002 \001(\005" + + "R\004type\022<\n\013persistence\030\003 \001(\0132\032.google.pro" + + "tobuf.BoolValueR\013persistence\0222\n\006hidden\030\004" + + " \001(\0132\032.google.protobuf.BoolValueR\006hidden" + + "\"E\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004ROOM\020\001" + + "\022\022\n\016DIRECT_MESSAGE\020\002\022\t\n\005GROUP\020\003\"-\n\014Chann" + + "elLeave\022\035\n\nchannel_id\030\001 \001(\tR\tchannelId\"\314" + + "\003\n\021ChannelMessageAck\022\035\n\nchannel_id\030\001 \001(\t" + + "R\tchannelId\022\035\n\nmessage_id\030\002 \001(\tR\tmessage" + + "Id\022/\n\004code\030\003 \001(\0132\033.google.protobuf.Int32" + + "ValueR\004code\022\032\n\010username\030\004 \001(\tR\010username\022" + + ";\n\013create_time\030\005 \001(\0132\032.google.protobuf.T" + + "imestampR\ncreateTime\022;\n\013update_time\030\006 \001(" + + "\0132\032.google.protobuf.TimestampR\nupdateTim" + + "e\022:\n\npersistent\030\007 \001(\0132\032.google.protobuf." + + "BoolValueR\npersistent\022\033\n\troom_name\030\010 \001(\t" + + "R\010roomName\022\031\n\010group_id\030\t \001(\tR\007groupId\022\036\n" + + "\013user_id_one\030\n \001(\tR\tuserIdOne\022\036\n\013user_id" + + "_two\030\013 \001(\tR\tuserIdTwo\"M\n\022ChannelMessageS" + + "end\022\035\n\nchannel_id\030\001 \001(\tR\tchannelId\022\030\n\007co" + + "ntent\030\002 \001(\tR\007content\"n\n\024ChannelMessageUp" + + "date\022\035\n\nchannel_id\030\001 \001(\tR\tchannelId\022\035\n\nm" + + "essage_id\030\002 \001(\tR\tmessageId\022\030\n\007content\030\003 " + + "\001(\tR\007content\"T\n\024ChannelMessageRemove\022\035\n\n" + + "channel_id\030\001 \001(\tR\tchannelId\022\035\n\nmessage_i" + + "d\030\002 \001(\tR\tmessageId\"\231\002\n\024ChannelPresenceEv" + + "ent\022\035\n\nchannel_id\030\001 \001(\tR\tchannelId\0223\n\005jo" + + "ins\030\002 \003(\0132\035.nakama.realtime.UserPresence" + + "R\005joins\0225\n\006leaves\030\003 \003(\0132\035.nakama.realtim" + + "e.UserPresenceR\006leaves\022\033\n\troom_name\030\004 \001(" + + "\tR\010roomName\022\031\n\010group_id\030\005 \001(\tR\007groupId\022\036" + + "\n\013user_id_one\030\006 \001(\tR\tuserIdOne\022\036\n\013user_i" + + "d_two\030\007 \001(\tR\tuserIdTwo\"\374\002\n\005Error\022\022\n\004code" + + "\030\001 \001(\005R\004code\022\030\n\007message\030\002 \001(\tR\007message\022=" + + "\n\007context\030\003 \003(\0132#.nakama.realtime.Error." + + "ContextEntryR\007context\032:\n\014ContextEntry\022\020\n" + + "\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028" + + "\001\"\311\001\n\004Code\022\025\n\021RUNTIME_EXCEPTION\020\000\022\030\n\024UNR" + + "ECOGNIZED_PAYLOAD\020\001\022\023\n\017MISSING_PAYLOAD\020\002" + + "\022\r\n\tBAD_INPUT\020\003\022\023\n\017MATCH_NOT_FOUND\020\004\022\027\n\023" + + "MATCH_JOIN_REJECTED\020\005\022\036\n\032RUNTIME_FUNCTIO" + + "N_NOT_FOUND\020\006\022\036\n\032RUNTIME_FUNCTION_EXCEPT" + + "ION\020\007\"\200\002\n\005Match\022\031\n\010match_id\030\001 \001(\tR\007match" + + "Id\022$\n\rauthoritative\030\002 \001(\010R\rauthoritative" + + "\0222\n\005label\030\003 \001(\0132\034.google.protobuf.String" + + "ValueR\005label\022\022\n\004size\030\004 \001(\005R\004size\022;\n\tpres" + + "ences\030\005 \003(\0132\035.nakama.realtime.UserPresen" + + "ceR\tpresences\0221\n\004self\030\006 \001(\0132\035.nakama.rea" + + "ltime.UserPresenceR\004self\"!\n\013MatchCreate\022" + + "\022\n\004name\030\001 \001(\tR\004name\"\252\001\n\tMatchData\022\031\n\010mat" + + "ch_id\030\001 \001(\tR\007matchId\0229\n\010presence\030\002 \001(\0132\035" + + ".nakama.realtime.UserPresenceR\010presence\022" + + "\027\n\007op_code\030\003 \001(\003R\006opCode\022\022\n\004data\030\004 \001(\014R\004" + + "data\022\032\n\010reliable\030\005 \001(\010R\010reliable\"\260\001\n\rMat" + + "chDataSend\022\031\n\010match_id\030\001 \001(\tR\007matchId\022\027\n" + + "\007op_code\030\002 \001(\003R\006opCode\022\022\n\004data\030\003 \001(\014R\004da" + + "ta\022;\n\tpresences\030\004 \003(\0132\035.nakama.realtime." + + "UserPresenceR\tpresences\022\032\n\010reliable\030\005 \001(" + + "\010R\010reliable\"\311\001\n\tMatchJoin\022\033\n\010match_id\030\001 " + + "\001(\tH\000R\007matchId\022\026\n\005token\030\002 \001(\tH\000R\005token\022D" + + "\n\010metadata\030\003 \003(\0132(.nakama.realtime.Match" + + "Join.MetadataEntryR\010metadata\032;\n\rMetadata" + + "Entry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005" + + "value:\0028\001B\004\n\002id\"\'\n\nMatchLeave\022\031\n\010match_i" + + "d\030\001 \001(\tR\007matchId\"\233\001\n\022MatchPresenceEvent\022" + + "\031\n\010match_id\030\001 \001(\tR\007matchId\0223\n\005joins\030\002 \003(" + + "\0132\035.nakama.realtime.UserPresenceR\005joins\022" + + "5\n\006leaves\030\003 \003(\0132\035.nakama.realtime.UserPr" + + "esenceR\006leaves\"\367\003\n\rMatchmakerAdd\022\033\n\tmin_" + + "count\030\001 \001(\005R\010minCount\022\033\n\tmax_count\030\002 \001(\005" + + "R\010maxCount\022\024\n\005query\030\003 \001(\tR\005query\022a\n\021stri" + + "ng_properties\030\004 \003(\01324.nakama.realtime.Ma" + + "tchmakerAdd.StringPropertiesEntryR\020strin" + + "gProperties\022d\n\022numeric_properties\030\005 \003(\0132" + + "5.nakama.realtime.MatchmakerAdd.NumericP" + + "ropertiesEntryR\021numericProperties\022B\n\016cou" + + "nt_multiple\030\006 \001(\0132\033.google.protobuf.Int3" + + "2ValueR\rcountMultiple\032C\n\025StringPropertie" + + "sEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR" + + "\005value:\0028\001\032D\n\026NumericPropertiesEntry\022\020\n\003" + + "key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\001R\005value:\0028\001" + + "\"\331\005\n\021MatchmakerMatched\022\026\n\006ticket\030\001 \001(\tR\006" + + "ticket\022\033\n\010match_id\030\002 \001(\tH\000R\007matchId\022\026\n\005t" + + "oken\030\003 \001(\tH\000R\005token\022G\n\005users\030\004 \003(\01321.nak" + + "ama.realtime.MatchmakerMatched.Matchmake" + + "rUserR\005users\022E\n\004self\030\005 \001(\01321.nakama.real" + + "time.MatchmakerMatched.MatchmakerUserR\004s" + + "elf\032\340\003\n\016MatchmakerUser\0229\n\010presence\030\001 \001(\013" + + "2\035.nakama.realtime.UserPresenceR\010presenc" + + "e\022\031\n\010party_id\030\002 \001(\tR\007partyId\022t\n\021string_p" + + "roperties\030\005 \003(\0132G.nakama.realtime.Matchm" + + "akerMatched.MatchmakerUser.StringPropert" + + "iesEntryR\020stringProperties\022w\n\022numeric_pr" + + "operties\030\006 \003(\0132H.nakama.realtime.Matchma" + + "kerMatched.MatchmakerUser.NumericPropert" + + "iesEntryR\021numericProperties\032C\n\025StringPro" + + "pertiesEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030" + + "\002 \001(\tR\005value:\0028\001\032D\n\026NumericPropertiesEnt" + + "ry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\001R\005val" + + "ue:\0028\001B\004\n\002id\"*\n\020MatchmakerRemove\022\026\n\006tick" + + "et\030\001 \001(\tR\006ticket\"*\n\020MatchmakerTicket\022\026\n\006" + + "ticket\030\001 \001(\tR\006ticket\"O\n\rNotifications\022>\n" + + "\rnotifications\030\001 \003(\0132\030.nakama.api.Notifi" + + "cationR\rnotifications\"\370\001\n\005Party\022\031\n\010party" + + "_id\030\001 \001(\tR\007partyId\022\022\n\004open\030\002 \001(\010R\004open\022\031" + + "\n\010max_size\030\003 \001(\005R\007maxSize\0221\n\004self\030\004 \001(\0132" + + "\035.nakama.realtime.UserPresenceR\004self\0225\n\006" + + "leader\030\005 \001(\0132\035.nakama.realtime.UserPrese" + + "nceR\006leader\022;\n\tpresences\030\006 \003(\0132\035.nakama." + + "realtime.UserPresenceR\tpresences\"<\n\013Part" + + "yCreate\022\022\n\004open\030\001 \001(\010R\004open\022\031\n\010max_size\030" + + "\002 \001(\005R\007maxSize\"&\n\tPartyJoin\022\031\n\010party_id\030" + + "\001 \001(\tR\007partyId\"\'\n\nPartyLeave\022\031\n\010party_id" + + "\030\001 \001(\tR\007partyId\"d\n\014PartyPromote\022\031\n\010party" + + "_id\030\001 \001(\tR\007partyId\0229\n\010presence\030\002 \001(\0132\035.n" + + "akama.realtime.UserPresenceR\010presence\"c\n" + + "\013PartyLeader\022\031\n\010party_id\030\001 \001(\tR\007partyId\022" + + "9\n\010presence\030\002 \001(\0132\035.nakama.realtime.User" + + "PresenceR\010presence\"c\n\013PartyAccept\022\031\n\010par" + + "ty_id\030\001 \001(\tR\007partyId\0229\n\010presence\030\002 \001(\0132\035" + + ".nakama.realtime.UserPresenceR\010presence\"" + + "c\n\013PartyRemove\022\031\n\010party_id\030\001 \001(\tR\007partyI" + + "d\0229\n\010presence\030\002 \001(\0132\035.nakama.realtime.Us" + + "erPresenceR\010presence\"\'\n\nPartyClose\022\031\n\010pa" + + "rty_id\030\001 \001(\tR\007partyId\"1\n\024PartyJoinReques" + + "tList\022\031\n\010party_id\030\001 \001(\tR\007partyId\"j\n\020Part" + + "yJoinRequest\022\031\n\010party_id\030\001 \001(\tR\007partyId\022" + + ";\n\tpresences\030\002 \003(\0132\035.nakama.realtime.Use" + + "rPresenceR\tpresences\"\241\004\n\022PartyMatchmaker" + + "Add\022\031\n\010party_id\030\001 \001(\tR\007partyId\022\033\n\tmin_co" + + "unt\030\002 \001(\005R\010minCount\022\033\n\tmax_count\030\003 \001(\005R\010" + + "maxCount\022\024\n\005query\030\004 \001(\tR\005query\022f\n\021string" + + "_properties\030\005 \003(\01329.nakama.realtime.Part" + + "yMatchmakerAdd.StringPropertiesEntryR\020st" + + "ringProperties\022i\n\022numeric_properties\030\006 \003" + + "(\0132:.nakama.realtime.PartyMatchmakerAdd." + + "NumericPropertiesEntryR\021numericPropertie" + + "s\022B\n\016count_multiple\030\007 \001(\0132\033.google.proto" + + "buf.Int32ValueR\rcountMultiple\032C\n\025StringP" + + "ropertiesEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005valu" + + "e\030\002 \001(\tR\005value:\0028\001\032D\n\026NumericPropertiesE" + + "ntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\001R\005v" + + "alue:\0028\001\"J\n\025PartyMatchmakerRemove\022\031\n\010par" + + "ty_id\030\001 \001(\tR\007partyId\022\026\n\006ticket\030\002 \001(\tR\006ti" + + "cket\"J\n\025PartyMatchmakerTicket\022\031\n\010party_i" + + "d\030\001 \001(\tR\007partyId\022\026\n\006ticket\030\002 \001(\tR\006ticket" + + "\"\216\001\n\tPartyData\022\031\n\010party_id\030\001 \001(\tR\007partyI" + + "d\0229\n\010presence\030\002 \001(\0132\035.nakama.realtime.Us" + + "erPresenceR\010presence\022\027\n\007op_code\030\003 \001(\003R\006o" + + "pCode\022\022\n\004data\030\004 \001(\014R\004data\"W\n\rPartyDataSe" + + "nd\022\031\n\010party_id\030\001 \001(\tR\007partyId\022\027\n\007op_code" + + "\030\002 \001(\003R\006opCode\022\022\n\004data\030\003 \001(\014R\004data\"\233\001\n\022P" + + "artyPresenceEvent\022\031\n\010party_id\030\001 \001(\tR\007par" + + "tyId\0223\n\005joins\030\002 \003(\0132\035.nakama.realtime.Us" + + "erPresenceR\005joins\0225\n\006leaves\030\003 \003(\0132\035.naka" + + "ma.realtime.UserPresenceR\006leaves\"\006\n\004Ping" + + "\"\006\n\004Pong\"E\n\006Status\022;\n\tpresences\030\001 \003(\0132\035." + + "nakama.realtime.UserPresenceR\tpresences\"" + + "G\n\014StatusFollow\022\031\n\010user_ids\030\001 \003(\tR\007userI" + + "ds\022\034\n\tusernames\030\002 \003(\tR\tusernames\"\201\001\n\023Sta" + + "tusPresenceEvent\0223\n\005joins\030\002 \003(\0132\035.nakama" + + ".realtime.UserPresenceR\005joins\0225\n\006leaves\030" + + "\003 \003(\0132\035.nakama.realtime.UserPresenceR\006le" + + "aves\"+\n\016StatusUnfollow\022\031\n\010user_ids\030\001 \003(\t" + + "R\007userIds\"D\n\014StatusUpdate\0224\n\006status\030\001 \001(" + + "\0132\034.google.protobuf.StringValueR\006status\"" + + "l\n\006Stream\022\022\n\004mode\030\001 \001(\005R\004mode\022\030\n\007subject" + + "\030\002 \001(\tR\007subject\022\036\n\nsubcontext\030\003 \001(\tR\nsub" + + "context\022\024\n\005label\030\004 \001(\tR\005label\"\244\001\n\nStream" + + "Data\022/\n\006stream\030\001 \001(\0132\027.nakama.realtime.S" + + "treamR\006stream\0225\n\006sender\030\002 \001(\0132\035.nakama.r" + + "ealtime.UserPresenceR\006sender\022\022\n\004data\030\003 \001" + + "(\tR\004data\022\032\n\010reliable\030\004 \001(\010R\010reliable\"\262\001\n" + + "\023StreamPresenceEvent\022/\n\006stream\030\001 \001(\0132\027.n" + + "akama.realtime.StreamR\006stream\0223\n\005joins\030\002" + + " \003(\0132\035.nakama.realtime.UserPresenceR\005joi" + + "ns\0225\n\006leaves\030\003 \003(\0132\035.nakama.realtime.Use" + + "rPresenceR\006leaves\"\272\001\n\014UserPresence\022\027\n\007us" + + "er_id\030\001 \001(\tR\006userId\022\035\n\nsession_id\030\002 \001(\tR" + + "\tsessionId\022\032\n\010username\030\003 \001(\tR\010username\022 " + + "\n\013persistence\030\004 \001(\010R\013persistence\0224\n\006stat" + + "us\030\005 \001(\0132\034.google.protobuf.StringValueR\006" + + "statusB\264\001\n\033com.heroiclabs.nakama.rtapiB\r" + + "RealtimeProtoP\001Z)github.com/heroiclabs/n" + + "akama-common/rtapi\242\002\003NRX\252\002\017Nakama.Realti" + + "me\312\002\017Nakama\\Realtime\342\002\033Nakama\\Realtime\\G" + + "PBMetadata\352\002\020Nakama::Realtimeb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.heroiclabs.nakama.api.ApiProto.getDescriptor(), + }); + internal_static_nakama_realtime_Envelope_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_nakama_realtime_Envelope_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Envelope_descriptor, + new java.lang.String[] { "Cid", "Channel", "ChannelJoin", "ChannelLeave", "ChannelMessage", "ChannelMessageAck", "ChannelMessageSend", "ChannelMessageUpdate", "ChannelMessageRemove", "ChannelPresenceEvent", "Error", "Match", "MatchCreate", "MatchData", "MatchDataSend", "MatchJoin", "MatchLeave", "MatchPresenceEvent", "MatchmakerAdd", "MatchmakerMatched", "MatchmakerRemove", "MatchmakerTicket", "Notifications", "Rpc", "Status", "StatusFollow", "StatusPresenceEvent", "StatusUnfollow", "StatusUpdate", "StreamData", "StreamPresenceEvent", "Ping", "Pong", "Party", "PartyCreate", "PartyJoin", "PartyLeave", "PartyPromote", "PartyLeader", "PartyAccept", "PartyRemove", "PartyClose", "PartyJoinRequestList", "PartyJoinRequest", "PartyMatchmakerAdd", "PartyMatchmakerRemove", "PartyMatchmakerTicket", "PartyData", "PartyDataSend", "PartyPresenceEvent", "Message", }); + internal_static_nakama_realtime_Channel_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_nakama_realtime_Channel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Channel_descriptor, + new java.lang.String[] { "Id", "Presences", "Self", "RoomName", "GroupId", "UserIdOne", "UserIdTwo", }); + internal_static_nakama_realtime_ChannelJoin_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_nakama_realtime_ChannelJoin_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_ChannelJoin_descriptor, + new java.lang.String[] { "Target", "Type", "Persistence", "Hidden", }); + internal_static_nakama_realtime_ChannelLeave_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_nakama_realtime_ChannelLeave_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_ChannelLeave_descriptor, + new java.lang.String[] { "ChannelId", }); + internal_static_nakama_realtime_ChannelMessageAck_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_nakama_realtime_ChannelMessageAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_ChannelMessageAck_descriptor, + new java.lang.String[] { "ChannelId", "MessageId", "Code", "Username", "CreateTime", "UpdateTime", "Persistent", "RoomName", "GroupId", "UserIdOne", "UserIdTwo", }); + internal_static_nakama_realtime_ChannelMessageSend_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_nakama_realtime_ChannelMessageSend_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_ChannelMessageSend_descriptor, + new java.lang.String[] { "ChannelId", "Content", }); + internal_static_nakama_realtime_ChannelMessageUpdate_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_nakama_realtime_ChannelMessageUpdate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_ChannelMessageUpdate_descriptor, + new java.lang.String[] { "ChannelId", "MessageId", "Content", }); + internal_static_nakama_realtime_ChannelMessageRemove_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_nakama_realtime_ChannelMessageRemove_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_ChannelMessageRemove_descriptor, + new java.lang.String[] { "ChannelId", "MessageId", }); + internal_static_nakama_realtime_ChannelPresenceEvent_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_nakama_realtime_ChannelPresenceEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_ChannelPresenceEvent_descriptor, + new java.lang.String[] { "ChannelId", "Joins", "Leaves", "RoomName", "GroupId", "UserIdOne", "UserIdTwo", }); + internal_static_nakama_realtime_Error_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_nakama_realtime_Error_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Error_descriptor, + new java.lang.String[] { "Code", "Message", "Context", }); + internal_static_nakama_realtime_Error_ContextEntry_descriptor = + internal_static_nakama_realtime_Error_descriptor.getNestedTypes().get(0); + internal_static_nakama_realtime_Error_ContextEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Error_ContextEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_Match_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_nakama_realtime_Match_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Match_descriptor, + new java.lang.String[] { "MatchId", "Authoritative", "Label", "Size", "Presences", "Self", }); + internal_static_nakama_realtime_MatchCreate_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_nakama_realtime_MatchCreate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchCreate_descriptor, + new java.lang.String[] { "Name", }); + internal_static_nakama_realtime_MatchData_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_nakama_realtime_MatchData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchData_descriptor, + new java.lang.String[] { "MatchId", "Presence", "OpCode", "Data", "Reliable", }); + internal_static_nakama_realtime_MatchDataSend_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_nakama_realtime_MatchDataSend_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchDataSend_descriptor, + new java.lang.String[] { "MatchId", "OpCode", "Data", "Presences", "Reliable", }); + internal_static_nakama_realtime_MatchJoin_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_nakama_realtime_MatchJoin_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchJoin_descriptor, + new java.lang.String[] { "MatchId", "Token", "Metadata", "Id", }); + internal_static_nakama_realtime_MatchJoin_MetadataEntry_descriptor = + internal_static_nakama_realtime_MatchJoin_descriptor.getNestedTypes().get(0); + internal_static_nakama_realtime_MatchJoin_MetadataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchJoin_MetadataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_MatchLeave_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_nakama_realtime_MatchLeave_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchLeave_descriptor, + new java.lang.String[] { "MatchId", }); + internal_static_nakama_realtime_MatchPresenceEvent_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_nakama_realtime_MatchPresenceEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchPresenceEvent_descriptor, + new java.lang.String[] { "MatchId", "Joins", "Leaves", }); + internal_static_nakama_realtime_MatchmakerAdd_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_nakama_realtime_MatchmakerAdd_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerAdd_descriptor, + new java.lang.String[] { "MinCount", "MaxCount", "Query", "StringProperties", "NumericProperties", "CountMultiple", }); + internal_static_nakama_realtime_MatchmakerAdd_StringPropertiesEntry_descriptor = + internal_static_nakama_realtime_MatchmakerAdd_descriptor.getNestedTypes().get(0); + internal_static_nakama_realtime_MatchmakerAdd_StringPropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerAdd_StringPropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_MatchmakerAdd_NumericPropertiesEntry_descriptor = + internal_static_nakama_realtime_MatchmakerAdd_descriptor.getNestedTypes().get(1); + internal_static_nakama_realtime_MatchmakerAdd_NumericPropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerAdd_NumericPropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_MatchmakerMatched_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_nakama_realtime_MatchmakerMatched_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerMatched_descriptor, + new java.lang.String[] { "Ticket", "MatchId", "Token", "Users", "Self", "Id", }); + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor = + internal_static_nakama_realtime_MatchmakerMatched_descriptor.getNestedTypes().get(0); + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor, + new java.lang.String[] { "Presence", "PartyId", "StringProperties", "NumericProperties", }); + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_StringPropertiesEntry_descriptor = + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor.getNestedTypes().get(0); + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_StringPropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_StringPropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry_descriptor = + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_descriptor.getNestedTypes().get(1); + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerMatched_MatchmakerUser_NumericPropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_MatchmakerRemove_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_nakama_realtime_MatchmakerRemove_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerRemove_descriptor, + new java.lang.String[] { "Ticket", }); + internal_static_nakama_realtime_MatchmakerTicket_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_nakama_realtime_MatchmakerTicket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_MatchmakerTicket_descriptor, + new java.lang.String[] { "Ticket", }); + internal_static_nakama_realtime_Notifications_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_nakama_realtime_Notifications_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Notifications_descriptor, + new java.lang.String[] { "Notifications", }); + internal_static_nakama_realtime_Party_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_nakama_realtime_Party_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Party_descriptor, + new java.lang.String[] { "PartyId", "Open", "MaxSize", "Self", "Leader", "Presences", }); + internal_static_nakama_realtime_PartyCreate_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_nakama_realtime_PartyCreate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyCreate_descriptor, + new java.lang.String[] { "Open", "MaxSize", }); + internal_static_nakama_realtime_PartyJoin_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_nakama_realtime_PartyJoin_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyJoin_descriptor, + new java.lang.String[] { "PartyId", }); + internal_static_nakama_realtime_PartyLeave_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_nakama_realtime_PartyLeave_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyLeave_descriptor, + new java.lang.String[] { "PartyId", }); + internal_static_nakama_realtime_PartyPromote_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_nakama_realtime_PartyPromote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyPromote_descriptor, + new java.lang.String[] { "PartyId", "Presence", }); + internal_static_nakama_realtime_PartyLeader_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_nakama_realtime_PartyLeader_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyLeader_descriptor, + new java.lang.String[] { "PartyId", "Presence", }); + internal_static_nakama_realtime_PartyAccept_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_nakama_realtime_PartyAccept_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyAccept_descriptor, + new java.lang.String[] { "PartyId", "Presence", }); + internal_static_nakama_realtime_PartyRemove_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_nakama_realtime_PartyRemove_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyRemove_descriptor, + new java.lang.String[] { "PartyId", "Presence", }); + internal_static_nakama_realtime_PartyClose_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_nakama_realtime_PartyClose_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyClose_descriptor, + new java.lang.String[] { "PartyId", }); + internal_static_nakama_realtime_PartyJoinRequestList_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_nakama_realtime_PartyJoinRequestList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyJoinRequestList_descriptor, + new java.lang.String[] { "PartyId", }); + internal_static_nakama_realtime_PartyJoinRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_nakama_realtime_PartyJoinRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyJoinRequest_descriptor, + new java.lang.String[] { "PartyId", "Presences", }); + internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_nakama_realtime_PartyMatchmakerAdd_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor, + new java.lang.String[] { "PartyId", "MinCount", "MaxCount", "Query", "StringProperties", "NumericProperties", "CountMultiple", }); + internal_static_nakama_realtime_PartyMatchmakerAdd_StringPropertiesEntry_descriptor = + internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor.getNestedTypes().get(0); + internal_static_nakama_realtime_PartyMatchmakerAdd_StringPropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyMatchmakerAdd_StringPropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_PartyMatchmakerAdd_NumericPropertiesEntry_descriptor = + internal_static_nakama_realtime_PartyMatchmakerAdd_descriptor.getNestedTypes().get(1); + internal_static_nakama_realtime_PartyMatchmakerAdd_NumericPropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyMatchmakerAdd_NumericPropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_nakama_realtime_PartyMatchmakerRemove_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_nakama_realtime_PartyMatchmakerRemove_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyMatchmakerRemove_descriptor, + new java.lang.String[] { "PartyId", "Ticket", }); + internal_static_nakama_realtime_PartyMatchmakerTicket_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_nakama_realtime_PartyMatchmakerTicket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyMatchmakerTicket_descriptor, + new java.lang.String[] { "PartyId", "Ticket", }); + internal_static_nakama_realtime_PartyData_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_nakama_realtime_PartyData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyData_descriptor, + new java.lang.String[] { "PartyId", "Presence", "OpCode", "Data", }); + internal_static_nakama_realtime_PartyDataSend_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_nakama_realtime_PartyDataSend_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyDataSend_descriptor, + new java.lang.String[] { "PartyId", "OpCode", "Data", }); + internal_static_nakama_realtime_PartyPresenceEvent_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_nakama_realtime_PartyPresenceEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_PartyPresenceEvent_descriptor, + new java.lang.String[] { "PartyId", "Joins", "Leaves", }); + internal_static_nakama_realtime_Ping_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_nakama_realtime_Ping_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Ping_descriptor, + new java.lang.String[] { }); + internal_static_nakama_realtime_Pong_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_nakama_realtime_Pong_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Pong_descriptor, + new java.lang.String[] { }); + internal_static_nakama_realtime_Status_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_nakama_realtime_Status_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Status_descriptor, + new java.lang.String[] { "Presences", }); + internal_static_nakama_realtime_StatusFollow_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_nakama_realtime_StatusFollow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_StatusFollow_descriptor, + new java.lang.String[] { "UserIds", "Usernames", }); + internal_static_nakama_realtime_StatusPresenceEvent_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_nakama_realtime_StatusPresenceEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_StatusPresenceEvent_descriptor, + new java.lang.String[] { "Joins", "Leaves", }); + internal_static_nakama_realtime_StatusUnfollow_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_nakama_realtime_StatusUnfollow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_StatusUnfollow_descriptor, + new java.lang.String[] { "UserIds", }); + internal_static_nakama_realtime_StatusUpdate_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_nakama_realtime_StatusUpdate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_StatusUpdate_descriptor, + new java.lang.String[] { "Status", }); + internal_static_nakama_realtime_Stream_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_nakama_realtime_Stream_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_Stream_descriptor, + new java.lang.String[] { "Mode", "Subject", "Subcontext", "Label", }); + internal_static_nakama_realtime_StreamData_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_nakama_realtime_StreamData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_StreamData_descriptor, + new java.lang.String[] { "Stream", "Sender", "Data", "Reliable", }); + internal_static_nakama_realtime_StreamPresenceEvent_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_nakama_realtime_StreamPresenceEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_StreamPresenceEvent_descriptor, + new java.lang.String[] { "Stream", "Joins", "Leaves", }); + internal_static_nakama_realtime_UserPresence_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_nakama_realtime_UserPresence_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_nakama_realtime_UserPresence_descriptor, + new java.lang.String[] { "UserId", "SessionId", "Username", "Persistence", "Status", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.heroiclabs.nakama.api.ApiProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Status.java b/src/main/java/com/heroiclabs/nakama/rtapi/Status.java new file mode 100644 index 00000000..4a8309fe --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Status.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A snapshot of statuses for some set of users.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Status} + */ +public final class Status extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Status) + StatusOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Status.class.getName()); + } + // Use Status.newBuilder() to construct. + private Status(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Status() { + presences_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Status_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Status_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Status.class, com.heroiclabs.nakama.rtapi.Status.Builder.class); + } + + public static final int PRESENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List presences_; + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List getPresencesList() { + return presences_; + } + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + @java.lang.Override + public java.util.List + getPresencesOrBuilderList() { + return presences_; + } + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + @java.lang.Override + public int getPresencesCount() { + return presences_.size(); + } + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + return presences_.get(index); + } + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + return presences_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < presences_.size(); i++) { + output.writeMessage(1, presences_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < presences_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, presences_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Status)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Status other = (com.heroiclabs.nakama.rtapi.Status) obj; + + if (!getPresencesList() + .equals(other.getPresencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPresencesCount() > 0) { + hash = (37 * hash) + PRESENCES_FIELD_NUMBER; + hash = (53 * hash) + getPresencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Status parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Status parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Status parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Status prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A snapshot of statuses for some set of users.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Status} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Status) + com.heroiclabs.nakama.rtapi.StatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Status_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Status_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Status.class, com.heroiclabs.nakama.rtapi.Status.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Status.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + } else { + presences_ = null; + presencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Status_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Status getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Status.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Status build() { + com.heroiclabs.nakama.rtapi.Status result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Status buildPartial() { + com.heroiclabs.nakama.rtapi.Status result = new com.heroiclabs.nakama.rtapi.Status(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.Status result) { + if (presencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + presences_ = java.util.Collections.unmodifiableList(presences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.presences_ = presences_; + } else { + result.presences_ = presencesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Status result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Status) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Status)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Status other) { + if (other == com.heroiclabs.nakama.rtapi.Status.getDefaultInstance()) return this; + if (presencesBuilder_ == null) { + if (!other.presences_.isEmpty()) { + if (presences_.isEmpty()) { + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePresencesIsMutable(); + presences_.addAll(other.presences_); + } + onChanged(); + } + } else { + if (!other.presences_.isEmpty()) { + if (presencesBuilder_.isEmpty()) { + presencesBuilder_.dispose(); + presencesBuilder_ = null; + presences_ = other.presences_; + bitField0_ = (bitField0_ & ~0x00000001); + presencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPresencesFieldBuilder() : null; + } else { + presencesBuilder_.addAllMessages(other.presences_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(m); + } else { + presencesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List presences_ = + java.util.Collections.emptyList(); + private void ensurePresencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + presences_ = new java.util.ArrayList(presences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> presencesBuilder_; + + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public java.util.List getPresencesList() { + if (presencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(presences_); + } else { + return presencesBuilder_.getMessageList(); + } + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public int getPresencesCount() { + if (presencesBuilder_ == null) { + return presences_.size(); + } else { + return presencesBuilder_.getCount(); + } + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); + } else { + return presencesBuilder_.getMessage(index); + } + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.set(index, value); + onChanged(); + } else { + presencesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder setPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.set(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder addPresences(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(value); + onChanged(); + } else { + presencesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (presencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePresencesIsMutable(); + presences_.add(index, value); + onChanged(); + } else { + presencesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder addPresences( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder addPresences( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.add(index, builderForValue.build()); + onChanged(); + } else { + presencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder addAllPresences( + java.lang.Iterable values) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, presences_); + onChanged(); + } else { + presencesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder clearPresences() { + if (presencesBuilder_ == null) { + presences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + presencesBuilder_.clear(); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public Builder removePresences(int index) { + if (presencesBuilder_ == null) { + ensurePresencesIsMutable(); + presences_.remove(index); + onChanged(); + } else { + presencesBuilder_.remove(index); + } + return this; + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getPresencesBuilder( + int index) { + return getPresencesFieldBuilder().getBuilder(index); + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index) { + if (presencesBuilder_ == null) { + return presences_.get(index); } else { + return presencesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public java.util.List + getPresencesOrBuilderList() { + if (presencesBuilder_ != null) { + return presencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(presences_); + } + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder() { + return getPresencesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addPresencesBuilder( + int index) { + return getPresencesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * User statuses.
+     * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + public java.util.List + getPresencesBuilderList() { + return getPresencesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getPresencesFieldBuilder() { + if (presencesBuilder_ == null) { + presencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + presences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + presences_ = null; + } + return presencesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Status) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Status) + private static final com.heroiclabs.nakama.rtapi.Status DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Status(); + } + + public static com.heroiclabs.nakama.rtapi.Status getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Status parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Status getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusFollow.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusFollow.java new file mode 100644 index 00000000..7f248161 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusFollow.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Start receiving status updates for some set of users.
+ * 
+ * + * Protobuf type {@code nakama.realtime.StatusFollow} + */ +public final class StatusFollow extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.StatusFollow) + StatusFollowOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StatusFollow.class.getName()); + } + // Use StatusFollow.newBuilder() to construct. + private StatusFollow(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StatusFollow() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusFollow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusFollow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusFollow.class, com.heroiclabs.nakama.rtapi.StatusFollow.Builder.class); + } + + public static final int USER_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + return userIds_; + } + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + + public static final int USERNAMES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + return usernames_; + } + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < userIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userIds_.getRaw(i)); + } + for (int i = 0; i < usernames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, usernames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < userIds_.size(); i++) { + dataSize += computeStringSizeNoTag(userIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < usernames_.size(); i++) { + dataSize += computeStringSizeNoTag(usernames_.getRaw(i)); + } + size += dataSize; + size += 1 * getUsernamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.StatusFollow)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.StatusFollow other = (com.heroiclabs.nakama.rtapi.StatusFollow) obj; + + if (!getUserIdsList() + .equals(other.getUserIdsList())) return false; + if (!getUsernamesList() + .equals(other.getUsernamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserIdsCount() > 0) { + hash = (37 * hash) + USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUserIdsList().hashCode(); + } + if (getUsernamesCount() > 0) { + hash = (37 * hash) + USERNAMES_FIELD_NUMBER; + hash = (53 * hash) + getUsernamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.StatusFollow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.StatusFollow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusFollow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.StatusFollow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Start receiving status updates for some set of users.
+   * 
+ * + * Protobuf type {@code nakama.realtime.StatusFollow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.StatusFollow) + com.heroiclabs.nakama.rtapi.StatusFollowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusFollow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusFollow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusFollow.class, com.heroiclabs.nakama.rtapi.StatusFollow.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.StatusFollow.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusFollow_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollow getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollow build() { + com.heroiclabs.nakama.rtapi.StatusFollow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollow buildPartial() { + com.heroiclabs.nakama.rtapi.StatusFollow result = new com.heroiclabs.nakama.rtapi.StatusFollow(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.StatusFollow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + userIds_.makeImmutable(); + result.userIds_ = userIds_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + usernames_.makeImmutable(); + result.usernames_ = usernames_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.StatusFollow) { + return mergeFrom((com.heroiclabs.nakama.rtapi.StatusFollow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.StatusFollow other) { + if (other == com.heroiclabs.nakama.rtapi.StatusFollow.getDefaultInstance()) return this; + if (!other.userIds_.isEmpty()) { + if (userIds_.isEmpty()) { + userIds_ = other.userIds_; + bitField0_ |= 0x00000001; + } else { + ensureUserIdsIsMutable(); + userIds_.addAll(other.userIds_); + } + onChanged(); + } + if (!other.usernames_.isEmpty()) { + if (usernames_.isEmpty()) { + usernames_ = other.usernames_; + bitField0_ |= 0x00000002; + } else { + ensureUsernamesIsMutable(); + usernames_.addAll(other.usernames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserIdsIsMutable(); + userIds_.add(s); + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUsernamesIsMutable(); + usernames_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUserIdsIsMutable() { + if (!userIds_.isModifiable()) { + userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + userIds_.makeImmutable(); + return userIds_; + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index to set the value at. + * @param value The userIds to set. + * @return This builder for chaining. + */ + public Builder setUserIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param value The userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param values The userIds to add. + * @return This builder for chaining. + */ + public Builder addAllUserIds( + java.lang.Iterable values) { + ensureUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userIds_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return This builder for chaining. + */ + public Builder clearUserIds() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * User IDs to follow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param value The bytes of the userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUsernamesIsMutable() { + if (!usernames_.isModifiable()) { + usernames_ = new com.google.protobuf.LazyStringArrayList(usernames_); + } + bitField0_ |= 0x00000002; + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + public com.google.protobuf.ProtocolStringList + getUsernamesList() { + usernames_.makeImmutable(); + return usernames_; + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + public int getUsernamesCount() { + return usernames_.size(); + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + public java.lang.String getUsernames(int index) { + return usernames_.get(index); + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + public com.google.protobuf.ByteString + getUsernamesBytes(int index) { + return usernames_.getByteString(index); + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index to set the value at. + * @param value The usernames to set. + * @return This builder for chaining. + */ + public Builder setUsernames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param values The usernames to add. + * @return This builder for chaining. + */ + public Builder addAllUsernames( + java.lang.Iterable values) { + ensureUsernamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, usernames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return This builder for chaining. + */ + public Builder clearUsernames() { + usernames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
+     * Usernames to follow.
+     * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param value The bytes of the usernames to add. + * @return This builder for chaining. + */ + public Builder addUsernamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUsernamesIsMutable(); + usernames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.StatusFollow) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.StatusFollow) + private static final com.heroiclabs.nakama.rtapi.StatusFollow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.StatusFollow(); + } + + public static com.heroiclabs.nakama.rtapi.StatusFollow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StatusFollow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusFollow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusFollowOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusFollowOrBuilder.java new file mode 100644 index 00000000..c767ebc4 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusFollowOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StatusFollowOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.StatusFollow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + java.util.List + getUserIdsList(); + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return The count of userIds. + */ + int getUserIdsCount(); + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + java.lang.String getUserIds(int index); + /** + *
+   * User IDs to follow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + com.google.protobuf.ByteString + getUserIdsBytes(int index); + + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return A list containing the usernames. + */ + java.util.List + getUsernamesList(); + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @return The count of usernames. + */ + int getUsernamesCount(); + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the element to return. + * @return The usernames at the given index. + */ + java.lang.String getUsernames(int index); + /** + *
+   * Usernames to follow.
+   * 
+ * + * repeated string usernames = 2 [json_name = "usernames"]; + * @param index The index of the value to return. + * @return The bytes of the usernames at the given index. + */ + com.google.protobuf.ByteString + getUsernamesBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusOrBuilder.java new file mode 100644 index 00000000..38f3059b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Status) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + java.util.List + getPresencesList(); + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getPresences(int index); + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + int getPresencesCount(); + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + java.util.List + getPresencesOrBuilderList(); + /** + *
+   * User statuses.
+   * 
+ * + * repeated .nakama.realtime.UserPresence presences = 1 [json_name = "presences"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getPresencesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEvent.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEvent.java new file mode 100644 index 00000000..631adfbc --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEvent.java @@ -0,0 +1,1261 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A batch of status updates for a given user.
+ * 
+ * + * Protobuf type {@code nakama.realtime.StatusPresenceEvent} + */ +public final class StatusPresenceEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.StatusPresenceEvent) + StatusPresenceEventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StatusPresenceEvent.class.getName()); + } + // Use StatusPresenceEvent.newBuilder() to construct. + private StatusPresenceEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StatusPresenceEvent() { + joins_ = java.util.Collections.emptyList(); + leaves_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusPresenceEvent.class, com.heroiclabs.nakama.rtapi.StatusPresenceEvent.Builder.class); + } + + public static final int JOINS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List joins_; + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List getJoinsList() { + return joins_; + } + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List + getJoinsOrBuilderList() { + return joins_; + } + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public int getJoinsCount() { + return joins_.size(); + } + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + return joins_.get(index); + } + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + return joins_.get(index); + } + + public static final int LEAVES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List leaves_; + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List getLeavesList() { + return leaves_; + } + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List + getLeavesOrBuilderList() { + return leaves_; + } + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public int getLeavesCount() { + return leaves_.size(); + } + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + return leaves_.get(index); + } + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + return leaves_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < joins_.size(); i++) { + output.writeMessage(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + output.writeMessage(3, leaves_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < joins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, leaves_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.StatusPresenceEvent)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.StatusPresenceEvent other = (com.heroiclabs.nakama.rtapi.StatusPresenceEvent) obj; + + if (!getJoinsList() + .equals(other.getJoinsList())) return false; + if (!getLeavesList() + .equals(other.getLeavesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJoinsCount() > 0) { + hash = (37 * hash) + JOINS_FIELD_NUMBER; + hash = (53 * hash) + getJoinsList().hashCode(); + } + if (getLeavesCount() > 0) { + hash = (37 * hash) + LEAVES_FIELD_NUMBER; + hash = (53 * hash) + getLeavesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.StatusPresenceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A batch of status updates for a given user.
+   * 
+ * + * Protobuf type {@code nakama.realtime.StatusPresenceEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.StatusPresenceEvent) + com.heroiclabs.nakama.rtapi.StatusPresenceEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusPresenceEvent.class, com.heroiclabs.nakama.rtapi.StatusPresenceEvent.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.StatusPresenceEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + } else { + joins_ = null; + joinsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + } else { + leaves_ = null; + leavesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusPresenceEvent_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEvent getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEvent build() { + com.heroiclabs.nakama.rtapi.StatusPresenceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEvent buildPartial() { + com.heroiclabs.nakama.rtapi.StatusPresenceEvent result = new com.heroiclabs.nakama.rtapi.StatusPresenceEvent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.StatusPresenceEvent result) { + if (joinsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + joins_ = java.util.Collections.unmodifiableList(joins_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.joins_ = joins_; + } else { + result.joins_ = joinsBuilder_.build(); + } + if (leavesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + leaves_ = java.util.Collections.unmodifiableList(leaves_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.leaves_ = leaves_; + } else { + result.leaves_ = leavesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.StatusPresenceEvent result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.StatusPresenceEvent) { + return mergeFrom((com.heroiclabs.nakama.rtapi.StatusPresenceEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.StatusPresenceEvent other) { + if (other == com.heroiclabs.nakama.rtapi.StatusPresenceEvent.getDefaultInstance()) return this; + if (joinsBuilder_ == null) { + if (!other.joins_.isEmpty()) { + if (joins_.isEmpty()) { + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJoinsIsMutable(); + joins_.addAll(other.joins_); + } + onChanged(); + } + } else { + if (!other.joins_.isEmpty()) { + if (joinsBuilder_.isEmpty()) { + joinsBuilder_.dispose(); + joinsBuilder_ = null; + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000001); + joinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getJoinsFieldBuilder() : null; + } else { + joinsBuilder_.addAllMessages(other.joins_); + } + } + } + if (leavesBuilder_ == null) { + if (!other.leaves_.isEmpty()) { + if (leaves_.isEmpty()) { + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLeavesIsMutable(); + leaves_.addAll(other.leaves_); + } + onChanged(); + } + } else { + if (!other.leaves_.isEmpty()) { + if (leavesBuilder_.isEmpty()) { + leavesBuilder_.dispose(); + leavesBuilder_ = null; + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000002); + leavesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLeavesFieldBuilder() : null; + } else { + leavesBuilder_.addAllMessages(other.leaves_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(m); + } else { + joinsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(m); + } else { + leavesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List joins_ = + java.util.Collections.emptyList(); + private void ensureJoinsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + joins_ = new java.util.ArrayList(joins_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> joinsBuilder_; + + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List getJoinsList() { + if (joinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(joins_); + } else { + return joinsBuilder_.getMessageList(); + } + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public int getJoinsCount() { + if (joinsBuilder_ == null) { + return joins_.size(); + } else { + return joinsBuilder_.getCount(); + } + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); + } else { + return joinsBuilder_.getMessage(index); + } + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.set(index, value); + onChanged(); + } else { + joinsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.set(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(value); + onChanged(); + } else { + joinsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(index, value); + onChanged(); + } else { + joinsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addAllJoins( + java.lang.Iterable values) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, joins_); + onChanged(); + } else { + joinsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder clearJoins() { + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + joinsBuilder_.clear(); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder removeJoins(int index) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.remove(index); + onChanged(); + } else { + joinsBuilder_.remove(index); + } + return this; + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getJoinsBuilder( + int index) { + return getJoinsFieldBuilder().getBuilder(index); + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); } else { + return joinsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsOrBuilderList() { + if (joinsBuilder_ != null) { + return joinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(joins_); + } + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder() { + return getJoinsFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder( + int index) { + return getJoinsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * New statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsBuilderList() { + return getJoinsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getJoinsFieldBuilder() { + if (joinsBuilder_ == null) { + joinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + joins_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + joins_ = null; + } + return joinsBuilder_; + } + + private java.util.List leaves_ = + java.util.Collections.emptyList(); + private void ensureLeavesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + leaves_ = new java.util.ArrayList(leaves_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> leavesBuilder_; + + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List getLeavesList() { + if (leavesBuilder_ == null) { + return java.util.Collections.unmodifiableList(leaves_); + } else { + return leavesBuilder_.getMessageList(); + } + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public int getLeavesCount() { + if (leavesBuilder_ == null) { + return leaves_.size(); + } else { + return leavesBuilder_.getCount(); + } + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); + } else { + return leavesBuilder_.getMessage(index); + } + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.set(index, value); + onChanged(); + } else { + leavesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.set(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(value); + onChanged(); + } else { + leavesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(index, value); + onChanged(); + } else { + leavesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addAllLeaves( + java.lang.Iterable values) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, leaves_); + onChanged(); + } else { + leavesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder clearLeaves() { + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + leavesBuilder_.clear(); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder removeLeaves(int index) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.remove(index); + onChanged(); + } else { + leavesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getLeavesBuilder( + int index) { + return getLeavesFieldBuilder().getBuilder(index); + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); } else { + return leavesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesOrBuilderList() { + if (leavesBuilder_ != null) { + return leavesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(leaves_); + } + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder() { + return getLeavesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder( + int index) { + return getLeavesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Previous statuses for the user.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesBuilderList() { + return getLeavesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getLeavesFieldBuilder() { + if (leavesBuilder_ == null) { + leavesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + leaves_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + leaves_ = null; + } + return leavesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.StatusPresenceEvent) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.StatusPresenceEvent) + private static final com.heroiclabs.nakama.rtapi.StatusPresenceEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.StatusPresenceEvent(); + } + + public static com.heroiclabs.nakama.rtapi.StatusPresenceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StatusPresenceEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusPresenceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEventOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEventOrBuilder.java new file mode 100644 index 00000000..5632c1b2 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusPresenceEventOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StatusPresenceEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.StatusPresenceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsList(); + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index); + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + int getJoinsCount(); + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsOrBuilderList(); + /** + *
+   * New statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index); + + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesList(); + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index); + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + int getLeavesCount(); + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesOrBuilderList(); + /** + *
+   * Previous statuses for the user.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollow.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollow.java new file mode 100644 index 00000000..f5184a17 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollow.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Stop receiving status updates for some set of users.
+ * 
+ * + * Protobuf type {@code nakama.realtime.StatusUnfollow} + */ +public final class StatusUnfollow extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.StatusUnfollow) + StatusUnfollowOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StatusUnfollow.class.getName()); + } + // Use StatusUnfollow.newBuilder() to construct. + private StatusUnfollow(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StatusUnfollow() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUnfollow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUnfollow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusUnfollow.class, com.heroiclabs.nakama.rtapi.StatusUnfollow.Builder.class); + } + + public static final int USER_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + return userIds_; + } + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < userIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < userIds_.size(); i++) { + dataSize += computeStringSizeNoTag(userIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUserIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.StatusUnfollow)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.StatusUnfollow other = (com.heroiclabs.nakama.rtapi.StatusUnfollow) obj; + + if (!getUserIdsList() + .equals(other.getUserIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserIdsCount() > 0) { + hash = (37 * hash) + USER_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUserIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusUnfollow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.StatusUnfollow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Stop receiving status updates for some set of users.
+   * 
+ * + * Protobuf type {@code nakama.realtime.StatusUnfollow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.StatusUnfollow) + com.heroiclabs.nakama.rtapi.StatusUnfollowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUnfollow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUnfollow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusUnfollow.class, com.heroiclabs.nakama.rtapi.StatusUnfollow.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.StatusUnfollow.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUnfollow_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollow getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollow build() { + com.heroiclabs.nakama.rtapi.StatusUnfollow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollow buildPartial() { + com.heroiclabs.nakama.rtapi.StatusUnfollow result = new com.heroiclabs.nakama.rtapi.StatusUnfollow(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.StatusUnfollow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + userIds_.makeImmutable(); + result.userIds_ = userIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.StatusUnfollow) { + return mergeFrom((com.heroiclabs.nakama.rtapi.StatusUnfollow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.StatusUnfollow other) { + if (other == com.heroiclabs.nakama.rtapi.StatusUnfollow.getDefaultInstance()) return this; + if (!other.userIds_.isEmpty()) { + if (userIds_.isEmpty()) { + userIds_ = other.userIds_; + bitField0_ |= 0x00000001; + } else { + ensureUserIdsIsMutable(); + userIds_.addAll(other.userIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserIdsIsMutable(); + userIds_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUserIdsIsMutable() { + if (!userIds_.isModifiable()) { + userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + public com.google.protobuf.ProtocolStringList + getUserIdsList() { + userIds_.makeImmutable(); + return userIds_; + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return The count of userIds. + */ + public int getUserIdsCount() { + return userIds_.size(); + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + public java.lang.String getUserIds(int index) { + return userIds_.get(index); + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + public com.google.protobuf.ByteString + getUserIdsBytes(int index) { + return userIds_.getByteString(index); + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index to set the value at. + * @param value The userIds to set. + * @return This builder for chaining. + */ + public Builder setUserIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param value The userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param values The userIds to add. + * @return This builder for chaining. + */ + public Builder addAllUserIds( + java.lang.Iterable values) { + ensureUserIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, userIds_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return This builder for chaining. + */ + public Builder clearUserIds() { + userIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * Users to unfollow.
+     * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param value The bytes of the userIds to add. + * @return This builder for chaining. + */ + public Builder addUserIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUserIdsIsMutable(); + userIds_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.StatusUnfollow) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.StatusUnfollow) + private static final com.heroiclabs.nakama.rtapi.StatusUnfollow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.StatusUnfollow(); + } + + public static com.heroiclabs.nakama.rtapi.StatusUnfollow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StatusUnfollow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUnfollow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollowOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollowOrBuilder.java new file mode 100644 index 00000000..e21e629c --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUnfollowOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StatusUnfollowOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.StatusUnfollow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return A list containing the userIds. + */ + java.util.List + getUserIdsList(); + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @return The count of userIds. + */ + int getUserIdsCount(); + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the element to return. + * @return The userIds at the given index. + */ + java.lang.String getUserIds(int index); + /** + *
+   * Users to unfollow.
+   * 
+ * + * repeated string user_ids = 1 [json_name = "userIds"]; + * @param index The index of the value to return. + * @return The bytes of the userIds at the given index. + */ + com.google.protobuf.ByteString + getUserIdsBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdate.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdate.java new file mode 100644 index 00000000..97d26be8 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdate.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Set the user's own status.
+ * 
+ * + * Protobuf type {@code nakama.realtime.StatusUpdate} + */ +public final class StatusUpdate extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.StatusUpdate) + StatusUpdateOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StatusUpdate.class.getName()); + } + // Use StatusUpdate.newBuilder() to construct. + private StatusUpdate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StatusUpdate() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusUpdate.class, com.heroiclabs.nakama.rtapi.StatusUpdate.Builder.class); + } + + private int bitField0_; + public static final int STATUS_FIELD_NUMBER = 1; + private com.google.protobuf.StringValue status_; + /** + *
+   * Status string to set, if not present the user will appear offline.
+   * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Status string to set, if not present the user will appear offline.
+   * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override + public com.google.protobuf.StringValue getStatus() { + return status_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : status_; + } + /** + *
+   * Status string to set, if not present the user will appear offline.
+   * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : status_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStatus()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.StatusUpdate)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.StatusUpdate other = (com.heroiclabs.nakama.rtapi.StatusUpdate) obj; + + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus() + .equals(other.getStatus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StatusUpdate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.StatusUpdate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set the user's own status.
+   * 
+ * + * Protobuf type {@code nakama.realtime.StatusUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.StatusUpdate) + com.heroiclabs.nakama.rtapi.StatusUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StatusUpdate.class, com.heroiclabs.nakama.rtapi.StatusUpdate.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.StatusUpdate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getStatusFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StatusUpdate_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdate getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdate build() { + com.heroiclabs.nakama.rtapi.StatusUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdate buildPartial() { + com.heroiclabs.nakama.rtapi.StatusUpdate result = new com.heroiclabs.nakama.rtapi.StatusUpdate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.StatusUpdate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.status_ = statusBuilder_ == null + ? status_ + : statusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.StatusUpdate) { + return mergeFrom((com.heroiclabs.nakama.rtapi.StatusUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.StatusUpdate other) { + if (other == com.heroiclabs.nakama.rtapi.StatusUpdate.getDefaultInstance()) return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStatusFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.StringValue status_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> statusBuilder_; + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + * @return The status. + */ + public com.google.protobuf.StringValue getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + public Builder setStatus(com.google.protobuf.StringValue value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + public Builder setStatus( + com.google.protobuf.StringValue.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + public Builder mergeStatus(com.google.protobuf.StringValue value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + status_ != null && + status_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + if (status_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + public com.google.protobuf.StringValue.Builder getStatusBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + public com.google.protobuf.StringValueOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : status_; + } + } + /** + *
+     * Status string to set, if not present the user will appear offline.
+     * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.StatusUpdate) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.StatusUpdate) + private static final com.heroiclabs.nakama.rtapi.StatusUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.StatusUpdate(); + } + + public static com.heroiclabs.nakama.rtapi.StatusUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StatusUpdate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StatusUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdateOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdateOrBuilder.java new file mode 100644 index 00000000..6530209b --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StatusUpdateOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StatusUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.StatusUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Status string to set, if not present the user will appear offline.
+   * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + *
+   * Status string to set, if not present the user will appear offline.
+   * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + * @return The status. + */ + com.google.protobuf.StringValue getStatus(); + /** + *
+   * Status string to set, if not present the user will appear offline.
+   * 
+ * + * .google.protobuf.StringValue status = 1 [json_name = "status"]; + */ + com.google.protobuf.StringValueOrBuilder getStatusOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/Stream.java b/src/main/java/com/heroiclabs/nakama/rtapi/Stream.java new file mode 100644 index 00000000..7b8c7ec6 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/Stream.java @@ -0,0 +1,947 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * Represents identifying information for a stream.
+ * 
+ * + * Protobuf type {@code nakama.realtime.Stream} + */ +public final class Stream extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.Stream) + StreamOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Stream.class.getName()); + } + // Use Stream.newBuilder() to construct. + private Stream(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Stream() { + subject_ = ""; + subcontext_ = ""; + label_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Stream_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Stream_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Stream.class, com.heroiclabs.nakama.rtapi.Stream.Builder.class); + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + /** + *
+   * Mode identifies the type of stream.
+   * 
+ * + * int32 mode = 1 [json_name = "mode"]; + * @return The mode. + */ + @java.lang.Override + public int getMode() { + return mode_; + } + + public static final int SUBJECT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object subject_ = ""; + /** + *
+   * Subject is the primary identifier, if any.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The subject. + */ + @java.lang.Override + public java.lang.String getSubject() { + java.lang.Object ref = subject_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subject_ = s; + return s; + } + } + /** + *
+   * Subject is the primary identifier, if any.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The bytes for subject. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectBytes() { + java.lang.Object ref = subject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCONTEXT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object subcontext_ = ""; + /** + *
+   * Subcontext is a secondary identifier, if any.
+   * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @return The subcontext. + */ + @java.lang.Override + public java.lang.String getSubcontext() { + java.lang.Object ref = subcontext_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subcontext_ = s; + return s; + } + } + /** + *
+   * Subcontext is a secondary identifier, if any.
+   * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @return The bytes for subcontext. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubcontextBytes() { + java.lang.Object ref = subcontext_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subcontext_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABEL_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object label_ = ""; + /** + *
+   * The label is an arbitrary identifying string, if the stream has one.
+   * 
+ * + * string label = 4 [json_name = "label"]; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+   * The label is an arbitrary identifying string, if the stream has one.
+   * 
+ * + * string label = 4 [json_name = "label"]; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (mode_ != 0) { + output.writeInt32(1, mode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subject_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, subject_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subcontext_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, subcontext_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, label_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, mode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subject_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, subject_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(subcontext_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, subcontext_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, label_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.Stream)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.Stream other = (com.heroiclabs.nakama.rtapi.Stream) obj; + + if (getMode() + != other.getMode()) return false; + if (!getSubject() + .equals(other.getSubject())) return false; + if (!getSubcontext() + .equals(other.getSubcontext())) return false; + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode(); + hash = (37 * hash) + SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getSubject().hashCode(); + hash = (37 * hash) + SUBCONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSubcontext().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.Stream parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.Stream parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.Stream parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.Stream prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents identifying information for a stream.
+   * 
+ * + * Protobuf type {@code nakama.realtime.Stream} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.Stream) + com.heroiclabs.nakama.rtapi.StreamOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Stream_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Stream_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.Stream.class, com.heroiclabs.nakama.rtapi.Stream.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.Stream.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + subject_ = ""; + subcontext_ = ""; + label_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_Stream_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Stream getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Stream build() { + com.heroiclabs.nakama.rtapi.Stream result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Stream buildPartial() { + com.heroiclabs.nakama.rtapi.Stream result = new com.heroiclabs.nakama.rtapi.Stream(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.Stream result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subject_ = subject_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subcontext_ = subcontext_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.label_ = label_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.Stream) { + return mergeFrom((com.heroiclabs.nakama.rtapi.Stream)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.Stream other) { + if (other == com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance()) return this; + if (other.getMode() != 0) { + setMode(other.getMode()); + } + if (!other.getSubject().isEmpty()) { + subject_ = other.subject_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSubcontext().isEmpty()) { + subcontext_ = other.subcontext_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + mode_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + subject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + subcontext_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + label_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int mode_ ; + /** + *
+     * Mode identifies the type of stream.
+     * 
+ * + * int32 mode = 1 [json_name = "mode"]; + * @return The mode. + */ + @java.lang.Override + public int getMode() { + return mode_; + } + /** + *
+     * Mode identifies the type of stream.
+     * 
+ * + * int32 mode = 1 [json_name = "mode"]; + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(int value) { + + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Mode identifies the type of stream.
+     * 
+ * + * int32 mode = 1 [json_name = "mode"]; + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object subject_ = ""; + /** + *
+     * Subject is the primary identifier, if any.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The subject. + */ + public java.lang.String getSubject() { + java.lang.Object ref = subject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Subject is the primary identifier, if any.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The bytes for subject. + */ + public com.google.protobuf.ByteString + getSubjectBytes() { + java.lang.Object ref = subject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Subject is the primary identifier, if any.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @param value The subject to set. + * @return This builder for chaining. + */ + public Builder setSubject( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Subject is the primary identifier, if any.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return This builder for chaining. + */ + public Builder clearSubject() { + subject_ = getDefaultInstance().getSubject(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Subject is the primary identifier, if any.
+     * 
+ * + * string subject = 2 [json_name = "subject"]; + * @param value The bytes for subject to set. + * @return This builder for chaining. + */ + public Builder setSubjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object subcontext_ = ""; + /** + *
+     * Subcontext is a secondary identifier, if any.
+     * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @return The subcontext. + */ + public java.lang.String getSubcontext() { + java.lang.Object ref = subcontext_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subcontext_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Subcontext is a secondary identifier, if any.
+     * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @return The bytes for subcontext. + */ + public com.google.protobuf.ByteString + getSubcontextBytes() { + java.lang.Object ref = subcontext_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subcontext_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Subcontext is a secondary identifier, if any.
+     * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @param value The subcontext to set. + * @return This builder for chaining. + */ + public Builder setSubcontext( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + subcontext_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Subcontext is a secondary identifier, if any.
+     * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @return This builder for chaining. + */ + public Builder clearSubcontext() { + subcontext_ = getDefaultInstance().getSubcontext(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Subcontext is a secondary identifier, if any.
+     * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @param value The bytes for subcontext to set. + * @return This builder for chaining. + */ + public Builder setSubcontextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + subcontext_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+     * The label is an arbitrary identifying string, if the stream has one.
+     * 
+ * + * string label = 4 [json_name = "label"]; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The label is an arbitrary identifying string, if the stream has one.
+     * 
+ * + * string label = 4 [json_name = "label"]; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The label is an arbitrary identifying string, if the stream has one.
+     * 
+ * + * string label = 4 [json_name = "label"]; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + label_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The label is an arbitrary identifying string, if the stream has one.
+     * 
+ * + * string label = 4 [json_name = "label"]; + * @return This builder for chaining. + */ + public Builder clearLabel() { + label_ = getDefaultInstance().getLabel(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The label is an arbitrary identifying string, if the stream has one.
+     * 
+ * + * string label = 4 [json_name = "label"]; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + label_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.Stream) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.Stream) + private static final com.heroiclabs.nakama.rtapi.Stream DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.Stream(); + } + + public static com.heroiclabs.nakama.rtapi.Stream getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stream parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Stream getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StreamData.java b/src/main/java/com/heroiclabs/nakama/rtapi/StreamData.java new file mode 100644 index 00000000..8c452600 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StreamData.java @@ -0,0 +1,1094 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A data message delivered over a stream.
+ * 
+ * + * Protobuf type {@code nakama.realtime.StreamData} + */ +public final class StreamData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.StreamData) + StreamDataOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StreamData.class.getName()); + } + // Use StreamData.newBuilder() to construct. + private StreamData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StreamData() { + data_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StreamData.class, com.heroiclabs.nakama.rtapi.StreamData.Builder.class); + } + + private int bitField0_; + public static final int STREAM_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.rtapi.Stream stream_; + /** + *
+   * The stream this data message relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return Whether the stream field is set. + */ + @java.lang.Override + public boolean hasStream() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The stream this data message relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return The stream. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Stream getStream() { + return stream_ == null ? com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } + /** + *
+   * The stream this data message relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamOrBuilder getStreamOrBuilder() { + return stream_ == null ? com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } + + public static final int SENDER_FIELD_NUMBER = 2; + private com.heroiclabs.nakama.rtapi.UserPresence sender_; + /** + *
+   * The sender, if any.
+   * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + * @return Whether the sender field is set. + */ + @java.lang.Override + public boolean hasSender() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+   * The sender, if any.
+   * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + * @return The sender. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getSender() { + return sender_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : sender_; + } + /** + *
+   * The sender, if any.
+   * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSenderOrBuilder() { + return sender_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : sender_; + } + + public static final int DATA_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object data_ = ""; + /** + *
+   * Arbitrary contents of the data message.
+   * 
+ * + * string data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public java.lang.String getData() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } + } + /** + *
+   * Arbitrary contents of the data message.
+   * 
+ * + * string data = 3 [json_name = "data"]; + * @return The bytes for data. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELIABLE_FIELD_NUMBER = 4; + private boolean reliable_ = false; + /** + *
+   * True if this data was delivered reliably, false otherwise.
+   * 
+ * + * bool reliable = 4 [json_name = "reliable"]; + * @return The reliable. + */ + @java.lang.Override + public boolean getReliable() { + return reliable_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStream()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSender()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, data_); + } + if (reliable_ != false) { + output.writeBool(4, reliable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStream()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSender()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(data_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, data_); + } + if (reliable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, reliable_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.StreamData)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.StreamData other = (com.heroiclabs.nakama.rtapi.StreamData) obj; + + if (hasStream() != other.hasStream()) return false; + if (hasStream()) { + if (!getStream() + .equals(other.getStream())) return false; + } + if (hasSender() != other.hasSender()) return false; + if (hasSender()) { + if (!getSender() + .equals(other.getSender())) return false; + } + if (!getData() + .equals(other.getData())) return false; + if (getReliable() + != other.getReliable()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStream()) { + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + } + if (hasSender()) { + hash = (37 * hash) + SENDER_FIELD_NUMBER; + hash = (53 * hash) + getSender().hashCode(); + } + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + RELIABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReliable()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.StreamData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.StreamData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StreamData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.StreamData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A data message delivered over a stream.
+   * 
+ * + * Protobuf type {@code nakama.realtime.StreamData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.StreamData) + com.heroiclabs.nakama.rtapi.StreamDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StreamData.class, com.heroiclabs.nakama.rtapi.StreamData.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.StreamData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getStreamFieldBuilder(); + getSenderFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stream_ = null; + if (streamBuilder_ != null) { + streamBuilder_.dispose(); + streamBuilder_ = null; + } + sender_ = null; + if (senderBuilder_ != null) { + senderBuilder_.dispose(); + senderBuilder_ = null; + } + data_ = ""; + reliable_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamData_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamData getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamData build() { + com.heroiclabs.nakama.rtapi.StreamData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamData buildPartial() { + com.heroiclabs.nakama.rtapi.StreamData result = new com.heroiclabs.nakama.rtapi.StreamData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.StreamData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stream_ = streamBuilder_ == null + ? stream_ + : streamBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sender_ = senderBuilder_ == null + ? sender_ + : senderBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.data_ = data_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.reliable_ = reliable_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.StreamData) { + return mergeFrom((com.heroiclabs.nakama.rtapi.StreamData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.StreamData other) { + if (other == com.heroiclabs.nakama.rtapi.StreamData.getDefaultInstance()) return this; + if (other.hasStream()) { + mergeStream(other.getStream()); + } + if (other.hasSender()) { + mergeSender(other.getSender()); + } + if (!other.getData().isEmpty()) { + data_ = other.data_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getReliable() != false) { + setReliable(other.getReliable()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStreamFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getSenderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + data_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + reliable_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.rtapi.Stream stream_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Stream, com.heroiclabs.nakama.rtapi.Stream.Builder, com.heroiclabs.nakama.rtapi.StreamOrBuilder> streamBuilder_; + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return Whether the stream field is set. + */ + public boolean hasStream() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return The stream. + */ + public com.heroiclabs.nakama.rtapi.Stream getStream() { + if (streamBuilder_ == null) { + return stream_ == null ? com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } else { + return streamBuilder_.getMessage(); + } + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder setStream(com.heroiclabs.nakama.rtapi.Stream value) { + if (streamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + } else { + streamBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder setStream( + com.heroiclabs.nakama.rtapi.Stream.Builder builderForValue) { + if (streamBuilder_ == null) { + stream_ = builderForValue.build(); + } else { + streamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder mergeStream(com.heroiclabs.nakama.rtapi.Stream value) { + if (streamBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + stream_ != null && + stream_ != com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance()) { + getStreamBuilder().mergeFrom(value); + } else { + stream_ = value; + } + } else { + streamBuilder_.mergeFrom(value); + } + if (stream_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder clearStream() { + bitField0_ = (bitField0_ & ~0x00000001); + stream_ = null; + if (streamBuilder_ != null) { + streamBuilder_.dispose(); + streamBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public com.heroiclabs.nakama.rtapi.Stream.Builder getStreamBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStreamFieldBuilder().getBuilder(); + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public com.heroiclabs.nakama.rtapi.StreamOrBuilder getStreamOrBuilder() { + if (streamBuilder_ != null) { + return streamBuilder_.getMessageOrBuilder(); + } else { + return stream_ == null ? + com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } + } + /** + *
+     * The stream this data message relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Stream, com.heroiclabs.nakama.rtapi.Stream.Builder, com.heroiclabs.nakama.rtapi.StreamOrBuilder> + getStreamFieldBuilder() { + if (streamBuilder_ == null) { + streamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Stream, com.heroiclabs.nakama.rtapi.Stream.Builder, com.heroiclabs.nakama.rtapi.StreamOrBuilder>( + getStream(), + getParentForChildren(), + isClean()); + stream_ = null; + } + return streamBuilder_; + } + + private com.heroiclabs.nakama.rtapi.UserPresence sender_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> senderBuilder_; + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + * @return Whether the sender field is set. + */ + public boolean hasSender() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + * @return The sender. + */ + public com.heroiclabs.nakama.rtapi.UserPresence getSender() { + if (senderBuilder_ == null) { + return sender_ == null ? com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : sender_; + } else { + return senderBuilder_.getMessage(); + } + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + public Builder setSender(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (senderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sender_ = value; + } else { + senderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + public Builder setSender( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (senderBuilder_ == null) { + sender_ = builderForValue.build(); + } else { + senderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + public Builder mergeSender(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (senderBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + sender_ != null && + sender_ != com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) { + getSenderBuilder().mergeFrom(value); + } else { + sender_ = value; + } + } else { + senderBuilder_.mergeFrom(value); + } + if (sender_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + public Builder clearSender() { + bitField0_ = (bitField0_ & ~0x00000002); + sender_ = null; + if (senderBuilder_ != null) { + senderBuilder_.dispose(); + senderBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getSenderBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSenderFieldBuilder().getBuilder(); + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSenderOrBuilder() { + if (senderBuilder_ != null) { + return senderBuilder_.getMessageOrBuilder(); + } else { + return sender_ == null ? + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance() : sender_; + } + } + /** + *
+     * The sender, if any.
+     * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getSenderFieldBuilder() { + if (senderBuilder_ == null) { + senderBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + getSender(), + getParentForChildren(), + isClean()); + sender_ = null; + } + return senderBuilder_; + } + + private java.lang.Object data_ = ""; + /** + *
+     * Arbitrary contents of the data message.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @return The data. + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Arbitrary contents of the data message.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @return The bytes for data. + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Arbitrary contents of the data message.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + data_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Arbitrary contents of the data message.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + data_ = getDefaultInstance().getData(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Arbitrary contents of the data message.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @param value The bytes for data to set. + * @return This builder for chaining. + */ + public Builder setDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + data_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean reliable_ ; + /** + *
+     * True if this data was delivered reliably, false otherwise.
+     * 
+ * + * bool reliable = 4 [json_name = "reliable"]; + * @return The reliable. + */ + @java.lang.Override + public boolean getReliable() { + return reliable_; + } + /** + *
+     * True if this data was delivered reliably, false otherwise.
+     * 
+ * + * bool reliable = 4 [json_name = "reliable"]; + * @param value The reliable to set. + * @return This builder for chaining. + */ + public Builder setReliable(boolean value) { + + reliable_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * True if this data was delivered reliably, false otherwise.
+     * 
+ * + * bool reliable = 4 [json_name = "reliable"]; + * @return This builder for chaining. + */ + public Builder clearReliable() { + bitField0_ = (bitField0_ & ~0x00000008); + reliable_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.StreamData) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.StreamData) + private static final com.heroiclabs.nakama.rtapi.StreamData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.StreamData(); + } + + public static com.heroiclabs.nakama.rtapi.StreamData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StreamDataOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StreamDataOrBuilder.java new file mode 100644 index 00000000..622bb191 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StreamDataOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StreamDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.StreamData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The stream this data message relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return Whether the stream field is set. + */ + boolean hasStream(); + /** + *
+   * The stream this data message relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return The stream. + */ + com.heroiclabs.nakama.rtapi.Stream getStream(); + /** + *
+   * The stream this data message relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + com.heroiclabs.nakama.rtapi.StreamOrBuilder getStreamOrBuilder(); + + /** + *
+   * The sender, if any.
+   * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + * @return Whether the sender field is set. + */ + boolean hasSender(); + /** + *
+   * The sender, if any.
+   * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + * @return The sender. + */ + com.heroiclabs.nakama.rtapi.UserPresence getSender(); + /** + *
+   * The sender, if any.
+   * 
+ * + * .nakama.realtime.UserPresence sender = 2 [json_name = "sender"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getSenderOrBuilder(); + + /** + *
+   * Arbitrary contents of the data message.
+   * 
+ * + * string data = 3 [json_name = "data"]; + * @return The data. + */ + java.lang.String getData(); + /** + *
+   * Arbitrary contents of the data message.
+   * 
+ * + * string data = 3 [json_name = "data"]; + * @return The bytes for data. + */ + com.google.protobuf.ByteString + getDataBytes(); + + /** + *
+   * True if this data was delivered reliably, false otherwise.
+   * 
+ * + * bool reliable = 4 [json_name = "reliable"]; + * @return The reliable. + */ + boolean getReliable(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StreamOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StreamOrBuilder.java new file mode 100644 index 00000000..9d1973c0 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StreamOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StreamOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.Stream) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Mode identifies the type of stream.
+   * 
+ * + * int32 mode = 1 [json_name = "mode"]; + * @return The mode. + */ + int getMode(); + + /** + *
+   * Subject is the primary identifier, if any.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The subject. + */ + java.lang.String getSubject(); + /** + *
+   * Subject is the primary identifier, if any.
+   * 
+ * + * string subject = 2 [json_name = "subject"]; + * @return The bytes for subject. + */ + com.google.protobuf.ByteString + getSubjectBytes(); + + /** + *
+   * Subcontext is a secondary identifier, if any.
+   * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @return The subcontext. + */ + java.lang.String getSubcontext(); + /** + *
+   * Subcontext is a secondary identifier, if any.
+   * 
+ * + * string subcontext = 3 [json_name = "subcontext"]; + * @return The bytes for subcontext. + */ + com.google.protobuf.ByteString + getSubcontextBytes(); + + /** + *
+   * The label is an arbitrary identifying string, if the stream has one.
+   * 
+ * + * string label = 4 [json_name = "label"]; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+   * The label is an arbitrary identifying string, if the stream has one.
+   * 
+ * + * string label = 4 [json_name = "label"]; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEvent.java b/src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEvent.java new file mode 100644 index 00000000..097cc4e1 --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEvent.java @@ -0,0 +1,1504 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A set of joins and leaves on a particular stream.
+ * 
+ * + * Protobuf type {@code nakama.realtime.StreamPresenceEvent} + */ +public final class StreamPresenceEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.StreamPresenceEvent) + StreamPresenceEventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + StreamPresenceEvent.class.getName()); + } + // Use StreamPresenceEvent.newBuilder() to construct. + private StreamPresenceEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StreamPresenceEvent() { + joins_ = java.util.Collections.emptyList(); + leaves_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StreamPresenceEvent.class, com.heroiclabs.nakama.rtapi.StreamPresenceEvent.Builder.class); + } + + private int bitField0_; + public static final int STREAM_FIELD_NUMBER = 1; + private com.heroiclabs.nakama.rtapi.Stream stream_; + /** + *
+   * The stream this event relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return Whether the stream field is set. + */ + @java.lang.Override + public boolean hasStream() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The stream this event relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return The stream. + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.Stream getStream() { + return stream_ == null ? com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } + /** + *
+   * The stream this event relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamOrBuilder getStreamOrBuilder() { + return stream_ == null ? com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } + + public static final int JOINS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List joins_; + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List getJoinsList() { + return joins_; + } + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public java.util.List + getJoinsOrBuilderList() { + return joins_; + } + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public int getJoinsCount() { + return joins_.size(); + } + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + return joins_.get(index); + } + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + return joins_.get(index); + } + + public static final int LEAVES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List leaves_; + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List getLeavesList() { + return leaves_; + } + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public java.util.List + getLeavesOrBuilderList() { + return leaves_; + } + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public int getLeavesCount() { + return leaves_.size(); + } + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + return leaves_.get(index); + } + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + return leaves_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStream()); + } + for (int i = 0; i < joins_.size(); i++) { + output.writeMessage(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + output.writeMessage(3, leaves_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStream()); + } + for (int i = 0; i < joins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, joins_.get(i)); + } + for (int i = 0; i < leaves_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, leaves_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.StreamPresenceEvent)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.StreamPresenceEvent other = (com.heroiclabs.nakama.rtapi.StreamPresenceEvent) obj; + + if (hasStream() != other.hasStream()) return false; + if (hasStream()) { + if (!getStream() + .equals(other.getStream())) return false; + } + if (!getJoinsList() + .equals(other.getJoinsList())) return false; + if (!getLeavesList() + .equals(other.getLeavesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStream()) { + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + } + if (getJoinsCount() > 0) { + hash = (37 * hash) + JOINS_FIELD_NUMBER; + hash = (53 * hash) + getJoinsList().hashCode(); + } + if (getLeavesCount() > 0) { + hash = (37 * hash) + LEAVES_FIELD_NUMBER; + hash = (53 * hash) + getLeavesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.StreamPresenceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A set of joins and leaves on a particular stream.
+   * 
+ * + * Protobuf type {@code nakama.realtime.StreamPresenceEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.StreamPresenceEvent) + com.heroiclabs.nakama.rtapi.StreamPresenceEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamPresenceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamPresenceEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.StreamPresenceEvent.class, com.heroiclabs.nakama.rtapi.StreamPresenceEvent.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.StreamPresenceEvent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getStreamFieldBuilder(); + getJoinsFieldBuilder(); + getLeavesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stream_ = null; + if (streamBuilder_ != null) { + streamBuilder_.dispose(); + streamBuilder_ = null; + } + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + } else { + joins_ = null; + joinsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + } else { + leaves_ = null; + leavesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_StreamPresenceEvent_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEvent getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEvent build() { + com.heroiclabs.nakama.rtapi.StreamPresenceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEvent buildPartial() { + com.heroiclabs.nakama.rtapi.StreamPresenceEvent result = new com.heroiclabs.nakama.rtapi.StreamPresenceEvent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.nakama.rtapi.StreamPresenceEvent result) { + if (joinsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + joins_ = java.util.Collections.unmodifiableList(joins_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.joins_ = joins_; + } else { + result.joins_ = joinsBuilder_.build(); + } + if (leavesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + leaves_ = java.util.Collections.unmodifiableList(leaves_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.leaves_ = leaves_; + } else { + result.leaves_ = leavesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.StreamPresenceEvent result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stream_ = streamBuilder_ == null + ? stream_ + : streamBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.StreamPresenceEvent) { + return mergeFrom((com.heroiclabs.nakama.rtapi.StreamPresenceEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.StreamPresenceEvent other) { + if (other == com.heroiclabs.nakama.rtapi.StreamPresenceEvent.getDefaultInstance()) return this; + if (other.hasStream()) { + mergeStream(other.getStream()); + } + if (joinsBuilder_ == null) { + if (!other.joins_.isEmpty()) { + if (joins_.isEmpty()) { + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJoinsIsMutable(); + joins_.addAll(other.joins_); + } + onChanged(); + } + } else { + if (!other.joins_.isEmpty()) { + if (joinsBuilder_.isEmpty()) { + joinsBuilder_.dispose(); + joinsBuilder_ = null; + joins_ = other.joins_; + bitField0_ = (bitField0_ & ~0x00000002); + joinsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getJoinsFieldBuilder() : null; + } else { + joinsBuilder_.addAllMessages(other.joins_); + } + } + } + if (leavesBuilder_ == null) { + if (!other.leaves_.isEmpty()) { + if (leaves_.isEmpty()) { + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLeavesIsMutable(); + leaves_.addAll(other.leaves_); + } + onChanged(); + } + } else { + if (!other.leaves_.isEmpty()) { + if (leavesBuilder_.isEmpty()) { + leavesBuilder_.dispose(); + leavesBuilder_ = null; + leaves_ = other.leaves_; + bitField0_ = (bitField0_ & ~0x00000004); + leavesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLeavesFieldBuilder() : null; + } else { + leavesBuilder_.addAllMessages(other.leaves_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getStreamFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(m); + } else { + joinsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.heroiclabs.nakama.rtapi.UserPresence m = + input.readMessage( + com.heroiclabs.nakama.rtapi.UserPresence.parser(), + extensionRegistry); + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(m); + } else { + leavesBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.heroiclabs.nakama.rtapi.Stream stream_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Stream, com.heroiclabs.nakama.rtapi.Stream.Builder, com.heroiclabs.nakama.rtapi.StreamOrBuilder> streamBuilder_; + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return Whether the stream field is set. + */ + public boolean hasStream() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return The stream. + */ + public com.heroiclabs.nakama.rtapi.Stream getStream() { + if (streamBuilder_ == null) { + return stream_ == null ? com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } else { + return streamBuilder_.getMessage(); + } + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder setStream(com.heroiclabs.nakama.rtapi.Stream value) { + if (streamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + } else { + streamBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder setStream( + com.heroiclabs.nakama.rtapi.Stream.Builder builderForValue) { + if (streamBuilder_ == null) { + stream_ = builderForValue.build(); + } else { + streamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder mergeStream(com.heroiclabs.nakama.rtapi.Stream value) { + if (streamBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + stream_ != null && + stream_ != com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance()) { + getStreamBuilder().mergeFrom(value); + } else { + stream_ = value; + } + } else { + streamBuilder_.mergeFrom(value); + } + if (stream_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public Builder clearStream() { + bitField0_ = (bitField0_ & ~0x00000001); + stream_ = null; + if (streamBuilder_ != null) { + streamBuilder_.dispose(); + streamBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public com.heroiclabs.nakama.rtapi.Stream.Builder getStreamBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStreamFieldBuilder().getBuilder(); + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + public com.heroiclabs.nakama.rtapi.StreamOrBuilder getStreamOrBuilder() { + if (streamBuilder_ != null) { + return streamBuilder_.getMessageOrBuilder(); + } else { + return stream_ == null ? + com.heroiclabs.nakama.rtapi.Stream.getDefaultInstance() : stream_; + } + } + /** + *
+     * The stream this event relates to.
+     * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Stream, com.heroiclabs.nakama.rtapi.Stream.Builder, com.heroiclabs.nakama.rtapi.StreamOrBuilder> + getStreamFieldBuilder() { + if (streamBuilder_ == null) { + streamBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.nakama.rtapi.Stream, com.heroiclabs.nakama.rtapi.Stream.Builder, com.heroiclabs.nakama.rtapi.StreamOrBuilder>( + getStream(), + getParentForChildren(), + isClean()); + stream_ = null; + } + return streamBuilder_; + } + + private java.util.List joins_ = + java.util.Collections.emptyList(); + private void ensureJoinsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + joins_ = new java.util.ArrayList(joins_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> joinsBuilder_; + + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List getJoinsList() { + if (joinsBuilder_ == null) { + return java.util.Collections.unmodifiableList(joins_); + } else { + return joinsBuilder_.getMessageList(); + } + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public int getJoinsCount() { + if (joinsBuilder_ == null) { + return joins_.size(); + } else { + return joinsBuilder_.getCount(); + } + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); + } else { + return joinsBuilder_.getMessage(index); + } + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.set(index, value); + onChanged(); + } else { + joinsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder setJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.set(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(value); + onChanged(); + } else { + joinsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (joinsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJoinsIsMutable(); + joins_.add(index, value); + onChanged(); + } else { + joinsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addJoins( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.add(index, builderForValue.build()); + onChanged(); + } else { + joinsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder addAllJoins( + java.lang.Iterable values) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, joins_); + onChanged(); + } else { + joinsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder clearJoins() { + if (joinsBuilder_ == null) { + joins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + joinsBuilder_.clear(); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public Builder removeJoins(int index) { + if (joinsBuilder_ == null) { + ensureJoinsIsMutable(); + joins_.remove(index); + onChanged(); + } else { + joinsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getJoinsBuilder( + int index) { + return getJoinsFieldBuilder().getBuilder(index); + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index) { + if (joinsBuilder_ == null) { + return joins_.get(index); } else { + return joinsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsOrBuilderList() { + if (joinsBuilder_ != null) { + return joinsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(joins_); + } + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder() { + return getJoinsFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addJoinsBuilder( + int index) { + return getJoinsFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences joining the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + public java.util.List + getJoinsBuilderList() { + return getJoinsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getJoinsFieldBuilder() { + if (joinsBuilder_ == null) { + joinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + joins_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + joins_ = null; + } + return joinsBuilder_; + } + + private java.util.List leaves_ = + java.util.Collections.emptyList(); + private void ensureLeavesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + leaves_ = new java.util.ArrayList(leaves_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> leavesBuilder_; + + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List getLeavesList() { + if (leavesBuilder_ == null) { + return java.util.Collections.unmodifiableList(leaves_); + } else { + return leavesBuilder_.getMessageList(); + } + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public int getLeavesCount() { + if (leavesBuilder_ == null) { + return leaves_.size(); + } else { + return leavesBuilder_.getCount(); + } + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); + } else { + return leavesBuilder_.getMessage(index); + } + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.set(index, value); + onChanged(); + } else { + leavesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder setLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.set(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves(com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(value); + onChanged(); + } else { + leavesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence value) { + if (leavesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLeavesIsMutable(); + leaves_.add(index, value); + onChanged(); + } else { + leavesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addLeaves( + int index, com.heroiclabs.nakama.rtapi.UserPresence.Builder builderForValue) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.add(index, builderForValue.build()); + onChanged(); + } else { + leavesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder addAllLeaves( + java.lang.Iterable values) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, leaves_); + onChanged(); + } else { + leavesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder clearLeaves() { + if (leavesBuilder_ == null) { + leaves_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + leavesBuilder_.clear(); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public Builder removeLeaves(int index) { + if (leavesBuilder_ == null) { + ensureLeavesIsMutable(); + leaves_.remove(index); + onChanged(); + } else { + leavesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder getLeavesBuilder( + int index) { + return getLeavesFieldBuilder().getBuilder(index); + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index) { + if (leavesBuilder_ == null) { + return leaves_.get(index); } else { + return leavesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesOrBuilderList() { + if (leavesBuilder_ != null) { + return leavesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(leaves_); + } + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder() { + return getLeavesFieldBuilder().addBuilder( + com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public com.heroiclabs.nakama.rtapi.UserPresence.Builder addLeavesBuilder( + int index) { + return getLeavesFieldBuilder().addBuilder( + index, com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()); + } + /** + *
+     * Presences leaving the stream as part of this event, if any.
+     * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + public java.util.List + getLeavesBuilderList() { + return getLeavesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder> + getLeavesFieldBuilder() { + if (leavesBuilder_ == null) { + leavesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.nakama.rtapi.UserPresence, com.heroiclabs.nakama.rtapi.UserPresence.Builder, com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder>( + leaves_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + leaves_ = null; + } + return leavesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.StreamPresenceEvent) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.StreamPresenceEvent) + private static final com.heroiclabs.nakama.rtapi.StreamPresenceEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.StreamPresenceEvent(); + } + + public static com.heroiclabs.nakama.rtapi.StreamPresenceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamPresenceEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.StreamPresenceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEventOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEventOrBuilder.java new file mode 100644 index 00000000..7a32107d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/StreamPresenceEventOrBuilder.java @@ -0,0 +1,126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface StreamPresenceEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.StreamPresenceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The stream this event relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return Whether the stream field is set. + */ + boolean hasStream(); + /** + *
+   * The stream this event relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + * @return The stream. + */ + com.heroiclabs.nakama.rtapi.Stream getStream(); + /** + *
+   * The stream this event relates to.
+   * 
+ * + * .nakama.realtime.Stream stream = 1 [json_name = "stream"]; + */ + com.heroiclabs.nakama.rtapi.StreamOrBuilder getStreamOrBuilder(); + + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsList(); + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getJoins(int index); + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + int getJoinsCount(); + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + java.util.List + getJoinsOrBuilderList(); + /** + *
+   * Presences joining the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence joins = 2 [json_name = "joins"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getJoinsOrBuilder( + int index); + + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesList(); + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresence getLeaves(int index); + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + int getLeavesCount(); + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + java.util.List + getLeavesOrBuilderList(); + /** + *
+   * Presences leaving the stream as part of this event, if any.
+   * 
+ * + * repeated .nakama.realtime.UserPresence leaves = 3 [json_name = "leaves"]; + */ + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder getLeavesOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/UserPresence.java b/src/main/java/com/heroiclabs/nakama/rtapi/UserPresence.java new file mode 100644 index 00000000..4b0f248d --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/UserPresence.java @@ -0,0 +1,1189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +/** + *
+ * A user session associated to a stream, usually through a list operation or a join/leave event.
+ * 
+ * + * Protobuf type {@code nakama.realtime.UserPresence} + */ +public final class UserPresence extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:nakama.realtime.UserPresence) + UserPresenceOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + UserPresence.class.getName()); + } + // Use UserPresence.newBuilder() to construct. + private UserPresence(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UserPresence() { + userId_ = ""; + sessionId_ = ""; + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_UserPresence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_UserPresence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.UserPresence.class, com.heroiclabs.nakama.rtapi.UserPresence.Builder.class); + } + + private int bitField0_; + public static final int USER_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + *
+   * The user this presence belongs to.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + *
+   * The user this presence belongs to.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + /** + *
+   * A unique session ID identifying the particular connection, because the user may have many.
+   * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + /** + *
+   * A unique session ID identifying the particular connection, because the user may have many.
+   * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + *
+   * The username for display purposes.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + *
+   * The username for display purposes.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERSISTENCE_FIELD_NUMBER = 4; + private boolean persistence_ = false; + /** + *
+   * Whether this presence generates persistent data/messages, if applicable for the stream type.
+   * 
+ * + * bool persistence = 4 [json_name = "persistence"]; + * @return The persistence. + */ + @java.lang.Override + public boolean getPersistence() { + return persistence_; + } + + public static final int STATUS_FIELD_NUMBER = 5; + private com.google.protobuf.StringValue status_; + /** + *
+   * A user-set status message for this stream, if applicable.
+   * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * A user-set status message for this stream, if applicable.
+   * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override + public com.google.protobuf.StringValue getStatus() { + return status_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : status_; + } + /** + *
+   * A user-set status message for this stream, if applicable.
+   * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : status_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sessionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + if (persistence_ != false) { + output.writeBool(4, persistence_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sessionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + if (persistence_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, persistence_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getStatus()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.nakama.rtapi.UserPresence)) { + return super.equals(obj); + } + com.heroiclabs.nakama.rtapi.UserPresence other = (com.heroiclabs.nakama.rtapi.UserPresence) obj; + + if (!getUserId() + .equals(other.getUserId())) return false; + if (!getSessionId() + .equals(other.getSessionId())) return false; + if (!getUsername() + .equals(other.getUsername())) return false; + if (getPersistence() + != other.getPersistence()) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus() + .equals(other.getStatus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (37 * hash) + PERSISTENCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPersistence()); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.nakama.rtapi.UserPresence parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.nakama.rtapi.UserPresence parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.nakama.rtapi.UserPresence parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.nakama.rtapi.UserPresence prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A user session associated to a stream, usually through a list operation or a join/leave event.
+   * 
+ * + * Protobuf type {@code nakama.realtime.UserPresence} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:nakama.realtime.UserPresence) + com.heroiclabs.nakama.rtapi.UserPresenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_UserPresence_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_UserPresence_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.nakama.rtapi.UserPresence.class, com.heroiclabs.nakama.rtapi.UserPresence.Builder.class); + } + + // Construct using com.heroiclabs.nakama.rtapi.UserPresence.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getStatusFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = ""; + sessionId_ = ""; + username_ = ""; + persistence_ = false; + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.nakama.rtapi.RealtimeProto.internal_static_nakama_realtime_UserPresence_descriptor; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getDefaultInstanceForType() { + return com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence build() { + com.heroiclabs.nakama.rtapi.UserPresence result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence buildPartial() { + com.heroiclabs.nakama.rtapi.UserPresence result = new com.heroiclabs.nakama.rtapi.UserPresence(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.nakama.rtapi.UserPresence result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sessionId_ = sessionId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.persistence_ = persistence_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.status_ = statusBuilder_ == null + ? status_ + : statusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.nakama.rtapi.UserPresence) { + return mergeFrom((com.heroiclabs.nakama.rtapi.UserPresence)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.nakama.rtapi.UserPresence other) { + if (other == com.heroiclabs.nakama.rtapi.UserPresence.getDefaultInstance()) return this; + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPersistence() != false) { + setPersistence(other.getPersistence()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + persistence_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getStatusFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object userId_ = ""; + /** + *
+     * The user this presence belongs to.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user this presence belongs to.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString + getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user this presence belongs to.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The user this presence belongs to.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The user this presence belongs to.
+     * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object sessionId_ = ""; + /** + *
+     * A unique session ID identifying the particular connection, because the user may have many.
+     * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A unique session ID identifying the particular connection, because the user may have many.
+     * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString + getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A unique session ID identifying the particular connection, because the user may have many.
+     * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sessionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * A unique session ID identifying the particular connection, because the user may have many.
+     * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A unique session ID identifying the particular connection, because the user may have many.
+     * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object username_ = ""; + /** + *
+     * The username for display purposes.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The username for display purposes.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The username for display purposes.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The username for display purposes.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The username for display purposes.
+     * 
+ * + * string username = 3 [json_name = "username"]; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean persistence_ ; + /** + *
+     * Whether this presence generates persistent data/messages, if applicable for the stream type.
+     * 
+ * + * bool persistence = 4 [json_name = "persistence"]; + * @return The persistence. + */ + @java.lang.Override + public boolean getPersistence() { + return persistence_; + } + /** + *
+     * Whether this presence generates persistent data/messages, if applicable for the stream type.
+     * 
+ * + * bool persistence = 4 [json_name = "persistence"]; + * @param value The persistence to set. + * @return This builder for chaining. + */ + public Builder setPersistence(boolean value) { + + persistence_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Whether this presence generates persistent data/messages, if applicable for the stream type.
+     * 
+ * + * bool persistence = 4 [json_name = "persistence"]; + * @return This builder for chaining. + */ + public Builder clearPersistence() { + bitField0_ = (bitField0_ & ~0x00000008); + persistence_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.StringValue status_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> statusBuilder_; + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + * @return The status. + */ + public com.google.protobuf.StringValue getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + public Builder setStatus(com.google.protobuf.StringValue value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + public Builder setStatus( + com.google.protobuf.StringValue.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + public Builder mergeStatus(com.google.protobuf.StringValue value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + status_ != null && + status_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + if (status_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000010); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + public com.google.protobuf.StringValue.Builder getStatusBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + public com.google.protobuf.StringValueOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : status_; + } + } + /** + *
+     * A user-set status message for this stream, if applicable.
+     * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + // @@protoc_insertion_point(builder_scope:nakama.realtime.UserPresence) + } + + // @@protoc_insertion_point(class_scope:nakama.realtime.UserPresence) + private static final com.heroiclabs.nakama.rtapi.UserPresence DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.nakama.rtapi.UserPresence(); + } + + public static com.heroiclabs.nakama.rtapi.UserPresence getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserPresence parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.nakama.rtapi.UserPresence getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/nakama/rtapi/UserPresenceOrBuilder.java b/src/main/java/com/heroiclabs/nakama/rtapi/UserPresenceOrBuilder.java new file mode 100644 index 00000000..2e7d51df --- /dev/null +++ b/src/main/java/com/heroiclabs/nakama/rtapi/UserPresenceOrBuilder.java @@ -0,0 +1,108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/nakama-common/rtapi/realtime.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.nakama.rtapi; + +public interface UserPresenceOrBuilder extends + // @@protoc_insertion_point(interface_extends:nakama.realtime.UserPresence) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The user this presence belongs to.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The userId. + */ + java.lang.String getUserId(); + /** + *
+   * The user this presence belongs to.
+   * 
+ * + * string user_id = 1 [json_name = "userId"]; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString + getUserIdBytes(); + + /** + *
+   * A unique session ID identifying the particular connection, because the user may have many.
+   * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @return The sessionId. + */ + java.lang.String getSessionId(); + /** + *
+   * A unique session ID identifying the particular connection, because the user may have many.
+   * 
+ * + * string session_id = 2 [json_name = "sessionId"]; + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString + getSessionIdBytes(); + + /** + *
+   * The username for display purposes.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The username. + */ + java.lang.String getUsername(); + /** + *
+   * The username for display purposes.
+   * 
+ * + * string username = 3 [json_name = "username"]; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + *
+   * Whether this presence generates persistent data/messages, if applicable for the stream type.
+   * 
+ * + * bool persistence = 4 [json_name = "persistence"]; + * @return The persistence. + */ + boolean getPersistence(); + + /** + *
+   * A user-set status message for this stream, if applicable.
+   * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + *
+   * A user-set status message for this stream, if applicable.
+   * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + * @return The status. + */ + com.google.protobuf.StringValue getStatus(); + /** + *
+   * A user-set status message for this stream, if applicable.
+   * 
+ * + * .google.protobuf.StringValue status = 5 [json_name = "status"]; + */ + com.google.protobuf.StringValueOrBuilder getStatusOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequest.java b/src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequest.java new file mode 100644 index 00000000..1f5f619b --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequest.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+ * 
+ * + * Protobuf type {@code satori.api.AuthenticateLogoutRequest} + */ +public final class AuthenticateLogoutRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.AuthenticateLogoutRequest) + AuthenticateLogoutRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateLogoutRequest.class.getName()); + } + // Use AuthenticateLogoutRequest.newBuilder() to construct. + private AuthenticateLogoutRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateLogoutRequest() { + token_ = ""; + refreshToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateLogoutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateLogoutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.AuthenticateLogoutRequest.class, com.heroiclabs.satori.api.AuthenticateLogoutRequest.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFRESH_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object refreshToken_ = ""; + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + @java.lang.Override + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } + } + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, refreshToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, refreshToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.AuthenticateLogoutRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.AuthenticateLogoutRequest other = (com.heroiclabs.satori.api.AuthenticateLogoutRequest) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!getRefreshToken() + .equals(other.getRefreshToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (37 * hash) + REFRESH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRefreshToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.AuthenticateLogoutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+   * 
+ * + * Protobuf type {@code satori.api.AuthenticateLogoutRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.AuthenticateLogoutRequest) + com.heroiclabs.satori.api.AuthenticateLogoutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateLogoutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateLogoutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.AuthenticateLogoutRequest.class, com.heroiclabs.satori.api.AuthenticateLogoutRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.AuthenticateLogoutRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + refreshToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateLogoutRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateLogoutRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.AuthenticateLogoutRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateLogoutRequest build() { + com.heroiclabs.satori.api.AuthenticateLogoutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateLogoutRequest buildPartial() { + com.heroiclabs.satori.api.AuthenticateLogoutRequest result = new com.heroiclabs.satori.api.AuthenticateLogoutRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.AuthenticateLogoutRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.refreshToken_ = refreshToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.AuthenticateLogoutRequest) { + return mergeFrom((com.heroiclabs.satori.api.AuthenticateLogoutRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.AuthenticateLogoutRequest other) { + if (other == com.heroiclabs.satori.api.AuthenticateLogoutRequest.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRefreshToken().isEmpty()) { + refreshToken_ = other.refreshToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + refreshToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Session token to log out.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object refreshToken_ = ""; + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @param value The refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refreshToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return This builder for chaining. + */ + public Builder clearRefreshToken() { + refreshToken_ = getDefaultInstance().getRefreshToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Refresh token to invalidate.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @param value The bytes for refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refreshToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.AuthenticateLogoutRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.AuthenticateLogoutRequest) + private static final com.heroiclabs.satori.api.AuthenticateLogoutRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.AuthenticateLogoutRequest(); + } + + public static com.heroiclabs.satori.api.AuthenticateLogoutRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateLogoutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateLogoutRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequestOrBuilder.java new file mode 100644 index 00000000..6f9b15f0 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/AuthenticateLogoutRequestOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface AuthenticateLogoutRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.AuthenticateLogoutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * Session token to log out.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + java.lang.String getRefreshToken(); + /** + *
+   * Refresh token to invalidate.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + com.google.protobuf.ByteString + getRefreshTokenBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequest.java b/src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequest.java new file mode 100644 index 00000000..925b8b4a --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Authenticate against the server with a refresh token.
+ * 
+ * + * Protobuf type {@code satori.api.AuthenticateRefreshRequest} + */ +public final class AuthenticateRefreshRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.AuthenticateRefreshRequest) + AuthenticateRefreshRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateRefreshRequest.class.getName()); + } + // Use AuthenticateRefreshRequest.newBuilder() to construct. + private AuthenticateRefreshRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateRefreshRequest() { + refreshToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRefreshRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRefreshRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.AuthenticateRefreshRequest.class, com.heroiclabs.satori.api.AuthenticateRefreshRequest.Builder.class); + } + + public static final int REFRESH_TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object refreshToken_ = ""; + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + @java.lang.Override + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } + } + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, refreshToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, refreshToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.AuthenticateRefreshRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.AuthenticateRefreshRequest other = (com.heroiclabs.satori.api.AuthenticateRefreshRequest) obj; + + if (!getRefreshToken() + .equals(other.getRefreshToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REFRESH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRefreshToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.AuthenticateRefreshRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authenticate against the server with a refresh token.
+   * 
+ * + * Protobuf type {@code satori.api.AuthenticateRefreshRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.AuthenticateRefreshRequest) + com.heroiclabs.satori.api.AuthenticateRefreshRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRefreshRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRefreshRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.AuthenticateRefreshRequest.class, com.heroiclabs.satori.api.AuthenticateRefreshRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.AuthenticateRefreshRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + refreshToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRefreshRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRefreshRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.AuthenticateRefreshRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRefreshRequest build() { + com.heroiclabs.satori.api.AuthenticateRefreshRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRefreshRequest buildPartial() { + com.heroiclabs.satori.api.AuthenticateRefreshRequest result = new com.heroiclabs.satori.api.AuthenticateRefreshRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.AuthenticateRefreshRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.refreshToken_ = refreshToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.AuthenticateRefreshRequest) { + return mergeFrom((com.heroiclabs.satori.api.AuthenticateRefreshRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.AuthenticateRefreshRequest other) { + if (other == com.heroiclabs.satori.api.AuthenticateRefreshRequest.getDefaultInstance()) return this; + if (!other.getRefreshToken().isEmpty()) { + refreshToken_ = other.refreshToken_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + refreshToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object refreshToken_ = ""; + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @param value The refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refreshToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @return This builder for chaining. + */ + public Builder clearRefreshToken() { + refreshToken_ = getDefaultInstance().getRefreshToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @param value The bytes for refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refreshToken_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.AuthenticateRefreshRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.AuthenticateRefreshRequest) + private static final com.heroiclabs.satori.api.AuthenticateRefreshRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.AuthenticateRefreshRequest(); + } + + public static com.heroiclabs.satori.api.AuthenticateRefreshRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateRefreshRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRefreshRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequestOrBuilder.java new file mode 100644 index 00000000..5c5b2e58 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/AuthenticateRefreshRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface AuthenticateRefreshRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.AuthenticateRefreshRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + java.lang.String getRefreshToken(); + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 1 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + com.google.protobuf.ByteString + getRefreshTokenBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/AuthenticateRequest.java b/src/main/java/com/heroiclabs/satori/api/AuthenticateRequest.java new file mode 100644 index 00000000..5147e837 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/AuthenticateRequest.java @@ -0,0 +1,1184 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Authentication request
+ * 
+ * + * Protobuf type {@code satori.api.AuthenticateRequest} + */ +public final class AuthenticateRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.AuthenticateRequest) + AuthenticateRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + AuthenticateRequest.class.getName()); + } + // Use AuthenticateRequest.newBuilder() to construct. + private AuthenticateRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private AuthenticateRequest() { + id_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetDefault(); + case 3: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.AuthenticateRequest.class, com.heroiclabs.satori.api.AuthenticateRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Identity ID. Must be between eight and 128 characters (inclusive).
+   * Must be an alphanumeric string with only underscores and hyphens allowed.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Identity ID. Must be between eight and 128 characters (inclusive).
+   * Must be an alphanumeric string with only underscores and hyphens allowed.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FIELD_NUMBER = 2; + private static final class DefaultDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRequest_DefaultEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CUSTOM_FIELD_NUMBER = 3; + private static final class CustomDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRequest_CustomEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetDefault(), + DefaultDefaultEntryHolder.defaultEntry, + 2); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetCustom(), + CustomDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + for (java.util.Map.Entry entry + : internalGetDefault().getMap().entrySet()) { + com.google.protobuf.MapEntry + default__ = DefaultDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, default__); + } + for (java.util.Map.Entry entry + : internalGetCustom().getMap().entrySet()) { + com.google.protobuf.MapEntry + custom__ = CustomDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, custom__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.AuthenticateRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.AuthenticateRequest other = (com.heroiclabs.satori.api.AuthenticateRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!internalGetDefault().equals( + other.internalGetDefault())) return false; + if (!internalGetCustom().equals( + other.internalGetCustom())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (!internalGetDefault().getMap().isEmpty()) { + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + internalGetDefault().hashCode(); + } + if (!internalGetCustom().getMap().isEmpty()) { + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + internalGetCustom().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.AuthenticateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.AuthenticateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.AuthenticateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.AuthenticateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Authentication request
+   * 
+ * + * Protobuf type {@code satori.api.AuthenticateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.AuthenticateRequest) + com.heroiclabs.satori.api.AuthenticateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetDefault(); + case 3: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableDefault(); + case 3: + return internalGetMutableCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.AuthenticateRequest.class, com.heroiclabs.satori.api.AuthenticateRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.AuthenticateRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + internalGetMutableDefault().clear(); + internalGetMutableCustom().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_AuthenticateRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.AuthenticateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRequest build() { + com.heroiclabs.satori.api.AuthenticateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRequest buildPartial() { + com.heroiclabs.satori.api.AuthenticateRequest result = new com.heroiclabs.satori.api.AuthenticateRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.AuthenticateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.default_ = internalGetDefault(); + result.default_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.custom_ = internalGetCustom(); + result.custom_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.AuthenticateRequest) { + return mergeFrom((com.heroiclabs.satori.api.AuthenticateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.AuthenticateRequest other) { + if (other == com.heroiclabs.satori.api.AuthenticateRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDefault().mergeFrom( + other.internalGetDefault()); + bitField0_ |= 0x00000002; + internalGetMutableCustom().mergeFrom( + other.internalGetCustom()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + default__ = input.readMessage( + DefaultDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDefault().getMutableMap().put( + default__.getKey(), default__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + custom__ = input.readMessage( + CustomDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableCustom().getMutableMap().put( + custom__.getKey(), custom__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Identity ID. Must be between eight and 128 characters (inclusive).
+     * Must be an alphanumeric string with only underscores and hyphens allowed.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identity ID. Must be between eight and 128 characters (inclusive).
+     * Must be an alphanumeric string with only underscores and hyphens allowed.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identity ID. Must be between eight and 128 characters (inclusive).
+     * Must be an alphanumeric string with only underscores and hyphens allowed.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Identity ID. Must be between eight and 128 characters (inclusive).
+     * Must be an alphanumeric string with only underscores and hyphens allowed.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Identity ID. Must be between eight and 128 characters (inclusive).
+     * Must be an alphanumeric string with only underscores and hyphens allowed.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + private com.google.protobuf.MapField + internalGetMutableDefault() { + if (default_ == null) { + default_ = com.google.protobuf.MapField.newMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + if (!default_.isMutable()) { + default_ = default_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDefault() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDefault().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + public Builder removeDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDefault().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDefault() { + bitField0_ |= 0x00000002; + return internalGetMutableDefault().getMutableMap(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + public Builder putDefault( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDefault().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + public Builder putAllDefault( + java.util.Map values) { + internalGetMutableDefault().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + private com.google.protobuf.MapField + internalGetMutableCustom() { + if (custom_ == null) { + custom_ = com.google.protobuf.MapField.newMapField( + CustomDefaultEntryHolder.defaultEntry); + } + if (!custom_.isMutable()) { + custom_ = custom_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearCustom() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableCustom().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder removeCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableCustom().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCustom() { + bitField0_ |= 0x00000004; + return internalGetMutableCustom().getMutableMap(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder putCustom( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableCustom().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder putAllCustom( + java.util.Map values) { + internalGetMutableCustom().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.AuthenticateRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.AuthenticateRequest) + private static final com.heroiclabs.satori.api.AuthenticateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.AuthenticateRequest(); + } + + public static com.heroiclabs.satori.api.AuthenticateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.AuthenticateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/AuthenticateRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/AuthenticateRequestOrBuilder.java new file mode 100644 index 00000000..291f3bcb --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/AuthenticateRequestOrBuilder.java @@ -0,0 +1,151 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface AuthenticateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.AuthenticateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identity ID. Must be between eight and 128 characters (inclusive).
+   * Must be an alphanumeric string with only underscores and hyphens allowed.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Identity ID. Must be between eight and 128 characters (inclusive).
+   * Must be an alphanumeric string with only underscores and hyphens allowed.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + int getDefaultCount(); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + boolean containsDefault( + java.lang.String key); + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDefault(); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + java.util.Map + getDefaultMap(); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + java.lang.String getDefaultOrThrow( + java.lang.String key); + + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + int getCustomCount(); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + boolean containsCustom( + java.lang.String key); + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCustom(); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + java.util.Map + getCustomMap(); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + java.lang.String getCustomOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/satori/api/DeleteMessageRequest.java b/src/main/java/com/heroiclabs/satori/api/DeleteMessageRequest.java new file mode 100644 index 00000000..bff05561 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/DeleteMessageRequest.java @@ -0,0 +1,537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * The request to delete a scheduled message.
+ * 
+ * + * Protobuf type {@code satori.api.DeleteMessageRequest} + */ +public final class DeleteMessageRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.DeleteMessageRequest) + DeleteMessageRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + DeleteMessageRequest.class.getName()); + } + // Use DeleteMessageRequest.newBuilder() to construct. + private DeleteMessageRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DeleteMessageRequest() { + id_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_DeleteMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_DeleteMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.DeleteMessageRequest.class, com.heroiclabs.satori.api.DeleteMessageRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The identifier of the message.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The identifier of the message.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.DeleteMessageRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.DeleteMessageRequest other = (com.heroiclabs.satori.api.DeleteMessageRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.DeleteMessageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.DeleteMessageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.DeleteMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.DeleteMessageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request to delete a scheduled message.
+   * 
+ * + * Protobuf type {@code satori.api.DeleteMessageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.DeleteMessageRequest) + com.heroiclabs.satori.api.DeleteMessageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_DeleteMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_DeleteMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.DeleteMessageRequest.class, com.heroiclabs.satori.api.DeleteMessageRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.DeleteMessageRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_DeleteMessageRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.DeleteMessageRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.DeleteMessageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.DeleteMessageRequest build() { + com.heroiclabs.satori.api.DeleteMessageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.DeleteMessageRequest buildPartial() { + com.heroiclabs.satori.api.DeleteMessageRequest result = new com.heroiclabs.satori.api.DeleteMessageRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.DeleteMessageRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.DeleteMessageRequest) { + return mergeFrom((com.heroiclabs.satori.api.DeleteMessageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.DeleteMessageRequest other) { + if (other == com.heroiclabs.satori.api.DeleteMessageRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The identifier of the message.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifier of the message.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifier of the message.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The identifier of the message.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The identifier of the message.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.DeleteMessageRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.DeleteMessageRequest) + private static final com.heroiclabs.satori.api.DeleteMessageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.DeleteMessageRequest(); + } + + public static com.heroiclabs.satori.api.DeleteMessageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteMessageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.DeleteMessageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/DeleteMessageRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/DeleteMessageRequestOrBuilder.java new file mode 100644 index 00000000..74ddb4d3 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/DeleteMessageRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface DeleteMessageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.DeleteMessageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The identifier of the message.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The identifier of the message.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/Event.java b/src/main/java/com/heroiclabs/satori/api/Event.java new file mode 100644 index 00000000..96f71869 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/Event.java @@ -0,0 +1,1436 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * A single event. Usually, but not necessarily, part of a batch.
+ * 
+ * + * Protobuf type {@code satori.api.Event} + */ +public final class Event extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.Event) + EventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Event.class.getName()); + } + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Event() { + name_ = ""; + id_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Event_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Event.class, com.heroiclabs.satori.api.Event.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Event name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Event name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+   * If not supplied the server will assign a randomly generated unique event identifier.
+   * 
+ * + * string id = 2 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+   * If not supplied the server will assign a randomly generated unique event identifier.
+   * 
+ * + * string id = 2 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 3; + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Event_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int VALUE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + *
+   * Optional value.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Optional value.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMESTAMP_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp timestamp_; + /** + *
+   * The time when the event was triggered on the producer side.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * The time when the event was triggered on the producer side.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + *
+   * The time when the event was triggered on the producer side.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, id_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetMetadata(), + MetadataDefaultEntryHolder.defaultEntry, + 3); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, value_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getTimestamp()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, id_); + } + for (java.util.Map.Entry entry + : internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry + metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, metadata__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, value_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getTimestamp()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.Event)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.Event other = (com.heroiclabs.satori.api.Event) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!internalGetMetadata().equals( + other.internalGetMetadata())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp() + .equals(other.getTimestamp())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.Event parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Event parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Event parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Event parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.Event parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.Event parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single event. Usually, but not necessarily, part of a batch.
+   * 
+ * + * Protobuf type {@code satori.api.Event} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.Event) + com.heroiclabs.satori.api.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Event_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Event.class, com.heroiclabs.satori.api.Event.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getTimestampFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + id_ = ""; + internalGetMutableMetadata().clear(); + value_ = ""; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Event_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Event getDefaultInstanceForType() { + return com.heroiclabs.satori.api.Event.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.Event build() { + com.heroiclabs.satori.api.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Event buildPartial() { + com.heroiclabs.satori.api.Event result = new com.heroiclabs.satori.api.Event(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.Event result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.value_ = value_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.timestamp_ = timestampBuilder_ == null + ? timestamp_ + : timestampBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.Event) { + return mergeFrom((com.heroiclabs.satori.api.Event)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.Event other) { + if (other == com.heroiclabs.satori.api.Event.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableMetadata().mergeFrom( + other.internalGetMetadata()); + bitField0_ |= 0x00000004; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + metadata__ = input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMetadata().getMutableMap().put( + metadata__.getKey(), metadata__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getTimestampFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Event name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Event name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Event name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Event name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Event name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+     * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+     * If not supplied the server will assign a randomly generated unique event identifier.
+     * 
+ * + * string id = 2 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+     * If not supplied the server will assign a randomly generated unique event identifier.
+     * 
+ * + * string id = 2 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+     * If not supplied the server will assign a randomly generated unique event identifier.
+     * 
+ * + * string id = 2 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+     * If not supplied the server will assign a randomly generated unique event identifier.
+     * 
+ * + * string id = 2 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+     * If not supplied the server will assign a randomly generated unique event identifier.
+     * 
+ * + * string id = 2 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + private com.google.protobuf.MapField + internalGetMutableMetadata() { + if (metadata_ == null) { + metadata_ = com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+     * Event metadata, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+     * Event metadata, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+     * Event metadata, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Event metadata, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableMetadata().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Event metadata, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder removeMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMetadata().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetadata() { + bitField0_ |= 0x00000004; + return internalGetMutableMetadata().getMutableMap(); + } + /** + *
+     * Event metadata, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder putMetadata( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableMetadata().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * Event metadata, if any.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder putAllMetadata( + java.util.Map values) { + internalGetMutableMetadata().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Optional value.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional value.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional value.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Optional value.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Optional value.
+     * 
+ * + * string value = 4 [json_name = "value"]; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + timestamp_ != null && + timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + if (timestamp_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000010); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + *
+     * The time when the event was triggered on the producer side.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), + getParentForChildren(), + isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + // @@protoc_insertion_point(builder_scope:satori.api.Event) + } + + // @@protoc_insertion_point(class_scope:satori.api.Event) + private static final com.heroiclabs.satori.api.Event DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.Event(); + } + + public static com.heroiclabs.satori.api.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/EventOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/EventOrBuilder.java new file mode 100644 index 00000000..84c947f1 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/EventOrBuilder.java @@ -0,0 +1,154 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface EventOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.Event) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Event name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Event name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+   * If not supplied the server will assign a randomly generated unique event identifier.
+   * 
+ * + * string id = 2 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Optional event ID assigned by the client, used to de-duplicate in retransmission scenarios.
+   * If not supplied the server will assign a randomly generated unique event identifier.
+   * 
+ * + * string id = 2 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + int getMetadataCount(); + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + boolean containsMetadata( + java.lang.String key); + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetadata(); + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + java.util.Map + getMetadataMap(); + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Event metadata, if any.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + java.lang.String getMetadataOrThrow( + java.lang.String key); + + /** + *
+   * Optional value.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Optional value.
+   * 
+ * + * string value = 4 [json_name = "value"]; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * The time when the event was triggered on the producer side.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + *
+   * The time when the event was triggered on the producer side.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + *
+   * The time when the event was triggered on the producer side.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp"]; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/EventRequest.java b/src/main/java/com/heroiclabs/satori/api/EventRequest.java new file mode 100644 index 00000000..bdb1ca3c --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/EventRequest.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Publish an event to the server
+ * 
+ * + * Protobuf type {@code satori.api.EventRequest} + */ +public final class EventRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.EventRequest) + EventRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + EventRequest.class.getName()); + } + // Use EventRequest.newBuilder() to construct. + private EventRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EventRequest() { + events_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_EventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_EventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.EventRequest.class, com.heroiclabs.satori.api.EventRequest.Builder.class); + } + + public static final int EVENTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List events_; + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + @java.lang.Override + public java.util.List getEventsList() { + return events_; + } + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + @java.lang.Override + public java.util.List + getEventsOrBuilderList() { + return events_; + } + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + @java.lang.Override + public int getEventsCount() { + return events_.size(); + } + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.Event getEvents(int index) { + return events_.get(index); + } + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.EventOrBuilder getEventsOrBuilder( + int index) { + return events_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < events_.size(); i++) { + output.writeMessage(1, events_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < events_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, events_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.EventRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.EventRequest other = (com.heroiclabs.satori.api.EventRequest) obj; + + if (!getEventsList() + .equals(other.getEventsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEventsCount() > 0) { + hash = (37 * hash) + EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getEventsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.EventRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.EventRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.EventRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.EventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.EventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Publish an event to the server
+   * 
+ * + * Protobuf type {@code satori.api.EventRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.EventRequest) + com.heroiclabs.satori.api.EventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_EventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_EventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.EventRequest.class, com.heroiclabs.satori.api.EventRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.EventRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + } else { + events_ = null; + eventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_EventRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.EventRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.EventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.EventRequest build() { + com.heroiclabs.satori.api.EventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.EventRequest buildPartial() { + com.heroiclabs.satori.api.EventRequest result = new com.heroiclabs.satori.api.EventRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.satori.api.EventRequest result) { + if (eventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.events_ = events_; + } else { + result.events_ = eventsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.satori.api.EventRequest result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.EventRequest) { + return mergeFrom((com.heroiclabs.satori.api.EventRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.EventRequest other) { + if (other == com.heroiclabs.satori.api.EventRequest.getDefaultInstance()) return this; + if (eventsBuilder_ == null) { + if (!other.events_.isEmpty()) { + if (events_.isEmpty()) { + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEventsIsMutable(); + events_.addAll(other.events_); + } + onChanged(); + } + } else { + if (!other.events_.isEmpty()) { + if (eventsBuilder_.isEmpty()) { + eventsBuilder_.dispose(); + eventsBuilder_ = null; + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + eventsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEventsFieldBuilder() : null; + } else { + eventsBuilder_.addAllMessages(other.events_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.satori.api.Event m = + input.readMessage( + com.heroiclabs.satori.api.Event.parser(), + extensionRegistry); + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(m); + } else { + eventsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List events_ = + java.util.Collections.emptyList(); + private void ensureEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + events_ = new java.util.ArrayList(events_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Event, com.heroiclabs.satori.api.Event.Builder, com.heroiclabs.satori.api.EventOrBuilder> eventsBuilder_; + + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public java.util.List getEventsList() { + if (eventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(events_); + } else { + return eventsBuilder_.getMessageList(); + } + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public int getEventsCount() { + if (eventsBuilder_ == null) { + return events_.size(); + } else { + return eventsBuilder_.getCount(); + } + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public com.heroiclabs.satori.api.Event getEvents(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessage(index); + } + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder setEvents( + int index, com.heroiclabs.satori.api.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.set(index, value); + onChanged(); + } else { + eventsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder setEvents( + int index, com.heroiclabs.satori.api.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.set(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder addEvents(com.heroiclabs.satori.api.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(value); + onChanged(); + } else { + eventsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder addEvents( + int index, com.heroiclabs.satori.api.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(index, value); + onChanged(); + } else { + eventsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder addEvents( + com.heroiclabs.satori.api.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder addEvents( + int index, com.heroiclabs.satori.api.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder addAllEvents( + java.lang.Iterable values) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, events_); + onChanged(); + } else { + eventsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder clearEvents() { + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + eventsBuilder_.clear(); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public Builder removeEvents(int index) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.remove(index); + onChanged(); + } else { + eventsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public com.heroiclabs.satori.api.Event.Builder getEventsBuilder( + int index) { + return getEventsFieldBuilder().getBuilder(index); + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public com.heroiclabs.satori.api.EventOrBuilder getEventsOrBuilder( + int index) { + if (eventsBuilder_ == null) { + return events_.get(index); } else { + return eventsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public java.util.List + getEventsOrBuilderList() { + if (eventsBuilder_ != null) { + return eventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(events_); + } + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public com.heroiclabs.satori.api.Event.Builder addEventsBuilder() { + return getEventsFieldBuilder().addBuilder( + com.heroiclabs.satori.api.Event.getDefaultInstance()); + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public com.heroiclabs.satori.api.Event.Builder addEventsBuilder( + int index) { + return getEventsFieldBuilder().addBuilder( + index, com.heroiclabs.satori.api.Event.getDefaultInstance()); + } + /** + *
+     * Some number of events produced by a client.
+     * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + public java.util.List + getEventsBuilderList() { + return getEventsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Event, com.heroiclabs.satori.api.Event.Builder, com.heroiclabs.satori.api.EventOrBuilder> + getEventsFieldBuilder() { + if (eventsBuilder_ == null) { + eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Event, com.heroiclabs.satori.api.Event.Builder, com.heroiclabs.satori.api.EventOrBuilder>( + events_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + events_ = null; + } + return eventsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:satori.api.EventRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.EventRequest) + private static final com.heroiclabs.satori.api.EventRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.EventRequest(); + } + + public static com.heroiclabs.satori.api.EventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.EventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/EventRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/EventRequestOrBuilder.java new file mode 100644 index 00000000..85e3af9f --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/EventRequestOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface EventRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.EventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + java.util.List + getEventsList(); + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + com.heroiclabs.satori.api.Event getEvents(int index); + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + int getEventsCount(); + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + java.util.List + getEventsOrBuilderList(); + /** + *
+   * Some number of events produced by a client.
+   * 
+ * + * repeated .satori.api.Event events = 1 [json_name = "events"]; + */ + com.heroiclabs.satori.api.EventOrBuilder getEventsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/satori/api/Experiment.java b/src/main/java/com/heroiclabs/satori/api/Experiment.java new file mode 100644 index 00000000..e6e2522a --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/Experiment.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * An experiment that this user is partaking.
+ * 
+ * + * Protobuf type {@code satori.api.Experiment} + */ +public final class Experiment extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.Experiment) + ExperimentOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Experiment.class.getName()); + } + // Use Experiment.newBuilder() to construct. + private Experiment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Experiment() { + name_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Experiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Experiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Experiment.class, com.heroiclabs.satori.api.Experiment.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Experiment name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Experiment name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + *
+   * Value associated with this Experiment.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value associated with this Experiment.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.Experiment)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.Experiment other = (com.heroiclabs.satori.api.Experiment) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.Experiment parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Experiment parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Experiment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Experiment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Experiment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Experiment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Experiment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Experiment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.Experiment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.Experiment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.Experiment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Experiment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.Experiment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An experiment that this user is partaking.
+   * 
+ * + * Protobuf type {@code satori.api.Experiment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.Experiment) + com.heroiclabs.satori.api.ExperimentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Experiment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Experiment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Experiment.class, com.heroiclabs.satori.api.Experiment.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.Experiment.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Experiment_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Experiment getDefaultInstanceForType() { + return com.heroiclabs.satori.api.Experiment.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.Experiment build() { + com.heroiclabs.satori.api.Experiment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Experiment buildPartial() { + com.heroiclabs.satori.api.Experiment result = new com.heroiclabs.satori.api.Experiment(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.Experiment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.Experiment) { + return mergeFrom((com.heroiclabs.satori.api.Experiment)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.Experiment other) { + if (other == com.heroiclabs.satori.api.Experiment.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Experiment name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Experiment name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Experiment name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Experiment name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Experiment name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value associated with this Experiment.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value associated with this Experiment.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value associated with this Experiment.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Value associated with this Experiment.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Value associated with this Experiment.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.Experiment) + } + + // @@protoc_insertion_point(class_scope:satori.api.Experiment) + private static final com.heroiclabs.satori.api.Experiment DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.Experiment(); + } + + public static com.heroiclabs.satori.api.Experiment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Experiment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Experiment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/ExperimentList.java b/src/main/java/com/heroiclabs/satori/api/ExperimentList.java new file mode 100644 index 00000000..0e4f9999 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/ExperimentList.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * All experiments that this identity is involved with.
+ * 
+ * + * Protobuf type {@code satori.api.ExperimentList} + */ +public final class ExperimentList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.ExperimentList) + ExperimentListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + ExperimentList.class.getName()); + } + // Use ExperimentList.newBuilder() to construct. + private ExperimentList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ExperimentList() { + experiments_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_ExperimentList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_ExperimentList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.ExperimentList.class, com.heroiclabs.satori.api.ExperimentList.Builder.class); + } + + public static final int EXPERIMENTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List experiments_; + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + @java.lang.Override + public java.util.List getExperimentsList() { + return experiments_; + } + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + @java.lang.Override + public java.util.List + getExperimentsOrBuilderList() { + return experiments_; + } + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + @java.lang.Override + public int getExperimentsCount() { + return experiments_.size(); + } + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.Experiment getExperiments(int index) { + return experiments_.get(index); + } + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.ExperimentOrBuilder getExperimentsOrBuilder( + int index) { + return experiments_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < experiments_.size(); i++) { + output.writeMessage(1, experiments_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < experiments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, experiments_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.ExperimentList)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.ExperimentList other = (com.heroiclabs.satori.api.ExperimentList) obj; + + if (!getExperimentsList() + .equals(other.getExperimentsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExperimentsCount() > 0) { + hash = (37 * hash) + EXPERIMENTS_FIELD_NUMBER; + hash = (53 * hash) + getExperimentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.ExperimentList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.ExperimentList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.ExperimentList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.ExperimentList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * All experiments that this identity is involved with.
+   * 
+ * + * Protobuf type {@code satori.api.ExperimentList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.ExperimentList) + com.heroiclabs.satori.api.ExperimentListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_ExperimentList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_ExperimentList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.ExperimentList.class, com.heroiclabs.satori.api.ExperimentList.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.ExperimentList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (experimentsBuilder_ == null) { + experiments_ = java.util.Collections.emptyList(); + } else { + experiments_ = null; + experimentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_ExperimentList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.ExperimentList getDefaultInstanceForType() { + return com.heroiclabs.satori.api.ExperimentList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.ExperimentList build() { + com.heroiclabs.satori.api.ExperimentList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.ExperimentList buildPartial() { + com.heroiclabs.satori.api.ExperimentList result = new com.heroiclabs.satori.api.ExperimentList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.satori.api.ExperimentList result) { + if (experimentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + experiments_ = java.util.Collections.unmodifiableList(experiments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.experiments_ = experiments_; + } else { + result.experiments_ = experimentsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.satori.api.ExperimentList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.ExperimentList) { + return mergeFrom((com.heroiclabs.satori.api.ExperimentList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.ExperimentList other) { + if (other == com.heroiclabs.satori.api.ExperimentList.getDefaultInstance()) return this; + if (experimentsBuilder_ == null) { + if (!other.experiments_.isEmpty()) { + if (experiments_.isEmpty()) { + experiments_ = other.experiments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExperimentsIsMutable(); + experiments_.addAll(other.experiments_); + } + onChanged(); + } + } else { + if (!other.experiments_.isEmpty()) { + if (experimentsBuilder_.isEmpty()) { + experimentsBuilder_.dispose(); + experimentsBuilder_ = null; + experiments_ = other.experiments_; + bitField0_ = (bitField0_ & ~0x00000001); + experimentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getExperimentsFieldBuilder() : null; + } else { + experimentsBuilder_.addAllMessages(other.experiments_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.satori.api.Experiment m = + input.readMessage( + com.heroiclabs.satori.api.Experiment.parser(), + extensionRegistry); + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.add(m); + } else { + experimentsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List experiments_ = + java.util.Collections.emptyList(); + private void ensureExperimentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + experiments_ = new java.util.ArrayList(experiments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Experiment, com.heroiclabs.satori.api.Experiment.Builder, com.heroiclabs.satori.api.ExperimentOrBuilder> experimentsBuilder_; + + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public java.util.List getExperimentsList() { + if (experimentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(experiments_); + } else { + return experimentsBuilder_.getMessageList(); + } + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public int getExperimentsCount() { + if (experimentsBuilder_ == null) { + return experiments_.size(); + } else { + return experimentsBuilder_.getCount(); + } + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public com.heroiclabs.satori.api.Experiment getExperiments(int index) { + if (experimentsBuilder_ == null) { + return experiments_.get(index); + } else { + return experimentsBuilder_.getMessage(index); + } + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder setExperiments( + int index, com.heroiclabs.satori.api.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.set(index, value); + onChanged(); + } else { + experimentsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder setExperiments( + int index, com.heroiclabs.satori.api.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.set(index, builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder addExperiments(com.heroiclabs.satori.api.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.add(value); + onChanged(); + } else { + experimentsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder addExperiments( + int index, com.heroiclabs.satori.api.Experiment value) { + if (experimentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentsIsMutable(); + experiments_.add(index, value); + onChanged(); + } else { + experimentsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder addExperiments( + com.heroiclabs.satori.api.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.add(builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder addExperiments( + int index, com.heroiclabs.satori.api.Experiment.Builder builderForValue) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.add(index, builderForValue.build()); + onChanged(); + } else { + experimentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder addAllExperiments( + java.lang.Iterable values) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, experiments_); + onChanged(); + } else { + experimentsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder clearExperiments() { + if (experimentsBuilder_ == null) { + experiments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + experimentsBuilder_.clear(); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public Builder removeExperiments(int index) { + if (experimentsBuilder_ == null) { + ensureExperimentsIsMutable(); + experiments_.remove(index); + onChanged(); + } else { + experimentsBuilder_.remove(index); + } + return this; + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public com.heroiclabs.satori.api.Experiment.Builder getExperimentsBuilder( + int index) { + return getExperimentsFieldBuilder().getBuilder(index); + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public com.heroiclabs.satori.api.ExperimentOrBuilder getExperimentsOrBuilder( + int index) { + if (experimentsBuilder_ == null) { + return experiments_.get(index); } else { + return experimentsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public java.util.List + getExperimentsOrBuilderList() { + if (experimentsBuilder_ != null) { + return experimentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(experiments_); + } + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public com.heroiclabs.satori.api.Experiment.Builder addExperimentsBuilder() { + return getExperimentsFieldBuilder().addBuilder( + com.heroiclabs.satori.api.Experiment.getDefaultInstance()); + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public com.heroiclabs.satori.api.Experiment.Builder addExperimentsBuilder( + int index) { + return getExperimentsFieldBuilder().addBuilder( + index, com.heroiclabs.satori.api.Experiment.getDefaultInstance()); + } + /** + *
+     * All experiments for this identity.
+     * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + public java.util.List + getExperimentsBuilderList() { + return getExperimentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Experiment, com.heroiclabs.satori.api.Experiment.Builder, com.heroiclabs.satori.api.ExperimentOrBuilder> + getExperimentsFieldBuilder() { + if (experimentsBuilder_ == null) { + experimentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Experiment, com.heroiclabs.satori.api.Experiment.Builder, com.heroiclabs.satori.api.ExperimentOrBuilder>( + experiments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + experiments_ = null; + } + return experimentsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:satori.api.ExperimentList) + } + + // @@protoc_insertion_point(class_scope:satori.api.ExperimentList) + private static final com.heroiclabs.satori.api.ExperimentList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.ExperimentList(); + } + + public static com.heroiclabs.satori.api.ExperimentList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExperimentList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.ExperimentList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/ExperimentListOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/ExperimentListOrBuilder.java new file mode 100644 index 00000000..e832932b --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/ExperimentListOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface ExperimentListOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.ExperimentList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + java.util.List + getExperimentsList(); + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + com.heroiclabs.satori.api.Experiment getExperiments(int index); + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + int getExperimentsCount(); + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + java.util.List + getExperimentsOrBuilderList(); + /** + *
+   * All experiments for this identity.
+   * 
+ * + * repeated .satori.api.Experiment experiments = 1 [json_name = "experiments"]; + */ + com.heroiclabs.satori.api.ExperimentOrBuilder getExperimentsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/satori/api/ExperimentOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/ExperimentOrBuilder.java new file mode 100644 index 00000000..3a6229ac --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/ExperimentOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface ExperimentOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.Experiment) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Experiment name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Experiment name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Value associated with this Experiment.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value associated with this Experiment.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/Flag.java b/src/main/java/com/heroiclabs/satori/api/Flag.java new file mode 100644 index 00000000..9d00cd65 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/Flag.java @@ -0,0 +1,784 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Feature flag available to the identity.
+ * 
+ * + * Protobuf type {@code satori.api.Flag} + */ +public final class Flag extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.Flag) + FlagOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Flag.class.getName()); + } + // Use Flag.newBuilder() to construct. + private Flag(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Flag() { + name_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Flag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Flag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Flag.class, com.heroiclabs.satori.api.Flag.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Flag name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Flag name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + *
+   * Value associated with this flag.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value associated with this flag.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_CHANGED_FIELD_NUMBER = 3; + private boolean conditionChanged_ = false; + /** + *
+   * Whether the value for this flag has conditionally changed from the default state.
+   * 
+ * + * bool condition_changed = 3 [json_name = "conditionChanged"]; + * @return The conditionChanged. + */ + @java.lang.Override + public boolean getConditionChanged() { + return conditionChanged_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + if (conditionChanged_ != false) { + output.writeBool(3, conditionChanged_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + if (conditionChanged_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, conditionChanged_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.Flag)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.Flag other = (com.heroiclabs.satori.api.Flag) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getConditionChanged() + != other.getConditionChanged()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + CONDITION_CHANGED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getConditionChanged()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.Flag parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Flag parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Flag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Flag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Flag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Flag parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Flag parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Flag parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.Flag parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.Flag parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.Flag parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Flag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.Flag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Feature flag available to the identity.
+   * 
+ * + * Protobuf type {@code satori.api.Flag} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.Flag) + com.heroiclabs.satori.api.FlagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Flag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Flag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Flag.class, com.heroiclabs.satori.api.Flag.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.Flag.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + value_ = ""; + conditionChanged_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Flag_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Flag getDefaultInstanceForType() { + return com.heroiclabs.satori.api.Flag.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.Flag build() { + com.heroiclabs.satori.api.Flag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Flag buildPartial() { + com.heroiclabs.satori.api.Flag result = new com.heroiclabs.satori.api.Flag(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.Flag result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.conditionChanged_ = conditionChanged_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.Flag) { + return mergeFrom((com.heroiclabs.satori.api.Flag)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.Flag other) { + if (other == com.heroiclabs.satori.api.Flag.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getConditionChanged() != false) { + setConditionChanged(other.getConditionChanged()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + conditionChanged_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Flag name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Flag name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Flag name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Flag name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Flag name
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value associated with this flag.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value associated with this flag.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value associated with this flag.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Value associated with this flag.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Value associated with this flag.
+     * 
+ * + * string value = 2 [json_name = "value"]; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean conditionChanged_ ; + /** + *
+     * Whether the value for this flag has conditionally changed from the default state.
+     * 
+ * + * bool condition_changed = 3 [json_name = "conditionChanged"]; + * @return The conditionChanged. + */ + @java.lang.Override + public boolean getConditionChanged() { + return conditionChanged_; + } + /** + *
+     * Whether the value for this flag has conditionally changed from the default state.
+     * 
+ * + * bool condition_changed = 3 [json_name = "conditionChanged"]; + * @param value The conditionChanged to set. + * @return This builder for chaining. + */ + public Builder setConditionChanged(boolean value) { + + conditionChanged_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Whether the value for this flag has conditionally changed from the default state.
+     * 
+ * + * bool condition_changed = 3 [json_name = "conditionChanged"]; + * @return This builder for chaining. + */ + public Builder clearConditionChanged() { + bitField0_ = (bitField0_ & ~0x00000004); + conditionChanged_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.Flag) + } + + // @@protoc_insertion_point(class_scope:satori.api.Flag) + private static final com.heroiclabs.satori.api.Flag DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.Flag(); + } + + public static com.heroiclabs.satori.api.Flag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Flag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Flag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/FlagList.java b/src/main/java/com/heroiclabs/satori/api/FlagList.java new file mode 100644 index 00000000..17249955 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/FlagList.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * All flags available to the identity
+ * 
+ * + * Protobuf type {@code satori.api.FlagList} + */ +public final class FlagList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.FlagList) + FlagListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + FlagList.class.getName()); + } + // Use FlagList.newBuilder() to construct. + private FlagList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FlagList() { + flags_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_FlagList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_FlagList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.FlagList.class, com.heroiclabs.satori.api.FlagList.Builder.class); + } + + public static final int FLAGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List flags_; + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + @java.lang.Override + public java.util.List getFlagsList() { + return flags_; + } + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + @java.lang.Override + public java.util.List + getFlagsOrBuilderList() { + return flags_; + } + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + @java.lang.Override + public int getFlagsCount() { + return flags_.size(); + } + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.Flag getFlags(int index) { + return flags_.get(index); + } + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.FlagOrBuilder getFlagsOrBuilder( + int index) { + return flags_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < flags_.size(); i++) { + output.writeMessage(1, flags_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < flags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, flags_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.FlagList)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.FlagList other = (com.heroiclabs.satori.api.FlagList) obj; + + if (!getFlagsList() + .equals(other.getFlagsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFlagsCount() > 0) { + hash = (37 * hash) + FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getFlagsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.FlagList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.FlagList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.FlagList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.FlagList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.FlagList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.FlagList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.FlagList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.FlagList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.FlagList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.FlagList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.FlagList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.FlagList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.FlagList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * All flags available to the identity
+   * 
+ * + * Protobuf type {@code satori.api.FlagList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.FlagList) + com.heroiclabs.satori.api.FlagListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_FlagList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_FlagList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.FlagList.class, com.heroiclabs.satori.api.FlagList.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.FlagList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (flagsBuilder_ == null) { + flags_ = java.util.Collections.emptyList(); + } else { + flags_ = null; + flagsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_FlagList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.FlagList getDefaultInstanceForType() { + return com.heroiclabs.satori.api.FlagList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.FlagList build() { + com.heroiclabs.satori.api.FlagList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.FlagList buildPartial() { + com.heroiclabs.satori.api.FlagList result = new com.heroiclabs.satori.api.FlagList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.satori.api.FlagList result) { + if (flagsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + flags_ = java.util.Collections.unmodifiableList(flags_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.flags_ = flags_; + } else { + result.flags_ = flagsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.satori.api.FlagList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.FlagList) { + return mergeFrom((com.heroiclabs.satori.api.FlagList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.FlagList other) { + if (other == com.heroiclabs.satori.api.FlagList.getDefaultInstance()) return this; + if (flagsBuilder_ == null) { + if (!other.flags_.isEmpty()) { + if (flags_.isEmpty()) { + flags_ = other.flags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFlagsIsMutable(); + flags_.addAll(other.flags_); + } + onChanged(); + } + } else { + if (!other.flags_.isEmpty()) { + if (flagsBuilder_.isEmpty()) { + flagsBuilder_.dispose(); + flagsBuilder_ = null; + flags_ = other.flags_; + bitField0_ = (bitField0_ & ~0x00000001); + flagsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFlagsFieldBuilder() : null; + } else { + flagsBuilder_.addAllMessages(other.flags_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.satori.api.Flag m = + input.readMessage( + com.heroiclabs.satori.api.Flag.parser(), + extensionRegistry); + if (flagsBuilder_ == null) { + ensureFlagsIsMutable(); + flags_.add(m); + } else { + flagsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List flags_ = + java.util.Collections.emptyList(); + private void ensureFlagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + flags_ = new java.util.ArrayList(flags_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Flag, com.heroiclabs.satori.api.Flag.Builder, com.heroiclabs.satori.api.FlagOrBuilder> flagsBuilder_; + + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public java.util.List getFlagsList() { + if (flagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(flags_); + } else { + return flagsBuilder_.getMessageList(); + } + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public int getFlagsCount() { + if (flagsBuilder_ == null) { + return flags_.size(); + } else { + return flagsBuilder_.getCount(); + } + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public com.heroiclabs.satori.api.Flag getFlags(int index) { + if (flagsBuilder_ == null) { + return flags_.get(index); + } else { + return flagsBuilder_.getMessage(index); + } + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder setFlags( + int index, com.heroiclabs.satori.api.Flag value) { + if (flagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlagsIsMutable(); + flags_.set(index, value); + onChanged(); + } else { + flagsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder setFlags( + int index, com.heroiclabs.satori.api.Flag.Builder builderForValue) { + if (flagsBuilder_ == null) { + ensureFlagsIsMutable(); + flags_.set(index, builderForValue.build()); + onChanged(); + } else { + flagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder addFlags(com.heroiclabs.satori.api.Flag value) { + if (flagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlagsIsMutable(); + flags_.add(value); + onChanged(); + } else { + flagsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder addFlags( + int index, com.heroiclabs.satori.api.Flag value) { + if (flagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlagsIsMutable(); + flags_.add(index, value); + onChanged(); + } else { + flagsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder addFlags( + com.heroiclabs.satori.api.Flag.Builder builderForValue) { + if (flagsBuilder_ == null) { + ensureFlagsIsMutable(); + flags_.add(builderForValue.build()); + onChanged(); + } else { + flagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder addFlags( + int index, com.heroiclabs.satori.api.Flag.Builder builderForValue) { + if (flagsBuilder_ == null) { + ensureFlagsIsMutable(); + flags_.add(index, builderForValue.build()); + onChanged(); + } else { + flagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder addAllFlags( + java.lang.Iterable values) { + if (flagsBuilder_ == null) { + ensureFlagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, flags_); + onChanged(); + } else { + flagsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder clearFlags() { + if (flagsBuilder_ == null) { + flags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + flagsBuilder_.clear(); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public Builder removeFlags(int index) { + if (flagsBuilder_ == null) { + ensureFlagsIsMutable(); + flags_.remove(index); + onChanged(); + } else { + flagsBuilder_.remove(index); + } + return this; + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public com.heroiclabs.satori.api.Flag.Builder getFlagsBuilder( + int index) { + return getFlagsFieldBuilder().getBuilder(index); + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public com.heroiclabs.satori.api.FlagOrBuilder getFlagsOrBuilder( + int index) { + if (flagsBuilder_ == null) { + return flags_.get(index); } else { + return flagsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public java.util.List + getFlagsOrBuilderList() { + if (flagsBuilder_ != null) { + return flagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(flags_); + } + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public com.heroiclabs.satori.api.Flag.Builder addFlagsBuilder() { + return getFlagsFieldBuilder().addBuilder( + com.heroiclabs.satori.api.Flag.getDefaultInstance()); + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public com.heroiclabs.satori.api.Flag.Builder addFlagsBuilder( + int index) { + return getFlagsFieldBuilder().addBuilder( + index, com.heroiclabs.satori.api.Flag.getDefaultInstance()); + } + /** + *
+     * All flags
+     * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + public java.util.List + getFlagsBuilderList() { + return getFlagsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Flag, com.heroiclabs.satori.api.Flag.Builder, com.heroiclabs.satori.api.FlagOrBuilder> + getFlagsFieldBuilder() { + if (flagsBuilder_ == null) { + flagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Flag, com.heroiclabs.satori.api.Flag.Builder, com.heroiclabs.satori.api.FlagOrBuilder>( + flags_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + flags_ = null; + } + return flagsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:satori.api.FlagList) + } + + // @@protoc_insertion_point(class_scope:satori.api.FlagList) + private static final com.heroiclabs.satori.api.FlagList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.FlagList(); + } + + public static com.heroiclabs.satori.api.FlagList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlagList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.FlagList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/FlagListOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/FlagListOrBuilder.java new file mode 100644 index 00000000..25f5b1a5 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/FlagListOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface FlagListOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.FlagList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + java.util.List + getFlagsList(); + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + com.heroiclabs.satori.api.Flag getFlags(int index); + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + int getFlagsCount(); + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + java.util.List + getFlagsOrBuilderList(); + /** + *
+   * All flags
+   * 
+ * + * repeated .satori.api.Flag flags = 1 [json_name = "flags"]; + */ + com.heroiclabs.satori.api.FlagOrBuilder getFlagsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/satori/api/FlagOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/FlagOrBuilder.java new file mode 100644 index 00000000..ef03f717 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/FlagOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface FlagOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.Flag) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Flag name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Flag name
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Value associated with this flag.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value associated with this flag.
+   * 
+ * + * string value = 2 [json_name = "value"]; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Whether the value for this flag has conditionally changed from the default state.
+   * 
+ * + * bool condition_changed = 3 [json_name = "conditionChanged"]; + * @return The conditionChanged. + */ + boolean getConditionChanged(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/GetExperimentsRequest.java b/src/main/java/com/heroiclabs/satori/api/GetExperimentsRequest.java new file mode 100644 index 00000000..72d42855 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetExperimentsRequest.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Request to get all experiments data.
+ * 
+ * + * Protobuf type {@code satori.api.GetExperimentsRequest} + */ +public final class GetExperimentsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.GetExperimentsRequest) + GetExperimentsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GetExperimentsRequest.class.getName()); + } + // Use GetExperimentsRequest.newBuilder() to construct. + private GetExperimentsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetExperimentsRequest() { + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetExperimentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetExperimentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetExperimentsRequest.class, com.heroiclabs.satori.api.GetExperimentsRequest.Builder.class); + } + + public static final int NAMES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_; + } + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, names_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.GetExperimentsRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.GetExperimentsRequest other = (com.heroiclabs.satori.api.GetExperimentsRequest) obj; + + if (!getNamesList() + .equals(other.getNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.GetExperimentsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.GetExperimentsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetExperimentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.GetExperimentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get all experiments data.
+   * 
+ * + * Protobuf type {@code satori.api.GetExperimentsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.GetExperimentsRequest) + com.heroiclabs.satori.api.GetExperimentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetExperimentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetExperimentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetExperimentsRequest.class, com.heroiclabs.satori.api.GetExperimentsRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.GetExperimentsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetExperimentsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetExperimentsRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.GetExperimentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetExperimentsRequest build() { + com.heroiclabs.satori.api.GetExperimentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetExperimentsRequest buildPartial() { + com.heroiclabs.satori.api.GetExperimentsRequest result = new com.heroiclabs.satori.api.GetExperimentsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.GetExperimentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + names_.makeImmutable(); + result.names_ = names_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.GetExperimentsRequest) { + return mergeFrom((com.heroiclabs.satori.api.GetExperimentsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.GetExperimentsRequest other) { + if (other == com.heroiclabs.satori.api.GetExperimentsRequest.getDefaultInstance()) return this; + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ |= 0x00000001; + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureNamesIsMutable() { + if (!names_.isModifiable()) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + names_.makeImmutable(); + return names_; + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, names_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * Experiment names; if empty string all experiments are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.GetExperimentsRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.GetExperimentsRequest) + private static final com.heroiclabs.satori.api.GetExperimentsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.GetExperimentsRequest(); + } + + public static com.heroiclabs.satori.api.GetExperimentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetExperimentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetExperimentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/GetExperimentsRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/GetExperimentsRequestOrBuilder.java new file mode 100644 index 00000000..92bb6dc9 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetExperimentsRequestOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface GetExperimentsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.GetExperimentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + java.util.List + getNamesList(); + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + int getNamesCount(); + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + *
+   * Experiment names; if empty string all experiments are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString + getNamesBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/satori/api/GetFlagsRequest.java b/src/main/java/com/heroiclabs/satori/api/GetFlagsRequest.java new file mode 100644 index 00000000..fd3e3b93 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetFlagsRequest.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Request to get all flags data.
+ * 
+ * + * Protobuf type {@code satori.api.GetFlagsRequest} + */ +public final class GetFlagsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.GetFlagsRequest) + GetFlagsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GetFlagsRequest.class.getName()); + } + // Use GetFlagsRequest.newBuilder() to construct. + private GetFlagsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetFlagsRequest() { + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetFlagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetFlagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetFlagsRequest.class, com.heroiclabs.satori.api.GetFlagsRequest.Builder.class); + } + + public static final int NAMES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_; + } + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, names_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.GetFlagsRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.GetFlagsRequest other = (com.heroiclabs.satori.api.GetFlagsRequest) obj; + + if (!getNamesList() + .equals(other.getNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.GetFlagsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.GetFlagsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetFlagsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.GetFlagsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get all flags data.
+   * 
+ * + * Protobuf type {@code satori.api.GetFlagsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.GetFlagsRequest) + com.heroiclabs.satori.api.GetFlagsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetFlagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetFlagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetFlagsRequest.class, com.heroiclabs.satori.api.GetFlagsRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.GetFlagsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetFlagsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetFlagsRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.GetFlagsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetFlagsRequest build() { + com.heroiclabs.satori.api.GetFlagsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetFlagsRequest buildPartial() { + com.heroiclabs.satori.api.GetFlagsRequest result = new com.heroiclabs.satori.api.GetFlagsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.GetFlagsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + names_.makeImmutable(); + result.names_ = names_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.GetFlagsRequest) { + return mergeFrom((com.heroiclabs.satori.api.GetFlagsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.GetFlagsRequest other) { + if (other == com.heroiclabs.satori.api.GetFlagsRequest.getDefaultInstance()) return this; + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ |= 0x00000001; + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureNamesIsMutable() { + if (!names_.isModifiable()) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + names_.makeImmutable(); + return names_; + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, names_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * Flag names; if empty string all flags are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.GetFlagsRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.GetFlagsRequest) + private static final com.heroiclabs.satori.api.GetFlagsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.GetFlagsRequest(); + } + + public static com.heroiclabs.satori.api.GetFlagsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFlagsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetFlagsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/GetFlagsRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/GetFlagsRequestOrBuilder.java new file mode 100644 index 00000000..bcd7c980 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetFlagsRequestOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface GetFlagsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.GetFlagsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + java.util.List + getNamesList(); + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + int getNamesCount(); + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + *
+   * Flag names; if empty string all flags are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString + getNamesBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequest.java b/src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequest.java new file mode 100644 index 00000000..a3cabb92 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequest.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Request to get all live events.
+ * 
+ * + * Protobuf type {@code satori.api.GetLiveEventsRequest} + */ +public final class GetLiveEventsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.GetLiveEventsRequest) + GetLiveEventsRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GetLiveEventsRequest.class.getName()); + } + // Use GetLiveEventsRequest.newBuilder() to construct. + private GetLiveEventsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetLiveEventsRequest() { + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetLiveEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetLiveEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetLiveEventsRequest.class, com.heroiclabs.satori.api.GetLiveEventsRequest.Builder.class); + } + + public static final int NAMES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_; + } + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, names_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.GetLiveEventsRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.GetLiveEventsRequest other = (com.heroiclabs.satori.api.GetLiveEventsRequest) obj; + + if (!getNamesList() + .equals(other.getNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetLiveEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.GetLiveEventsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get all live events.
+   * 
+ * + * Protobuf type {@code satori.api.GetLiveEventsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.GetLiveEventsRequest) + com.heroiclabs.satori.api.GetLiveEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetLiveEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetLiveEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetLiveEventsRequest.class, com.heroiclabs.satori.api.GetLiveEventsRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.GetLiveEventsRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetLiveEventsRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetLiveEventsRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.GetLiveEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetLiveEventsRequest build() { + com.heroiclabs.satori.api.GetLiveEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetLiveEventsRequest buildPartial() { + com.heroiclabs.satori.api.GetLiveEventsRequest result = new com.heroiclabs.satori.api.GetLiveEventsRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.GetLiveEventsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + names_.makeImmutable(); + result.names_ = names_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.GetLiveEventsRequest) { + return mergeFrom((com.heroiclabs.satori.api.GetLiveEventsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.GetLiveEventsRequest other) { + if (other == com.heroiclabs.satori.api.GetLiveEventsRequest.getDefaultInstance()) return this; + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ |= 0x00000001; + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureNamesIsMutable() { + if (!names_.isModifiable()) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + } + bitField0_ |= 0x00000001; + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + names_.makeImmutable(); + return names_; + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, names_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + *
+     * Live event names; if empty string all live events are returned.
+     * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.GetLiveEventsRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.GetLiveEventsRequest) + private static final com.heroiclabs.satori.api.GetLiveEventsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.GetLiveEventsRequest(); + } + + public static com.heroiclabs.satori.api.GetLiveEventsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLiveEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetLiveEventsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequestOrBuilder.java new file mode 100644 index 00000000..4d551486 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetLiveEventsRequestOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface GetLiveEventsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.GetLiveEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return A list containing the names. + */ + java.util.List + getNamesList(); + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @return The count of names. + */ + int getNamesCount(); + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + *
+   * Live event names; if empty string all live events are returned.
+   * 
+ * + * repeated string names = 1 [json_name = "names"]; + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString + getNamesBytes(int index); +} diff --git a/src/main/java/com/heroiclabs/satori/api/GetMessageListRequest.java b/src/main/java/com/heroiclabs/satori/api/GetMessageListRequest.java new file mode 100644 index 00000000..aca958ec --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetMessageListRequest.java @@ -0,0 +1,694 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + * Protobuf type {@code satori.api.GetMessageListRequest} + */ +public final class GetMessageListRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.GetMessageListRequest) + GetMessageListRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GetMessageListRequest.class.getName()); + } + // Use GetMessageListRequest.newBuilder() to construct. + private GetMessageListRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetMessageListRequest() { + cursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetMessageListRequest.class, com.heroiclabs.satori.api.GetMessageListRequest.Builder.class); + } + + public static final int LIMIT_FIELD_NUMBER = 1; + private int limit_ = 0; + /** + *
+   * Max number of messages to return. Between 1 and 100.
+   * 
+ * + * int32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + + public static final int FORWARD_FIELD_NUMBER = 2; + private boolean forward_ = false; + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * bool forward = 2 [json_name = "forward"]; + * @return The forward. + */ + @java.lang.Override + public boolean getForward() { + return forward_; + } + + public static final int CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (limit_ != 0) { + output.writeInt32(1, limit_); + } + if (forward_ != false) { + output.writeBool(2, forward_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, cursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (limit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, limit_); + } + if (forward_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, forward_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, cursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.GetMessageListRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.GetMessageListRequest other = (com.heroiclabs.satori.api.GetMessageListRequest) obj; + + if (getLimit() + != other.getLimit()) return false; + if (getForward() + != other.getForward()) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + hash = (37 * hash) + FORWARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForward()); + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.GetMessageListRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.GetMessageListRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetMessageListRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.GetMessageListRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code satori.api.GetMessageListRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.GetMessageListRequest) + com.heroiclabs.satori.api.GetMessageListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetMessageListRequest.class, com.heroiclabs.satori.api.GetMessageListRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.GetMessageListRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limit_ = 0; + forward_ = false; + cursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.GetMessageListRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListRequest build() { + com.heroiclabs.satori.api.GetMessageListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListRequest buildPartial() { + com.heroiclabs.satori.api.GetMessageListRequest result = new com.heroiclabs.satori.api.GetMessageListRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.GetMessageListRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limit_ = limit_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.forward_ = forward_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cursor_ = cursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.GetMessageListRequest) { + return mergeFrom((com.heroiclabs.satori.api.GetMessageListRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.GetMessageListRequest other) { + if (other == com.heroiclabs.satori.api.GetMessageListRequest.getDefaultInstance()) return this; + if (other.getLimit() != 0) { + setLimit(other.getLimit()); + } + if (other.getForward() != false) { + setForward(other.getForward()); + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + limit_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + forward_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int limit_ ; + /** + *
+     * Max number of messages to return. Between 1 and 100.
+     * 
+ * + * int32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + /** + *
+     * Max number of messages to return. Between 1 and 100.
+     * 
+ * + * int32 limit = 1 [json_name = "limit"]; + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(int value) { + + limit_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Max number of messages to return. Between 1 and 100.
+     * 
+ * + * int32 limit = 1 [json_name = "limit"]; + * @return This builder for chaining. + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = 0; + onChanged(); + return this; + } + + private boolean forward_ ; + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * bool forward = 2 [json_name = "forward"]; + * @return The forward. + */ + @java.lang.Override + public boolean getForward() { + return forward_; + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * bool forward = 2 [json_name = "forward"]; + * @param value The forward to set. + * @return This builder for chaining. + */ + public Builder setForward(boolean value) { + + forward_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * True if listing should be older messages to newer, false if reverse.
+     * 
+ * + * bool forward = 2 [json_name = "forward"]; + * @return This builder for chaining. + */ + public Builder clearForward() { + bitField0_ = (bitField0_ & ~0x00000002); + forward_ = false; + onChanged(); + return this; + } + + private java.lang.Object cursor_ = ""; + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A pagination cursor, if any.
+     * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.GetMessageListRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.GetMessageListRequest) + private static final com.heroiclabs.satori.api.GetMessageListRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.GetMessageListRequest(); + } + + public static com.heroiclabs.satori.api.GetMessageListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMessageListRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/GetMessageListRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/GetMessageListRequestOrBuilder.java new file mode 100644 index 00000000..7e0608d6 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetMessageListRequestOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface GetMessageListRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.GetMessageListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Max number of messages to return. Between 1 and 100.
+   * 
+ * + * int32 limit = 1 [json_name = "limit"]; + * @return The limit. + */ + int getLimit(); + + /** + *
+   * True if listing should be older messages to newer, false if reverse.
+   * 
+ * + * bool forward = 2 [json_name = "forward"]; + * @return The forward. + */ + boolean getForward(); + + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The cursor. + */ + java.lang.String getCursor(); + /** + *
+   * A pagination cursor, if any.
+   * 
+ * + * string cursor = 3 [json_name = "cursor"]; + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/GetMessageListResponse.java b/src/main/java/com/heroiclabs/satori/api/GetMessageListResponse.java new file mode 100644 index 00000000..4fcd32c6 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetMessageListResponse.java @@ -0,0 +1,1311 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * A response containing all the messages for an identity.
+ * 
+ * + * Protobuf type {@code satori.api.GetMessageListResponse} + */ +public final class GetMessageListResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.GetMessageListResponse) + GetMessageListResponseOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + GetMessageListResponse.class.getName()); + } + // Use GetMessageListResponse.newBuilder() to construct. + private GetMessageListResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GetMessageListResponse() { + messages_ = java.util.Collections.emptyList(); + nextCursor_ = ""; + prevCursor_ = ""; + cacheableCursor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetMessageListResponse.class, com.heroiclabs.satori.api.GetMessageListResponse.Builder.class); + } + + public static final int MESSAGES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List messages_; + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public java.util.List getMessagesList() { + return messages_; + } + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public java.util.List + getMessagesOrBuilderList() { + return messages_; + } + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public int getMessagesCount() { + return messages_.size(); + } + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.Message getMessages(int index) { + return messages_.get(index); + } + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.MessageOrBuilder getMessagesOrBuilder( + int index) { + return messages_.get(index); + } + + public static final int NEXT_CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object nextCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + @java.lang.Override + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREV_CURSOR_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object prevCursor_ = ""; + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + @java.lang.Override + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } + } + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CACHEABLE_CURSOR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object cacheableCursor_ = ""; + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + @java.lang.Override + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } + } + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < messages_.size(); i++) { + output.writeMessage(1, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, prevCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, cacheableCursor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < messages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, messages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(prevCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, prevCursor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cacheableCursor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, cacheableCursor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.GetMessageListResponse)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.GetMessageListResponse other = (com.heroiclabs.satori.api.GetMessageListResponse) obj; + + if (!getMessagesList() + .equals(other.getMessagesList())) return false; + if (!getNextCursor() + .equals(other.getNextCursor())) return false; + if (!getPrevCursor() + .equals(other.getPrevCursor())) return false; + if (!getCacheableCursor() + .equals(other.getCacheableCursor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMessagesCount() > 0) { + hash = (37 * hash) + MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getMessagesList().hashCode(); + } + hash = (37 * hash) + NEXT_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getNextCursor().hashCode(); + hash = (37 * hash) + PREV_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getPrevCursor().hashCode(); + hash = (37 * hash) + CACHEABLE_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCacheableCursor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.GetMessageListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.GetMessageListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.GetMessageListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.GetMessageListResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A response containing all the messages for an identity.
+   * 
+ * + * Protobuf type {@code satori.api.GetMessageListResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.GetMessageListResponse) + com.heroiclabs.satori.api.GetMessageListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.GetMessageListResponse.class, com.heroiclabs.satori.api.GetMessageListResponse.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.GetMessageListResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + } else { + messages_ = null; + messagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextCursor_ = ""; + prevCursor_ = ""; + cacheableCursor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_GetMessageListResponse_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListResponse getDefaultInstanceForType() { + return com.heroiclabs.satori.api.GetMessageListResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListResponse build() { + com.heroiclabs.satori.api.GetMessageListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListResponse buildPartial() { + com.heroiclabs.satori.api.GetMessageListResponse result = new com.heroiclabs.satori.api.GetMessageListResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.satori.api.GetMessageListResponse result) { + if (messagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + messages_ = java.util.Collections.unmodifiableList(messages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.messages_ = messages_; + } else { + result.messages_ = messagesBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.satori.api.GetMessageListResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextCursor_ = nextCursor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.prevCursor_ = prevCursor_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cacheableCursor_ = cacheableCursor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.GetMessageListResponse) { + return mergeFrom((com.heroiclabs.satori.api.GetMessageListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.GetMessageListResponse other) { + if (other == com.heroiclabs.satori.api.GetMessageListResponse.getDefaultInstance()) return this; + if (messagesBuilder_ == null) { + if (!other.messages_.isEmpty()) { + if (messages_.isEmpty()) { + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMessagesIsMutable(); + messages_.addAll(other.messages_); + } + onChanged(); + } + } else { + if (!other.messages_.isEmpty()) { + if (messagesBuilder_.isEmpty()) { + messagesBuilder_.dispose(); + messagesBuilder_ = null; + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000001); + messagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMessagesFieldBuilder() : null; + } else { + messagesBuilder_.addAllMessages(other.messages_); + } + } + } + if (!other.getNextCursor().isEmpty()) { + nextCursor_ = other.nextCursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPrevCursor().isEmpty()) { + prevCursor_ = other.prevCursor_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getCacheableCursor().isEmpty()) { + cacheableCursor_ = other.cacheableCursor_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.satori.api.Message m = + input.readMessage( + com.heroiclabs.satori.api.Message.parser(), + extensionRegistry); + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(m); + } else { + messagesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + nextCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + prevCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + cacheableCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List messages_ = + java.util.Collections.emptyList(); + private void ensureMessagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + messages_ = new java.util.ArrayList(messages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Message, com.heroiclabs.satori.api.Message.Builder, com.heroiclabs.satori.api.MessageOrBuilder> messagesBuilder_; + + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public java.util.List getMessagesList() { + if (messagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(messages_); + } else { + return messagesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public int getMessagesCount() { + if (messagesBuilder_ == null) { + return messages_.size(); + } else { + return messagesBuilder_.getCount(); + } + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.satori.api.Message getMessages(int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder setMessages( + int index, com.heroiclabs.satori.api.Message value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.set(index, value); + onChanged(); + } else { + messagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder setMessages( + int index, com.heroiclabs.satori.api.Message.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.set(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder addMessages(com.heroiclabs.satori.api.Message value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(value); + onChanged(); + } else { + messagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder addMessages( + int index, com.heroiclabs.satori.api.Message value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(index, value); + onChanged(); + } else { + messagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder addMessages( + com.heroiclabs.satori.api.Message.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder addMessages( + int index, com.heroiclabs.satori.api.Message.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder addAllMessages( + java.lang.Iterable values) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, messages_); + onChanged(); + } else { + messagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder clearMessages() { + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + messagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public Builder removeMessages(int index) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.remove(index); + onChanged(); + } else { + messagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.satori.api.Message.Builder getMessagesBuilder( + int index) { + return getMessagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.satori.api.MessageOrBuilder getMessagesOrBuilder( + int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); } else { + return messagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public java.util.List + getMessagesOrBuilderList() { + if (messagesBuilder_ != null) { + return messagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messages_); + } + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.satori.api.Message.Builder addMessagesBuilder() { + return getMessagesFieldBuilder().addBuilder( + com.heroiclabs.satori.api.Message.getDefaultInstance()); + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public com.heroiclabs.satori.api.Message.Builder addMessagesBuilder( + int index) { + return getMessagesFieldBuilder().addBuilder( + index, com.heroiclabs.satori.api.Message.getDefaultInstance()); + } + /** + *
+     * The list of messages.
+     * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + public java.util.List + getMessagesBuilderList() { + return getMessagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Message, com.heroiclabs.satori.api.Message.Builder, com.heroiclabs.satori.api.MessageOrBuilder> + getMessagesFieldBuilder() { + if (messagesBuilder_ == null) { + messagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.Message, com.heroiclabs.satori.api.Message.Builder, com.heroiclabs.satori.api.MessageOrBuilder>( + messages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + messages_ = null; + } + return messagesBuilder_; + } + + private java.lang.Object nextCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + public java.lang.String getNextCursor() { + java.lang.Object ref = nextCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + public com.google.protobuf.ByteString + getNextCursorBytes() { + java.lang.Object ref = nextCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @param value The nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return This builder for chaining. + */ + public Builder clearNextCursor() { + nextCursor_ = getDefaultInstance().getNextCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the next page, if any.
+     * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @param value The bytes for nextCursor to set. + * @return This builder for chaining. + */ + public Builder setNextCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextCursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object prevCursor_ = ""; + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + public java.lang.String getPrevCursor() { + java.lang.Object ref = prevCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + public com.google.protobuf.ByteString + getPrevCursorBytes() { + java.lang.Object ref = prevCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return This builder for chaining. + */ + public Builder clearPrevCursor() { + prevCursor_ = getDefaultInstance().getPrevCursor(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The cursor to send when retrieving the previous page, if any.
+     * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @param value The bytes for prevCursor to set. + * @return This builder for chaining. + */ + public Builder setPrevCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + prevCursor_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object cacheableCursor_ = ""; + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + public java.lang.String getCacheableCursor() { + java.lang.Object ref = cacheableCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cacheableCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + public com.google.protobuf.ByteString + getCacheableCursorBytes() { + java.lang.Object ref = cacheableCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cacheableCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @param value The cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cacheableCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return This builder for chaining. + */ + public Builder clearCacheableCursor() { + cacheableCursor_ = getDefaultInstance().getCacheableCursor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+     * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @param value The bytes for cacheableCursor to set. + * @return This builder for chaining. + */ + public Builder setCacheableCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cacheableCursor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.GetMessageListResponse) + } + + // @@protoc_insertion_point(class_scope:satori.api.GetMessageListResponse) + private static final com.heroiclabs.satori.api.GetMessageListResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.GetMessageListResponse(); + } + + public static com.heroiclabs.satori.api.GetMessageListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMessageListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.GetMessageListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/GetMessageListResponseOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/GetMessageListResponseOrBuilder.java new file mode 100644 index 00000000..78afc5bc --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/GetMessageListResponseOrBuilder.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface GetMessageListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.GetMessageListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + java.util.List + getMessagesList(); + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + com.heroiclabs.satori.api.Message getMessages(int index); + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + int getMessagesCount(); + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + java.util.List + getMessagesOrBuilderList(); + /** + *
+   * The list of messages.
+   * 
+ * + * repeated .satori.api.Message messages = 1 [json_name = "messages"]; + */ + com.heroiclabs.satori.api.MessageOrBuilder getMessagesOrBuilder( + int index); + + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The nextCursor. + */ + java.lang.String getNextCursor(); + /** + *
+   * The cursor to send when retrieving the next page, if any.
+   * 
+ * + * string next_cursor = 2 [json_name = "nextCursor"]; + * @return The bytes for nextCursor. + */ + com.google.protobuf.ByteString + getNextCursorBytes(); + + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The prevCursor. + */ + java.lang.String getPrevCursor(); + /** + *
+   * The cursor to send when retrieving the previous page, if any.
+   * 
+ * + * string prev_cursor = 3 [json_name = "prevCursor"]; + * @return The bytes for prevCursor. + */ + com.google.protobuf.ByteString + getPrevCursorBytes(); + + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The cacheableCursor. + */ + java.lang.String getCacheableCursor(); + /** + *
+   * Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.
+   * 
+ * + * string cacheable_cursor = 4 [json_name = "cacheableCursor"]; + * @return The bytes for cacheableCursor. + */ + com.google.protobuf.ByteString + getCacheableCursorBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/IdentifyRequest.java b/src/main/java/com/heroiclabs/satori/api/IdentifyRequest.java new file mode 100644 index 00000000..1de29c76 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/IdentifyRequest.java @@ -0,0 +1,1177 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Enrich/replace the current session with a new ID.
+ * 
+ * + * Protobuf type {@code satori.api.IdentifyRequest} + */ +public final class IdentifyRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.IdentifyRequest) + IdentifyRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + IdentifyRequest.class.getName()); + } + // Use IdentifyRequest.newBuilder() to construct. + private IdentifyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private IdentifyRequest() { + id_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_IdentifyRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetDefault(); + case 3: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_IdentifyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.IdentifyRequest.class, com.heroiclabs.satori.api.IdentifyRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FIELD_NUMBER = 2; + private static final class DefaultDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_IdentifyRequest_DefaultEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CUSTOM_FIELD_NUMBER = 3; + private static final class CustomDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_IdentifyRequest_CustomEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetDefault(), + DefaultDefaultEntryHolder.defaultEntry, + 2); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetCustom(), + CustomDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + for (java.util.Map.Entry entry + : internalGetDefault().getMap().entrySet()) { + com.google.protobuf.MapEntry + default__ = DefaultDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, default__); + } + for (java.util.Map.Entry entry + : internalGetCustom().getMap().entrySet()) { + com.google.protobuf.MapEntry + custom__ = CustomDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, custom__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.IdentifyRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.IdentifyRequest other = (com.heroiclabs.satori.api.IdentifyRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!internalGetDefault().equals( + other.internalGetDefault())) return false; + if (!internalGetCustom().equals( + other.internalGetCustom())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (!internalGetDefault().getMap().isEmpty()) { + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + internalGetDefault().hashCode(); + } + if (!internalGetCustom().getMap().isEmpty()) { + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + internalGetCustom().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.IdentifyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.IdentifyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.IdentifyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.IdentifyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Enrich/replace the current session with a new ID.
+   * 
+ * + * Protobuf type {@code satori.api.IdentifyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.IdentifyRequest) + com.heroiclabs.satori.api.IdentifyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_IdentifyRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetDefault(); + case 3: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableDefault(); + case 3: + return internalGetMutableCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_IdentifyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.IdentifyRequest.class, com.heroiclabs.satori.api.IdentifyRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.IdentifyRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + internalGetMutableDefault().clear(); + internalGetMutableCustom().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_IdentifyRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.IdentifyRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.IdentifyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.IdentifyRequest build() { + com.heroiclabs.satori.api.IdentifyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.IdentifyRequest buildPartial() { + com.heroiclabs.satori.api.IdentifyRequest result = new com.heroiclabs.satori.api.IdentifyRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.IdentifyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.default_ = internalGetDefault(); + result.default_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.custom_ = internalGetCustom(); + result.custom_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.IdentifyRequest) { + return mergeFrom((com.heroiclabs.satori.api.IdentifyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.IdentifyRequest other) { + if (other == com.heroiclabs.satori.api.IdentifyRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableDefault().mergeFrom( + other.internalGetDefault()); + bitField0_ |= 0x00000002; + internalGetMutableCustom().mergeFrom( + other.internalGetCustom()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + default__ = input.readMessage( + DefaultDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDefault().getMutableMap().put( + default__.getKey(), default__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + custom__ = input.readMessage( + CustomDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableCustom().getMutableMap().put( + custom__.getKey(), custom__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + private com.google.protobuf.MapField + internalGetMutableDefault() { + if (default_ == null) { + default_ = com.google.protobuf.MapField.newMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + if (!default_.isMutable()) { + default_ = default_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDefault() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableDefault().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + public Builder removeDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDefault().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDefault() { + bitField0_ |= 0x00000002; + return internalGetMutableDefault().getMutableMap(); + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + public Builder putDefault( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDefault().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Optional default properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + public Builder putAllDefault( + java.util.Map values) { + internalGetMutableDefault().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + private com.google.protobuf.MapField + internalGetMutableCustom() { + if (custom_ == null) { + custom_ = com.google.protobuf.MapField.newMapField( + CustomDefaultEntryHolder.defaultEntry); + } + if (!custom_.isMutable()) { + custom_ = custom_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearCustom() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableCustom().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder removeCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableCustom().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCustom() { + bitField0_ |= 0x00000004; + return internalGetMutableCustom().getMutableMap(); + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder putCustom( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableCustom().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * Optional custom properties to update with this call.
+     * If not set, properties are left as they are on the server.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder putAllCustom( + java.util.Map values) { + internalGetMutableCustom().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.IdentifyRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.IdentifyRequest) + private static final com.heroiclabs.satori.api.IdentifyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.IdentifyRequest(); + } + + public static com.heroiclabs.satori.api.IdentifyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentifyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.IdentifyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/IdentifyRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/IdentifyRequestOrBuilder.java new file mode 100644 index 00000000..c2b77b41 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/IdentifyRequestOrBuilder.java @@ -0,0 +1,149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface IdentifyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.IdentifyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * Identity ID to enrich the current session and return a new session. Old session will no longer be usable.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + int getDefaultCount(); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + boolean containsDefault( + java.lang.String key); + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDefault(); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + java.util.Map + getDefaultMap(); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Optional default properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> default = 2 [json_name = "default"]; + */ + java.lang.String getDefaultOrThrow( + java.lang.String key); + + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + int getCustomCount(); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + boolean containsCustom( + java.lang.String key); + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCustom(); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + java.util.Map + getCustomMap(); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Optional custom properties to update with this call.
+   * If not set, properties are left as they are on the server.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + java.lang.String getCustomOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/satori/api/LiveEvent.java b/src/main/java/com/heroiclabs/satori/api/LiveEvent.java new file mode 100644 index 00000000..6758eb9d --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/LiveEvent.java @@ -0,0 +1,1608 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * A single live event.
+ * 
+ * + * Protobuf type {@code satori.api.LiveEvent} + */ +public final class LiveEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.LiveEvent) + LiveEventOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LiveEvent.class.getName()); + } + // Use LiveEvent.newBuilder() to construct. + private LiveEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LiveEvent() { + name_ = ""; + description_ = ""; + value_ = ""; + id_ = ""; + resetCron_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.LiveEvent.class, com.heroiclabs.satori.api.LiveEvent.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
+   * Name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + *
+   * Description.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Description.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + *
+   * Event value.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Event value.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_START_TIME_SEC_FIELD_NUMBER = 4; + private long activeStartTimeSec_ = 0L; + /** + *
+   * Start time of current event run.
+   * 
+ * + * int64 active_start_time_sec = 4 [json_name = "activeStartTimeSec"]; + * @return The activeStartTimeSec. + */ + @java.lang.Override + public long getActiveStartTimeSec() { + return activeStartTimeSec_; + } + + public static final int ACTIVE_END_TIME_SEC_FIELD_NUMBER = 5; + private long activeEndTimeSec_ = 0L; + /** + *
+   * End time of current event run.
+   * 
+ * + * int64 active_end_time_sec = 5 [json_name = "activeEndTimeSec"]; + * @return The activeEndTimeSec. + */ + @java.lang.Override + public long getActiveEndTimeSec() { + return activeEndTimeSec_; + } + + public static final int ID_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The live event identifier.
+   * 
+ * + * string id = 6 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The live event identifier.
+   * 
+ * + * string id = 6 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_SEC_FIELD_NUMBER = 7; + private long startTimeSec_ = 0L; + /** + *
+   * Start time.
+   * 
+ * + * int64 start_time_sec = 7 [json_name = "startTimeSec"]; + * @return The startTimeSec. + */ + @java.lang.Override + public long getStartTimeSec() { + return startTimeSec_; + } + + public static final int END_TIME_SEC_FIELD_NUMBER = 8; + private long endTimeSec_ = 0L; + /** + *
+   * End time, 0 if it repeats forever.
+   * 
+ * + * int64 end_time_sec = 8 [json_name = "endTimeSec"]; + * @return The endTimeSec. + */ + @java.lang.Override + public long getEndTimeSec() { + return endTimeSec_; + } + + public static final int DURATION_SEC_FIELD_NUMBER = 9; + private long durationSec_ = 0L; + /** + *
+   * Duration in seconds.
+   * 
+ * + * int64 duration_sec = 9 [json_name = "durationSec"]; + * @return The durationSec. + */ + @java.lang.Override + public long getDurationSec() { + return durationSec_; + } + + public static final int RESET_CRON_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object resetCron_ = ""; + /** + *
+   * Reset CRON schedule, if configured.
+   * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @return The resetCron. + */ + @java.lang.Override + public java.lang.String getResetCron() { + java.lang.Object ref = resetCron_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resetCron_ = s; + return s; + } + } + /** + *
+   * Reset CRON schedule, if configured.
+   * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @return The bytes for resetCron. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResetCronBytes() { + java.lang.Object ref = resetCron_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resetCron_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, value_); + } + if (activeStartTimeSec_ != 0L) { + output.writeInt64(4, activeStartTimeSec_); + } + if (activeEndTimeSec_ != 0L) { + output.writeInt64(5, activeEndTimeSec_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, id_); + } + if (startTimeSec_ != 0L) { + output.writeInt64(7, startTimeSec_); + } + if (endTimeSec_ != 0L) { + output.writeInt64(8, endTimeSec_); + } + if (durationSec_ != 0L) { + output.writeInt64(9, durationSec_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resetCron_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, resetCron_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, value_); + } + if (activeStartTimeSec_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, activeStartTimeSec_); + } + if (activeEndTimeSec_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, activeEndTimeSec_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, id_); + } + if (startTimeSec_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, startTimeSec_); + } + if (endTimeSec_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, endTimeSec_); + } + if (durationSec_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, durationSec_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resetCron_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, resetCron_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.LiveEvent)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.LiveEvent other = (com.heroiclabs.satori.api.LiveEvent) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getActiveStartTimeSec() + != other.getActiveStartTimeSec()) return false; + if (getActiveEndTimeSec() + != other.getActiveEndTimeSec()) return false; + if (!getId() + .equals(other.getId())) return false; + if (getStartTimeSec() + != other.getStartTimeSec()) return false; + if (getEndTimeSec() + != other.getEndTimeSec()) return false; + if (getDurationSec() + != other.getDurationSec()) return false; + if (!getResetCron() + .equals(other.getResetCron())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + ACTIVE_START_TIME_SEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getActiveStartTimeSec()); + hash = (37 * hash) + ACTIVE_END_TIME_SEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getActiveEndTimeSec()); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + START_TIME_SEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartTimeSec()); + hash = (37 * hash) + END_TIME_SEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEndTimeSec()); + hash = (37 * hash) + DURATION_SEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDurationSec()); + hash = (37 * hash) + RESET_CRON_FIELD_NUMBER; + hash = (53 * hash) + getResetCron().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.LiveEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.LiveEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.LiveEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.LiveEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single live event.
+   * 
+ * + * Protobuf type {@code satori.api.LiveEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.LiveEvent) + com.heroiclabs.satori.api.LiveEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.LiveEvent.class, com.heroiclabs.satori.api.LiveEvent.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.LiveEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + value_ = ""; + activeStartTimeSec_ = 0L; + activeEndTimeSec_ = 0L; + id_ = ""; + startTimeSec_ = 0L; + endTimeSec_ = 0L; + durationSec_ = 0L; + resetCron_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEvent_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEvent getDefaultInstanceForType() { + return com.heroiclabs.satori.api.LiveEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEvent build() { + com.heroiclabs.satori.api.LiveEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEvent buildPartial() { + com.heroiclabs.satori.api.LiveEvent result = new com.heroiclabs.satori.api.LiveEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.LiveEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.activeStartTimeSec_ = activeStartTimeSec_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.activeEndTimeSec_ = activeEndTimeSec_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.startTimeSec_ = startTimeSec_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.endTimeSec_ = endTimeSec_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.durationSec_ = durationSec_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.resetCron_ = resetCron_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.LiveEvent) { + return mergeFrom((com.heroiclabs.satori.api.LiveEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.LiveEvent other) { + if (other == com.heroiclabs.satori.api.LiveEvent.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getActiveStartTimeSec() != 0L) { + setActiveStartTimeSec(other.getActiveStartTimeSec()); + } + if (other.getActiveEndTimeSec() != 0L) { + setActiveEndTimeSec(other.getActiveEndTimeSec()); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getStartTimeSec() != 0L) { + setStartTimeSec(other.getStartTimeSec()); + } + if (other.getEndTimeSec() != 0L) { + setEndTimeSec(other.getEndTimeSec()); + } + if (other.getDurationSec() != 0L) { + setDurationSec(other.getDurationSec()); + } + if (!other.getResetCron().isEmpty()) { + resetCron_ = other.resetCron_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + activeStartTimeSec_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + activeEndTimeSec_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + startTimeSec_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + endTimeSec_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + durationSec_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + resetCron_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Name.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Description.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Description.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Description.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Description.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Description.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Event value.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Event value.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Event value.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Event value.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Event value.
+     * 
+ * + * string value = 3 [json_name = "value"]; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long activeStartTimeSec_ ; + /** + *
+     * Start time of current event run.
+     * 
+ * + * int64 active_start_time_sec = 4 [json_name = "activeStartTimeSec"]; + * @return The activeStartTimeSec. + */ + @java.lang.Override + public long getActiveStartTimeSec() { + return activeStartTimeSec_; + } + /** + *
+     * Start time of current event run.
+     * 
+ * + * int64 active_start_time_sec = 4 [json_name = "activeStartTimeSec"]; + * @param value The activeStartTimeSec to set. + * @return This builder for chaining. + */ + public Builder setActiveStartTimeSec(long value) { + + activeStartTimeSec_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * Start time of current event run.
+     * 
+ * + * int64 active_start_time_sec = 4 [json_name = "activeStartTimeSec"]; + * @return This builder for chaining. + */ + public Builder clearActiveStartTimeSec() { + bitField0_ = (bitField0_ & ~0x00000008); + activeStartTimeSec_ = 0L; + onChanged(); + return this; + } + + private long activeEndTimeSec_ ; + /** + *
+     * End time of current event run.
+     * 
+ * + * int64 active_end_time_sec = 5 [json_name = "activeEndTimeSec"]; + * @return The activeEndTimeSec. + */ + @java.lang.Override + public long getActiveEndTimeSec() { + return activeEndTimeSec_; + } + /** + *
+     * End time of current event run.
+     * 
+ * + * int64 active_end_time_sec = 5 [json_name = "activeEndTimeSec"]; + * @param value The activeEndTimeSec to set. + * @return This builder for chaining. + */ + public Builder setActiveEndTimeSec(long value) { + + activeEndTimeSec_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * End time of current event run.
+     * 
+ * + * int64 active_end_time_sec = 5 [json_name = "activeEndTimeSec"]; + * @return This builder for chaining. + */ + public Builder clearActiveEndTimeSec() { + bitField0_ = (bitField0_ & ~0x00000010); + activeEndTimeSec_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+     * The live event identifier.
+     * 
+ * + * string id = 6 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The live event identifier.
+     * 
+ * + * string id = 6 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The live event identifier.
+     * 
+ * + * string id = 6 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The live event identifier.
+     * 
+ * + * string id = 6 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * The live event identifier.
+     * 
+ * + * string id = 6 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private long startTimeSec_ ; + /** + *
+     * Start time.
+     * 
+ * + * int64 start_time_sec = 7 [json_name = "startTimeSec"]; + * @return The startTimeSec. + */ + @java.lang.Override + public long getStartTimeSec() { + return startTimeSec_; + } + /** + *
+     * Start time.
+     * 
+ * + * int64 start_time_sec = 7 [json_name = "startTimeSec"]; + * @param value The startTimeSec to set. + * @return This builder for chaining. + */ + public Builder setStartTimeSec(long value) { + + startTimeSec_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * Start time.
+     * 
+ * + * int64 start_time_sec = 7 [json_name = "startTimeSec"]; + * @return This builder for chaining. + */ + public Builder clearStartTimeSec() { + bitField0_ = (bitField0_ & ~0x00000040); + startTimeSec_ = 0L; + onChanged(); + return this; + } + + private long endTimeSec_ ; + /** + *
+     * End time, 0 if it repeats forever.
+     * 
+ * + * int64 end_time_sec = 8 [json_name = "endTimeSec"]; + * @return The endTimeSec. + */ + @java.lang.Override + public long getEndTimeSec() { + return endTimeSec_; + } + /** + *
+     * End time, 0 if it repeats forever.
+     * 
+ * + * int64 end_time_sec = 8 [json_name = "endTimeSec"]; + * @param value The endTimeSec to set. + * @return This builder for chaining. + */ + public Builder setEndTimeSec(long value) { + + endTimeSec_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * End time, 0 if it repeats forever.
+     * 
+ * + * int64 end_time_sec = 8 [json_name = "endTimeSec"]; + * @return This builder for chaining. + */ + public Builder clearEndTimeSec() { + bitField0_ = (bitField0_ & ~0x00000080); + endTimeSec_ = 0L; + onChanged(); + return this; + } + + private long durationSec_ ; + /** + *
+     * Duration in seconds.
+     * 
+ * + * int64 duration_sec = 9 [json_name = "durationSec"]; + * @return The durationSec. + */ + @java.lang.Override + public long getDurationSec() { + return durationSec_; + } + /** + *
+     * Duration in seconds.
+     * 
+ * + * int64 duration_sec = 9 [json_name = "durationSec"]; + * @param value The durationSec to set. + * @return This builder for chaining. + */ + public Builder setDurationSec(long value) { + + durationSec_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * Duration in seconds.
+     * 
+ * + * int64 duration_sec = 9 [json_name = "durationSec"]; + * @return This builder for chaining. + */ + public Builder clearDurationSec() { + bitField0_ = (bitField0_ & ~0x00000100); + durationSec_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object resetCron_ = ""; + /** + *
+     * Reset CRON schedule, if configured.
+     * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @return The resetCron. + */ + public java.lang.String getResetCron() { + java.lang.Object ref = resetCron_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resetCron_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Reset CRON schedule, if configured.
+     * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @return The bytes for resetCron. + */ + public com.google.protobuf.ByteString + getResetCronBytes() { + java.lang.Object ref = resetCron_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resetCron_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Reset CRON schedule, if configured.
+     * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @param value The resetCron to set. + * @return This builder for chaining. + */ + public Builder setResetCron( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + resetCron_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * Reset CRON schedule, if configured.
+     * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @return This builder for chaining. + */ + public Builder clearResetCron() { + resetCron_ = getDefaultInstance().getResetCron(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * Reset CRON schedule, if configured.
+     * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @param value The bytes for resetCron to set. + * @return This builder for chaining. + */ + public Builder setResetCronBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + resetCron_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.LiveEvent) + } + + // @@protoc_insertion_point(class_scope:satori.api.LiveEvent) + private static final com.heroiclabs.satori.api.LiveEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.LiveEvent(); + } + + public static com.heroiclabs.satori.api.LiveEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LiveEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/LiveEventList.java b/src/main/java/com/heroiclabs/satori/api/LiveEventList.java new file mode 100644 index 00000000..e1c87be4 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/LiveEventList.java @@ -0,0 +1,819 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * List of Live events.
+ * 
+ * + * Protobuf type {@code satori.api.LiveEventList} + */ +public final class LiveEventList extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.LiveEventList) + LiveEventListOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + LiveEventList.class.getName()); + } + // Use LiveEventList.newBuilder() to construct. + private LiveEventList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LiveEventList() { + liveEvents_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEventList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEventList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.LiveEventList.class, com.heroiclabs.satori.api.LiveEventList.Builder.class); + } + + public static final int LIVE_EVENTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List liveEvents_; + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + @java.lang.Override + public java.util.List getLiveEventsList() { + return liveEvents_; + } + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + @java.lang.Override + public java.util.List + getLiveEventsOrBuilderList() { + return liveEvents_; + } + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + @java.lang.Override + public int getLiveEventsCount() { + return liveEvents_.size(); + } + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.LiveEvent getLiveEvents(int index) { + return liveEvents_.get(index); + } + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.LiveEventOrBuilder getLiveEventsOrBuilder( + int index) { + return liveEvents_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < liveEvents_.size(); i++) { + output.writeMessage(1, liveEvents_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < liveEvents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, liveEvents_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.LiveEventList)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.LiveEventList other = (com.heroiclabs.satori.api.LiveEventList) obj; + + if (!getLiveEventsList() + .equals(other.getLiveEventsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLiveEventsCount() > 0) { + hash = (37 * hash) + LIVE_EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getLiveEventsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.LiveEventList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.LiveEventList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.LiveEventList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.LiveEventList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List of Live events.
+   * 
+ * + * Protobuf type {@code satori.api.LiveEventList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.LiveEventList) + com.heroiclabs.satori.api.LiveEventListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEventList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEventList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.LiveEventList.class, com.heroiclabs.satori.api.LiveEventList.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.LiveEventList.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (liveEventsBuilder_ == null) { + liveEvents_ = java.util.Collections.emptyList(); + } else { + liveEvents_ = null; + liveEventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_LiveEventList_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEventList getDefaultInstanceForType() { + return com.heroiclabs.satori.api.LiveEventList.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEventList build() { + com.heroiclabs.satori.api.LiveEventList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEventList buildPartial() { + com.heroiclabs.satori.api.LiveEventList result = new com.heroiclabs.satori.api.LiveEventList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.heroiclabs.satori.api.LiveEventList result) { + if (liveEventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + liveEvents_ = java.util.Collections.unmodifiableList(liveEvents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.liveEvents_ = liveEvents_; + } else { + result.liveEvents_ = liveEventsBuilder_.build(); + } + } + + private void buildPartial0(com.heroiclabs.satori.api.LiveEventList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.LiveEventList) { + return mergeFrom((com.heroiclabs.satori.api.LiveEventList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.LiveEventList other) { + if (other == com.heroiclabs.satori.api.LiveEventList.getDefaultInstance()) return this; + if (liveEventsBuilder_ == null) { + if (!other.liveEvents_.isEmpty()) { + if (liveEvents_.isEmpty()) { + liveEvents_ = other.liveEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLiveEventsIsMutable(); + liveEvents_.addAll(other.liveEvents_); + } + onChanged(); + } + } else { + if (!other.liveEvents_.isEmpty()) { + if (liveEventsBuilder_.isEmpty()) { + liveEventsBuilder_.dispose(); + liveEventsBuilder_ = null; + liveEvents_ = other.liveEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + liveEventsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLiveEventsFieldBuilder() : null; + } else { + liveEventsBuilder_.addAllMessages(other.liveEvents_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.heroiclabs.satori.api.LiveEvent m = + input.readMessage( + com.heroiclabs.satori.api.LiveEvent.parser(), + extensionRegistry); + if (liveEventsBuilder_ == null) { + ensureLiveEventsIsMutable(); + liveEvents_.add(m); + } else { + liveEventsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List liveEvents_ = + java.util.Collections.emptyList(); + private void ensureLiveEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + liveEvents_ = new java.util.ArrayList(liveEvents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.LiveEvent, com.heroiclabs.satori.api.LiveEvent.Builder, com.heroiclabs.satori.api.LiveEventOrBuilder> liveEventsBuilder_; + + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public java.util.List getLiveEventsList() { + if (liveEventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(liveEvents_); + } else { + return liveEventsBuilder_.getMessageList(); + } + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public int getLiveEventsCount() { + if (liveEventsBuilder_ == null) { + return liveEvents_.size(); + } else { + return liveEventsBuilder_.getCount(); + } + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public com.heroiclabs.satori.api.LiveEvent getLiveEvents(int index) { + if (liveEventsBuilder_ == null) { + return liveEvents_.get(index); + } else { + return liveEventsBuilder_.getMessage(index); + } + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder setLiveEvents( + int index, com.heroiclabs.satori.api.LiveEvent value) { + if (liveEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLiveEventsIsMutable(); + liveEvents_.set(index, value); + onChanged(); + } else { + liveEventsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder setLiveEvents( + int index, com.heroiclabs.satori.api.LiveEvent.Builder builderForValue) { + if (liveEventsBuilder_ == null) { + ensureLiveEventsIsMutable(); + liveEvents_.set(index, builderForValue.build()); + onChanged(); + } else { + liveEventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder addLiveEvents(com.heroiclabs.satori.api.LiveEvent value) { + if (liveEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLiveEventsIsMutable(); + liveEvents_.add(value); + onChanged(); + } else { + liveEventsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder addLiveEvents( + int index, com.heroiclabs.satori.api.LiveEvent value) { + if (liveEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLiveEventsIsMutable(); + liveEvents_.add(index, value); + onChanged(); + } else { + liveEventsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder addLiveEvents( + com.heroiclabs.satori.api.LiveEvent.Builder builderForValue) { + if (liveEventsBuilder_ == null) { + ensureLiveEventsIsMutable(); + liveEvents_.add(builderForValue.build()); + onChanged(); + } else { + liveEventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder addLiveEvents( + int index, com.heroiclabs.satori.api.LiveEvent.Builder builderForValue) { + if (liveEventsBuilder_ == null) { + ensureLiveEventsIsMutable(); + liveEvents_.add(index, builderForValue.build()); + onChanged(); + } else { + liveEventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder addAllLiveEvents( + java.lang.Iterable values) { + if (liveEventsBuilder_ == null) { + ensureLiveEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, liveEvents_); + onChanged(); + } else { + liveEventsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder clearLiveEvents() { + if (liveEventsBuilder_ == null) { + liveEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + liveEventsBuilder_.clear(); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public Builder removeLiveEvents(int index) { + if (liveEventsBuilder_ == null) { + ensureLiveEventsIsMutable(); + liveEvents_.remove(index); + onChanged(); + } else { + liveEventsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public com.heroiclabs.satori.api.LiveEvent.Builder getLiveEventsBuilder( + int index) { + return getLiveEventsFieldBuilder().getBuilder(index); + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public com.heroiclabs.satori.api.LiveEventOrBuilder getLiveEventsOrBuilder( + int index) { + if (liveEventsBuilder_ == null) { + return liveEvents_.get(index); } else { + return liveEventsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public java.util.List + getLiveEventsOrBuilderList() { + if (liveEventsBuilder_ != null) { + return liveEventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(liveEvents_); + } + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public com.heroiclabs.satori.api.LiveEvent.Builder addLiveEventsBuilder() { + return getLiveEventsFieldBuilder().addBuilder( + com.heroiclabs.satori.api.LiveEvent.getDefaultInstance()); + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public com.heroiclabs.satori.api.LiveEvent.Builder addLiveEventsBuilder( + int index) { + return getLiveEventsFieldBuilder().addBuilder( + index, com.heroiclabs.satori.api.LiveEvent.getDefaultInstance()); + } + /** + *
+     * Live events.
+     * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + public java.util.List + getLiveEventsBuilderList() { + return getLiveEventsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.LiveEvent, com.heroiclabs.satori.api.LiveEvent.Builder, com.heroiclabs.satori.api.LiveEventOrBuilder> + getLiveEventsFieldBuilder() { + if (liveEventsBuilder_ == null) { + liveEventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.heroiclabs.satori.api.LiveEvent, com.heroiclabs.satori.api.LiveEvent.Builder, com.heroiclabs.satori.api.LiveEventOrBuilder>( + liveEvents_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + liveEvents_ = null; + } + return liveEventsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:satori.api.LiveEventList) + } + + // @@protoc_insertion_point(class_scope:satori.api.LiveEventList) + private static final com.heroiclabs.satori.api.LiveEventList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.LiveEventList(); + } + + public static com.heroiclabs.satori.api.LiveEventList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LiveEventList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.LiveEventList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/LiveEventListOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/LiveEventListOrBuilder.java new file mode 100644 index 00000000..13a67484 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/LiveEventListOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface LiveEventListOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.LiveEventList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + java.util.List + getLiveEventsList(); + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + com.heroiclabs.satori.api.LiveEvent getLiveEvents(int index); + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + int getLiveEventsCount(); + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + java.util.List + getLiveEventsOrBuilderList(); + /** + *
+   * Live events.
+   * 
+ * + * repeated .satori.api.LiveEvent live_events = 1 [json_name = "liveEvents"]; + */ + com.heroiclabs.satori.api.LiveEventOrBuilder getLiveEventsOrBuilder( + int index); +} diff --git a/src/main/java/com/heroiclabs/satori/api/LiveEventOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/LiveEventOrBuilder.java new file mode 100644 index 00000000..6939b080 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/LiveEventOrBuilder.java @@ -0,0 +1,161 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface LiveEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.LiveEvent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Description.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Description.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Event value.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Event value.
+   * 
+ * + * string value = 3 [json_name = "value"]; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Start time of current event run.
+   * 
+ * + * int64 active_start_time_sec = 4 [json_name = "activeStartTimeSec"]; + * @return The activeStartTimeSec. + */ + long getActiveStartTimeSec(); + + /** + *
+   * End time of current event run.
+   * 
+ * + * int64 active_end_time_sec = 5 [json_name = "activeEndTimeSec"]; + * @return The activeEndTimeSec. + */ + long getActiveEndTimeSec(); + + /** + *
+   * The live event identifier.
+   * 
+ * + * string id = 6 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The live event identifier.
+   * 
+ * + * string id = 6 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Start time.
+   * 
+ * + * int64 start_time_sec = 7 [json_name = "startTimeSec"]; + * @return The startTimeSec. + */ + long getStartTimeSec(); + + /** + *
+   * End time, 0 if it repeats forever.
+   * 
+ * + * int64 end_time_sec = 8 [json_name = "endTimeSec"]; + * @return The endTimeSec. + */ + long getEndTimeSec(); + + /** + *
+   * Duration in seconds.
+   * 
+ * + * int64 duration_sec = 9 [json_name = "durationSec"]; + * @return The durationSec. + */ + long getDurationSec(); + + /** + *
+   * Reset CRON schedule, if configured.
+   * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @return The resetCron. + */ + java.lang.String getResetCron(); + /** + *
+   * Reset CRON schedule, if configured.
+   * 
+ * + * string reset_cron = 10 [json_name = "resetCron"]; + * @return The bytes for resetCron. + */ + com.google.protobuf.ByteString + getResetCronBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/Message.java b/src/main/java/com/heroiclabs/satori/api/Message.java new file mode 100644 index 00000000..df78b598 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/Message.java @@ -0,0 +1,1931 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * A scheduled message.
+ * 
+ * + * Protobuf type {@code satori.api.Message} + */ +public final class Message extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.Message) + MessageOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Message.class.getName()); + } + // Use Message.newBuilder() to construct. + private Message(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Message() { + scheduleId_ = ""; + text_ = ""; + id_ = ""; + title_ = ""; + imageUrl_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Message_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Message_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Message.class, com.heroiclabs.satori.api.Message.Builder.class); + } + + public static final int SCHEDULE_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object scheduleId_ = ""; + /** + *
+   * The identifier of the schedule.
+   * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @return The scheduleId. + */ + @java.lang.Override + public java.lang.String getScheduleId() { + java.lang.Object ref = scheduleId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scheduleId_ = s; + return s; + } + } + /** + *
+   * The identifier of the schedule.
+   * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @return The bytes for scheduleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getScheduleIdBytes() { + java.lang.Object ref = scheduleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scheduleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEND_TIME_FIELD_NUMBER = 2; + private long sendTime_ = 0L; + /** + *
+   * The send time for the message.
+   * 
+ * + * int64 send_time = 2 [json_name = "sendTime"]; + * @return The sendTime. + */ + @java.lang.Override + public long getSendTime() { + return sendTime_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Message_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private long createTime_ = 0L; + /** + *
+   * The time the message was created.
+   * 
+ * + * int64 create_time = 4 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private long updateTime_ = 0L; + /** + *
+   * The time the message was updated.
+   * 
+ * + * int64 update_time = 5 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public long getUpdateTime() { + return updateTime_; + } + + public static final int READ_TIME_FIELD_NUMBER = 6; + private long readTime_ = 0L; + /** + *
+   * The time the message was read by the client.
+   * 
+ * + * int64 read_time = 6 [json_name = "readTime"]; + * @return The readTime. + */ + @java.lang.Override + public long getReadTime() { + return readTime_; + } + + public static final int CONSUME_TIME_FIELD_NUMBER = 7; + private long consumeTime_ = 0L; + /** + *
+   * The time the message was consumed by the identity.
+   * 
+ * + * int64 consume_time = 7 [json_name = "consumeTime"]; + * @return The consumeTime. + */ + @java.lang.Override + public long getConsumeTime() { + return consumeTime_; + } + + public static final int TEXT_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + *
+   * The message's text.
+   * 
+ * + * string text = 8 [json_name = "text"]; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * The message's text.
+   * 
+ * + * string text = 8 [json_name = "text"]; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The message's unique identifier.
+   * 
+ * + * string id = 9 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The message's unique identifier.
+   * 
+ * + * string id = 9 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + *
+   * The message's title.
+   * 
+ * + * string title = 10 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + *
+   * The message's title.
+   * 
+ * + * string title = 10 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URL_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object imageUrl_ = ""; + /** + *
+   * The message's image url.
+   * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @return The imageUrl. + */ + @java.lang.Override + public java.lang.String getImageUrl() { + java.lang.Object ref = imageUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUrl_ = s; + return s; + } + } + /** + *
+   * The message's image url.
+   * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @return The bytes for imageUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageUrlBytes() { + java.lang.Object ref = imageUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(scheduleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, scheduleId_); + } + if (sendTime_ != 0L) { + output.writeInt64(2, sendTime_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetMetadata(), + MetadataDefaultEntryHolder.defaultEntry, + 3); + if (createTime_ != 0L) { + output.writeInt64(4, createTime_); + } + if (updateTime_ != 0L) { + output.writeInt64(5, updateTime_); + } + if (readTime_ != 0L) { + output.writeInt64(6, readTime_); + } + if (consumeTime_ != 0L) { + output.writeInt64(7, consumeTime_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, text_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, imageUrl_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(scheduleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, scheduleId_); + } + if (sendTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, sendTime_); + } + for (java.util.Map.Entry entry + : internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry + metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, metadata__); + } + if (createTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, createTime_); + } + if (updateTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, updateTime_); + } + if (readTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, readTime_); + } + if (consumeTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, consumeTime_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, text_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, imageUrl_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.Message)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.Message other = (com.heroiclabs.satori.api.Message) obj; + + if (!getScheduleId() + .equals(other.getScheduleId())) return false; + if (getSendTime() + != other.getSendTime()) return false; + if (!internalGetMetadata().equals( + other.internalGetMetadata())) return false; + if (getCreateTime() + != other.getCreateTime()) return false; + if (getUpdateTime() + != other.getUpdateTime()) return false; + if (getReadTime() + != other.getReadTime()) return false; + if (getConsumeTime() + != other.getConsumeTime()) return false; + if (!getText() + .equals(other.getText())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getImageUrl() + .equals(other.getImageUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCHEDULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getScheduleId().hashCode(); + hash = (37 * hash) + SEND_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSendTime()); + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCreateTime()); + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUpdateTime()); + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getReadTime()); + hash = (37 * hash) + CONSUME_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getConsumeTime()); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + IMAGE_URL_FIELD_NUMBER; + hash = (53 * hash) + getImageUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.Message parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Message parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Message parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Message parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Message parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Message parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Message parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Message parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.Message parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.Message parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.Message parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Message parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.Message prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A scheduled message.
+   * 
+ * + * Protobuf type {@code satori.api.Message} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.Message) + com.heroiclabs.satori.api.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Message_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableMetadata(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Message_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Message.class, com.heroiclabs.satori.api.Message.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.Message.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scheduleId_ = ""; + sendTime_ = 0L; + internalGetMutableMetadata().clear(); + createTime_ = 0L; + updateTime_ = 0L; + readTime_ = 0L; + consumeTime_ = 0L; + text_ = ""; + id_ = ""; + title_ = ""; + imageUrl_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Message_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Message getDefaultInstanceForType() { + return com.heroiclabs.satori.api.Message.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.Message build() { + com.heroiclabs.satori.api.Message result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Message buildPartial() { + com.heroiclabs.satori.api.Message result = new com.heroiclabs.satori.api.Message(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.Message result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scheduleId_ = scheduleId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sendTime_ = sendTime_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTime_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTime_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.readTime_ = readTime_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.consumeTime_ = consumeTime_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.imageUrl_ = imageUrl_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.Message) { + return mergeFrom((com.heroiclabs.satori.api.Message)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.Message other) { + if (other == com.heroiclabs.satori.api.Message.getDefaultInstance()) return this; + if (!other.getScheduleId().isEmpty()) { + scheduleId_ = other.scheduleId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSendTime() != 0L) { + setSendTime(other.getSendTime()); + } + internalGetMutableMetadata().mergeFrom( + other.internalGetMetadata()); + bitField0_ |= 0x00000004; + if (other.getCreateTime() != 0L) { + setCreateTime(other.getCreateTime()); + } + if (other.getUpdateTime() != 0L) { + setUpdateTime(other.getUpdateTime()); + } + if (other.getReadTime() != 0L) { + setReadTime(other.getReadTime()); + } + if (other.getConsumeTime() != 0L) { + setConsumeTime(other.getConsumeTime()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getImageUrl().isEmpty()) { + imageUrl_ = other.imageUrl_; + bitField0_ |= 0x00000400; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + scheduleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + sendTime_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + com.google.protobuf.MapEntry + metadata__ = input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMetadata().getMutableMap().put( + metadata__.getKey(), metadata__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + createTime_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + updateTime_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + readTime_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + consumeTime_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + imageUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object scheduleId_ = ""; + /** + *
+     * The identifier of the schedule.
+     * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @return The scheduleId. + */ + public java.lang.String getScheduleId() { + java.lang.Object ref = scheduleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scheduleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifier of the schedule.
+     * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @return The bytes for scheduleId. + */ + public com.google.protobuf.ByteString + getScheduleIdBytes() { + java.lang.Object ref = scheduleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scheduleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifier of the schedule.
+     * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @param value The scheduleId to set. + * @return This builder for chaining. + */ + public Builder setScheduleId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + scheduleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The identifier of the schedule.
+     * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @return This builder for chaining. + */ + public Builder clearScheduleId() { + scheduleId_ = getDefaultInstance().getScheduleId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The identifier of the schedule.
+     * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @param value The bytes for scheduleId to set. + * @return This builder for chaining. + */ + public Builder setScheduleIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + scheduleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long sendTime_ ; + /** + *
+     * The send time for the message.
+     * 
+ * + * int64 send_time = 2 [json_name = "sendTime"]; + * @return The sendTime. + */ + @java.lang.Override + public long getSendTime() { + return sendTime_; + } + /** + *
+     * The send time for the message.
+     * 
+ * + * int64 send_time = 2 [json_name = "sendTime"]; + * @param value The sendTime to set. + * @return This builder for chaining. + */ + public Builder setSendTime(long value) { + + sendTime_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The send time for the message.
+     * 
+ * + * int64 send_time = 2 [json_name = "sendTime"]; + * @return This builder for chaining. + */ + public Builder clearSendTime() { + bitField0_ = (bitField0_ & ~0x00000002); + sendTime_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> metadata_; + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + private com.google.protobuf.MapField + internalGetMutableMetadata() { + if (metadata_ == null) { + metadata_ = com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return metadata_; + } + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + *
+     * A key-value pairs of metadata.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public boolean containsMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetadata().getMap().containsKey(key); + } + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + *
+     * A key-value pairs of metadata.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + *
+     * A key-value pairs of metadata.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A key-value pairs of metadata.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableMetadata().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A key-value pairs of metadata.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder removeMetadata( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMetadata().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetadata() { + bitField0_ |= 0x00000004; + return internalGetMutableMetadata().getMutableMap(); + } + /** + *
+     * A key-value pairs of metadata.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder putMetadata( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableMetadata().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * A key-value pairs of metadata.
+     * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + public Builder putAllMetadata( + java.util.Map values) { + internalGetMutableMetadata().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private long createTime_ ; + /** + *
+     * The time the message was created.
+     * 
+ * + * int64 create_time = 4 [json_name = "createTime"]; + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + /** + *
+     * The time the message was created.
+     * 
+ * + * int64 create_time = 4 [json_name = "createTime"]; + * @param value The createTime to set. + * @return This builder for chaining. + */ + public Builder setCreateTime(long value) { + + createTime_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The time the message was created.
+     * 
+ * + * int64 create_time = 4 [json_name = "createTime"]; + * @return This builder for chaining. + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = 0L; + onChanged(); + return this; + } + + private long updateTime_ ; + /** + *
+     * The time the message was updated.
+     * 
+ * + * int64 update_time = 5 [json_name = "updateTime"]; + * @return The updateTime. + */ + @java.lang.Override + public long getUpdateTime() { + return updateTime_; + } + /** + *
+     * The time the message was updated.
+     * 
+ * + * int64 update_time = 5 [json_name = "updateTime"]; + * @param value The updateTime to set. + * @return This builder for chaining. + */ + public Builder setUpdateTime(long value) { + + updateTime_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+     * The time the message was updated.
+     * 
+ * + * int64 update_time = 5 [json_name = "updateTime"]; + * @return This builder for chaining. + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = 0L; + onChanged(); + return this; + } + + private long readTime_ ; + /** + *
+     * The time the message was read by the client.
+     * 
+ * + * int64 read_time = 6 [json_name = "readTime"]; + * @return The readTime. + */ + @java.lang.Override + public long getReadTime() { + return readTime_; + } + /** + *
+     * The time the message was read by the client.
+     * 
+ * + * int64 read_time = 6 [json_name = "readTime"]; + * @param value The readTime to set. + * @return This builder for chaining. + */ + public Builder setReadTime(long value) { + + readTime_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * The time the message was read by the client.
+     * 
+ * + * int64 read_time = 6 [json_name = "readTime"]; + * @return This builder for chaining. + */ + public Builder clearReadTime() { + bitField0_ = (bitField0_ & ~0x00000020); + readTime_ = 0L; + onChanged(); + return this; + } + + private long consumeTime_ ; + /** + *
+     * The time the message was consumed by the identity.
+     * 
+ * + * int64 consume_time = 7 [json_name = "consumeTime"]; + * @return The consumeTime. + */ + @java.lang.Override + public long getConsumeTime() { + return consumeTime_; + } + /** + *
+     * The time the message was consumed by the identity.
+     * 
+ * + * int64 consume_time = 7 [json_name = "consumeTime"]; + * @param value The consumeTime to set. + * @return This builder for chaining. + */ + public Builder setConsumeTime(long value) { + + consumeTime_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The time the message was consumed by the identity.
+     * 
+ * + * int64 consume_time = 7 [json_name = "consumeTime"]; + * @return This builder for chaining. + */ + public Builder clearConsumeTime() { + bitField0_ = (bitField0_ & ~0x00000040); + consumeTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object text_ = ""; + /** + *
+     * The message's text.
+     * 
+ * + * string text = 8 [json_name = "text"]; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The message's text.
+     * 
+ * + * string text = 8 [json_name = "text"]; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The message's text.
+     * 
+ * + * string text = 8 [json_name = "text"]; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + text_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + *
+     * The message's text.
+     * 
+ * + * string text = 8 [json_name = "text"]; + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * The message's text.
+     * 
+ * + * string text = 8 [json_name = "text"]; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+     * The message's unique identifier.
+     * 
+ * + * string id = 9 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The message's unique identifier.
+     * 
+ * + * string id = 9 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The message's unique identifier.
+     * 
+ * + * string id = 9 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+     * The message's unique identifier.
+     * 
+ * + * string id = 9 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * The message's unique identifier.
+     * 
+ * + * string id = 9 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + *
+     * The message's title.
+     * 
+ * + * string title = 10 [json_name = "title"]; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The message's title.
+     * 
+ * + * string title = 10 [json_name = "title"]; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The message's title.
+     * 
+ * + * string title = 10 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+     * The message's title.
+     * 
+ * + * string title = 10 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + *
+     * The message's title.
+     * 
+ * + * string title = 10 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object imageUrl_ = ""; + /** + *
+     * The message's image url.
+     * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @return The imageUrl. + */ + public java.lang.String getImageUrl() { + java.lang.Object ref = imageUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The message's image url.
+     * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @return The bytes for imageUrl. + */ + public com.google.protobuf.ByteString + getImageUrlBytes() { + java.lang.Object ref = imageUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The message's image url.
+     * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @param value The imageUrl to set. + * @return This builder for chaining. + */ + public Builder setImageUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + imageUrl_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+     * The message's image url.
+     * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @return This builder for chaining. + */ + public Builder clearImageUrl() { + imageUrl_ = getDefaultInstance().getImageUrl(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + *
+     * The message's image url.
+     * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @param value The bytes for imageUrl to set. + * @return This builder for chaining. + */ + public Builder setImageUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + imageUrl_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.Message) + } + + // @@protoc_insertion_point(class_scope:satori.api.Message) + private static final com.heroiclabs.satori.api.Message DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.Message(); + } + + public static com.heroiclabs.satori.api.Message getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Message parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Message getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/MessageOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/MessageOrBuilder.java new file mode 100644 index 00000000..3048ddf7 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/MessageOrBuilder.java @@ -0,0 +1,215 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface MessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.Message) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The identifier of the schedule.
+   * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @return The scheduleId. + */ + java.lang.String getScheduleId(); + /** + *
+   * The identifier of the schedule.
+   * 
+ * + * string schedule_id = 1 [json_name = "scheduleId"]; + * @return The bytes for scheduleId. + */ + com.google.protobuf.ByteString + getScheduleIdBytes(); + + /** + *
+   * The send time for the message.
+   * 
+ * + * int64 send_time = 2 [json_name = "sendTime"]; + * @return The sendTime. + */ + long getSendTime(); + + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + int getMetadataCount(); + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + boolean containsMetadata( + java.lang.String key); + /** + * Use {@link #getMetadataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetadata(); + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + java.util.Map + getMetadataMap(); + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + /* nullable */ +java.lang.String getMetadataOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * A key-value pairs of metadata.
+   * 
+ * + * map<string, string> metadata = 3 [json_name = "metadata"]; + */ + java.lang.String getMetadataOrThrow( + java.lang.String key); + + /** + *
+   * The time the message was created.
+   * 
+ * + * int64 create_time = 4 [json_name = "createTime"]; + * @return The createTime. + */ + long getCreateTime(); + + /** + *
+   * The time the message was updated.
+   * 
+ * + * int64 update_time = 5 [json_name = "updateTime"]; + * @return The updateTime. + */ + long getUpdateTime(); + + /** + *
+   * The time the message was read by the client.
+   * 
+ * + * int64 read_time = 6 [json_name = "readTime"]; + * @return The readTime. + */ + long getReadTime(); + + /** + *
+   * The time the message was consumed by the identity.
+   * 
+ * + * int64 consume_time = 7 [json_name = "consumeTime"]; + * @return The consumeTime. + */ + long getConsumeTime(); + + /** + *
+   * The message's text.
+   * 
+ * + * string text = 8 [json_name = "text"]; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * The message's text.
+   * 
+ * + * string text = 8 [json_name = "text"]; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + *
+   * The message's unique identifier.
+   * 
+ * + * string id = 9 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The message's unique identifier.
+   * 
+ * + * string id = 9 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The message's title.
+   * 
+ * + * string title = 10 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * The message's title.
+   * 
+ * + * string title = 10 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * The message's image url.
+   * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @return The imageUrl. + */ + java.lang.String getImageUrl(); + /** + *
+   * The message's image url.
+   * 
+ * + * string image_url = 11 [json_name = "imageUrl"]; + * @return The bytes for imageUrl. + */ + com.google.protobuf.ByteString + getImageUrlBytes(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/Properties.java b/src/main/java/com/heroiclabs/satori/api/Properties.java new file mode 100644 index 00000000..fc7d110a --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/Properties.java @@ -0,0 +1,1286 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Properties associated with an identity.
+ * 
+ * + * Protobuf type {@code satori.api.Properties} + */ +public final class Properties extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.Properties) + PropertiesOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Properties.class.getName()); + } + // Use Properties.newBuilder() to construct. + private Properties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Properties() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetDefault(); + case 2: + return internalGetComputed(); + case 3: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Properties.class, com.heroiclabs.satori.api.Properties.Builder.class); + } + + public static final int DEFAULT_FIELD_NUMBER = 1; + private static final class DefaultDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_DefaultEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int COMPUTED_FIELD_NUMBER = 2; + private static final class ComputedDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_ComputedEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> computed_; + private com.google.protobuf.MapField + internalGetComputed() { + if (computed_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ComputedDefaultEntryHolder.defaultEntry); + } + return computed_; + } + public int getComputedCount() { + return internalGetComputed().getMap().size(); + } + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public boolean containsComputed( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetComputed().getMap().containsKey(key); + } + /** + * Use {@link #getComputedMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getComputed() { + return getComputedMap(); + } + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public java.util.Map getComputedMap() { + return internalGetComputed().getMap(); + } + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getComputedOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetComputed().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public java.lang.String getComputedOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetComputed().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CUSTOM_FIELD_NUMBER = 3; + private static final class CustomDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_CustomEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetDefault(), + DefaultDefaultEntryHolder.defaultEntry, + 1); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetComputed(), + ComputedDefaultEntryHolder.defaultEntry, + 2); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetCustom(), + CustomDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetDefault().getMap().entrySet()) { + com.google.protobuf.MapEntry + default__ = DefaultDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, default__); + } + for (java.util.Map.Entry entry + : internalGetComputed().getMap().entrySet()) { + com.google.protobuf.MapEntry + computed__ = ComputedDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, computed__); + } + for (java.util.Map.Entry entry + : internalGetCustom().getMap().entrySet()) { + com.google.protobuf.MapEntry + custom__ = CustomDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, custom__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.Properties)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.Properties other = (com.heroiclabs.satori.api.Properties) obj; + + if (!internalGetDefault().equals( + other.internalGetDefault())) return false; + if (!internalGetComputed().equals( + other.internalGetComputed())) return false; + if (!internalGetCustom().equals( + other.internalGetCustom())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetDefault().getMap().isEmpty()) { + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + internalGetDefault().hashCode(); + } + if (!internalGetComputed().getMap().isEmpty()) { + hash = (37 * hash) + COMPUTED_FIELD_NUMBER; + hash = (53 * hash) + internalGetComputed().hashCode(); + } + if (!internalGetCustom().getMap().isEmpty()) { + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + internalGetCustom().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.Properties parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Properties parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Properties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Properties parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Properties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Properties parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Properties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Properties parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.Properties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.Properties parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.Properties parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Properties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.Properties prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Properties associated with an identity.
+   * 
+ * + * Protobuf type {@code satori.api.Properties} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.Properties) + com.heroiclabs.satori.api.PropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetDefault(); + case 2: + return internalGetComputed(); + case 3: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableDefault(); + case 2: + return internalGetMutableComputed(); + case 3: + return internalGetMutableCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Properties.class, com.heroiclabs.satori.api.Properties.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.Properties.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableDefault().clear(); + internalGetMutableComputed().clear(); + internalGetMutableCustom().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Properties_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Properties getDefaultInstanceForType() { + return com.heroiclabs.satori.api.Properties.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.Properties build() { + com.heroiclabs.satori.api.Properties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Properties buildPartial() { + com.heroiclabs.satori.api.Properties result = new com.heroiclabs.satori.api.Properties(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.Properties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.default_ = internalGetDefault(); + result.default_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.computed_ = internalGetComputed(); + result.computed_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.custom_ = internalGetCustom(); + result.custom_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.Properties) { + return mergeFrom((com.heroiclabs.satori.api.Properties)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.Properties other) { + if (other == com.heroiclabs.satori.api.Properties.getDefaultInstance()) return this; + internalGetMutableDefault().mergeFrom( + other.internalGetDefault()); + bitField0_ |= 0x00000001; + internalGetMutableComputed().mergeFrom( + other.internalGetComputed()); + bitField0_ |= 0x00000002; + internalGetMutableCustom().mergeFrom( + other.internalGetCustom()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + default__ = input.readMessage( + DefaultDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDefault().getMutableMap().put( + default__.getKey(), default__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + computed__ = input.readMessage( + ComputedDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableComputed().getMutableMap().put( + computed__.getKey(), computed__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + custom__ = input.readMessage( + CustomDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableCustom().getMutableMap().put( + custom__.getKey(), custom__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + private com.google.protobuf.MapField + internalGetMutableDefault() { + if (default_ == null) { + default_ = com.google.protobuf.MapField.newMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + if (!default_.isMutable()) { + default_ = default_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDefault() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableDefault().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + public Builder removeDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDefault().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDefault() { + bitField0_ |= 0x00000001; + return internalGetMutableDefault().getMutableMap(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + public Builder putDefault( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDefault().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + public Builder putAllDefault( + java.util.Map values) { + internalGetMutableDefault().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> computed_; + private com.google.protobuf.MapField + internalGetComputed() { + if (computed_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ComputedDefaultEntryHolder.defaultEntry); + } + return computed_; + } + private com.google.protobuf.MapField + internalGetMutableComputed() { + if (computed_ == null) { + computed_ = com.google.protobuf.MapField.newMapField( + ComputedDefaultEntryHolder.defaultEntry); + } + if (!computed_.isMutable()) { + computed_ = computed_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return computed_; + } + public int getComputedCount() { + return internalGetComputed().getMap().size(); + } + /** + *
+     * Event computed properties.
+     * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public boolean containsComputed( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetComputed().getMap().containsKey(key); + } + /** + * Use {@link #getComputedMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getComputed() { + return getComputedMap(); + } + /** + *
+     * Event computed properties.
+     * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public java.util.Map getComputedMap() { + return internalGetComputed().getMap(); + } + /** + *
+     * Event computed properties.
+     * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getComputedOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetComputed().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Event computed properties.
+     * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + @java.lang.Override + public java.lang.String getComputedOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetComputed().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearComputed() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableComputed().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Event computed properties.
+     * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + public Builder removeComputed( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableComputed().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableComputed() { + bitField0_ |= 0x00000002; + return internalGetMutableComputed().getMutableMap(); + } + /** + *
+     * Event computed properties.
+     * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + public Builder putComputed( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableComputed().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Event computed properties.
+     * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + public Builder putAllComputed( + java.util.Map values) { + internalGetMutableComputed().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + private com.google.protobuf.MapField + internalGetMutableCustom() { + if (custom_ == null) { + custom_ = com.google.protobuf.MapField.newMapField( + CustomDefaultEntryHolder.defaultEntry); + } + if (!custom_.isMutable()) { + custom_ = custom_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearCustom() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableCustom().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder removeCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableCustom().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCustom() { + bitField0_ |= 0x00000004; + return internalGetMutableCustom().getMutableMap(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder putCustom( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableCustom().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + public Builder putAllCustom( + java.util.Map values) { + internalGetMutableCustom().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.Properties) + } + + // @@protoc_insertion_point(class_scope:satori.api.Properties) + private static final com.heroiclabs.satori.api.Properties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.Properties(); + } + + public static com.heroiclabs.satori.api.Properties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Properties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Properties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/PropertiesOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/PropertiesOrBuilder.java new file mode 100644 index 00000000..9936f255 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/PropertiesOrBuilder.java @@ -0,0 +1,173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface PropertiesOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.Properties) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + int getDefaultCount(); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + boolean containsDefault( + java.lang.String key); + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDefault(); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + java.util.Map + getDefaultMap(); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + java.lang.String getDefaultOrThrow( + java.lang.String key); + + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + int getComputedCount(); + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + boolean containsComputed( + java.lang.String key); + /** + * Use {@link #getComputedMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getComputed(); + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + java.util.Map + getComputedMap(); + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + /* nullable */ +java.lang.String getComputedOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Event computed properties.
+   * 
+ * + * map<string, string> computed = 2 [json_name = "computed"]; + */ + java.lang.String getComputedOrThrow( + java.lang.String key); + + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + int getCustomCount(); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + boolean containsCustom( + java.lang.String key); + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCustom(); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + java.util.Map + getCustomMap(); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 3 [json_name = "custom"]; + */ + java.lang.String getCustomOrThrow( + java.lang.String key); +} diff --git a/src/main/java/com/heroiclabs/satori/api/SatoriGrpc.java b/src/main/java/com/heroiclabs/satori/api/SatoriGrpc.java new file mode 100644 index 00000000..aa6c1980 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/SatoriGrpc.java @@ -0,0 +1,1619 @@ +package com.heroiclabs.satori.api; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ **
+ * The GRPC protocol service for Satori built with GRPC.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.66.0)", + comments = "Source: github.com/heroiclabs/satori/api/satori.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SatoriGrpc { + + private SatoriGrpc() {} + + public static final java.lang.String SERVICE_NAME = "satori.api.Satori"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getAuthenticateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Authenticate", + requestType = com.heroiclabs.satori.api.AuthenticateRequest.class, + responseType = com.heroiclabs.satori.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateMethod() { + io.grpc.MethodDescriptor getAuthenticateMethod; + if ((getAuthenticateMethod = SatoriGrpc.getAuthenticateMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getAuthenticateMethod = SatoriGrpc.getAuthenticateMethod) == null) { + SatoriGrpc.getAuthenticateMethod = getAuthenticateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Authenticate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.AuthenticateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("Authenticate")) + .build(); + } + } + } + return getAuthenticateMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateLogoutMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateLogout", + requestType = com.heroiclabs.satori.api.AuthenticateLogoutRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateLogoutMethod() { + io.grpc.MethodDescriptor getAuthenticateLogoutMethod; + if ((getAuthenticateLogoutMethod = SatoriGrpc.getAuthenticateLogoutMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getAuthenticateLogoutMethod = SatoriGrpc.getAuthenticateLogoutMethod) == null) { + SatoriGrpc.getAuthenticateLogoutMethod = getAuthenticateLogoutMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateLogout")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.AuthenticateLogoutRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("AuthenticateLogout")) + .build(); + } + } + } + return getAuthenticateLogoutMethod; + } + + private static volatile io.grpc.MethodDescriptor getAuthenticateRefreshMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AuthenticateRefresh", + requestType = com.heroiclabs.satori.api.AuthenticateRefreshRequest.class, + responseType = com.heroiclabs.satori.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAuthenticateRefreshMethod() { + io.grpc.MethodDescriptor getAuthenticateRefreshMethod; + if ((getAuthenticateRefreshMethod = SatoriGrpc.getAuthenticateRefreshMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getAuthenticateRefreshMethod = SatoriGrpc.getAuthenticateRefreshMethod) == null) { + SatoriGrpc.getAuthenticateRefreshMethod = getAuthenticateRefreshMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuthenticateRefresh")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.AuthenticateRefreshRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("AuthenticateRefresh")) + .build(); + } + } + } + return getAuthenticateRefreshMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteIdentityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteIdentity", + requestType = com.google.protobuf.Empty.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteIdentityMethod() { + io.grpc.MethodDescriptor getDeleteIdentityMethod; + if ((getDeleteIdentityMethod = SatoriGrpc.getDeleteIdentityMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getDeleteIdentityMethod = SatoriGrpc.getDeleteIdentityMethod) == null) { + SatoriGrpc.getDeleteIdentityMethod = getDeleteIdentityMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteIdentity")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("DeleteIdentity")) + .build(); + } + } + } + return getDeleteIdentityMethod; + } + + private static volatile io.grpc.MethodDescriptor getEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Event", + requestType = com.heroiclabs.satori.api.EventRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getEventMethod() { + io.grpc.MethodDescriptor getEventMethod; + if ((getEventMethod = SatoriGrpc.getEventMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getEventMethod = SatoriGrpc.getEventMethod) == null) { + SatoriGrpc.getEventMethod = getEventMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Event")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.EventRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("Event")) + .build(); + } + } + } + return getEventMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetExperimentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetExperiments", + requestType = com.heroiclabs.satori.api.GetExperimentsRequest.class, + responseType = com.heroiclabs.satori.api.ExperimentList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetExperimentsMethod() { + io.grpc.MethodDescriptor getGetExperimentsMethod; + if ((getGetExperimentsMethod = SatoriGrpc.getGetExperimentsMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getGetExperimentsMethod = SatoriGrpc.getGetExperimentsMethod) == null) { + SatoriGrpc.getGetExperimentsMethod = getGetExperimentsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExperiments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.GetExperimentsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.ExperimentList.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("GetExperiments")) + .build(); + } + } + } + return getGetExperimentsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetFlagsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFlags", + requestType = com.heroiclabs.satori.api.GetFlagsRequest.class, + responseType = com.heroiclabs.satori.api.FlagList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetFlagsMethod() { + io.grpc.MethodDescriptor getGetFlagsMethod; + if ((getGetFlagsMethod = SatoriGrpc.getGetFlagsMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getGetFlagsMethod = SatoriGrpc.getGetFlagsMethod) == null) { + SatoriGrpc.getGetFlagsMethod = getGetFlagsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFlags")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.GetFlagsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.FlagList.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("GetFlags")) + .build(); + } + } + } + return getGetFlagsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetLiveEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLiveEvents", + requestType = com.heroiclabs.satori.api.GetLiveEventsRequest.class, + responseType = com.heroiclabs.satori.api.LiveEventList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetLiveEventsMethod() { + io.grpc.MethodDescriptor getGetLiveEventsMethod; + if ((getGetLiveEventsMethod = SatoriGrpc.getGetLiveEventsMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getGetLiveEventsMethod = SatoriGrpc.getGetLiveEventsMethod) == null) { + SatoriGrpc.getGetLiveEventsMethod = getGetLiveEventsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLiveEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.GetLiveEventsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.LiveEventList.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("GetLiveEvents")) + .build(); + } + } + } + return getGetLiveEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getHealthcheckMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Healthcheck", + requestType = com.google.protobuf.Empty.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getHealthcheckMethod() { + io.grpc.MethodDescriptor getHealthcheckMethod; + if ((getHealthcheckMethod = SatoriGrpc.getHealthcheckMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getHealthcheckMethod = SatoriGrpc.getHealthcheckMethod) == null) { + SatoriGrpc.getHealthcheckMethod = getHealthcheckMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Healthcheck")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("Healthcheck")) + .build(); + } + } + } + return getHealthcheckMethod; + } + + private static volatile io.grpc.MethodDescriptor getIdentifyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Identify", + requestType = com.heroiclabs.satori.api.IdentifyRequest.class, + responseType = com.heroiclabs.satori.api.Session.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getIdentifyMethod() { + io.grpc.MethodDescriptor getIdentifyMethod; + if ((getIdentifyMethod = SatoriGrpc.getIdentifyMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getIdentifyMethod = SatoriGrpc.getIdentifyMethod) == null) { + SatoriGrpc.getIdentifyMethod = getIdentifyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Identify")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.IdentifyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.Session.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("Identify")) + .build(); + } + } + } + return getIdentifyMethod; + } + + private static volatile io.grpc.MethodDescriptor getListPropertiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProperties", + requestType = com.google.protobuf.Empty.class, + responseType = com.heroiclabs.satori.api.Properties.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListPropertiesMethod() { + io.grpc.MethodDescriptor getListPropertiesMethod; + if ((getListPropertiesMethod = SatoriGrpc.getListPropertiesMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getListPropertiesMethod = SatoriGrpc.getListPropertiesMethod) == null) { + SatoriGrpc.getListPropertiesMethod = getListPropertiesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProperties")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.Properties.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("ListProperties")) + .build(); + } + } + } + return getListPropertiesMethod; + } + + private static volatile io.grpc.MethodDescriptor getReadycheckMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Readycheck", + requestType = com.google.protobuf.Empty.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getReadycheckMethod() { + io.grpc.MethodDescriptor getReadycheckMethod; + if ((getReadycheckMethod = SatoriGrpc.getReadycheckMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getReadycheckMethod = SatoriGrpc.getReadycheckMethod) == null) { + SatoriGrpc.getReadycheckMethod = getReadycheckMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Readycheck")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("Readycheck")) + .build(); + } + } + } + return getReadycheckMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdatePropertiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProperties", + requestType = com.heroiclabs.satori.api.UpdatePropertiesRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdatePropertiesMethod() { + io.grpc.MethodDescriptor getUpdatePropertiesMethod; + if ((getUpdatePropertiesMethod = SatoriGrpc.getUpdatePropertiesMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getUpdatePropertiesMethod = SatoriGrpc.getUpdatePropertiesMethod) == null) { + SatoriGrpc.getUpdatePropertiesMethod = getUpdatePropertiesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProperties")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.UpdatePropertiesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("UpdateProperties")) + .build(); + } + } + } + return getUpdatePropertiesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetMessageListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMessageList", + requestType = com.heroiclabs.satori.api.GetMessageListRequest.class, + responseType = com.heroiclabs.satori.api.GetMessageListResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetMessageListMethod() { + io.grpc.MethodDescriptor getGetMessageListMethod; + if ((getGetMessageListMethod = SatoriGrpc.getGetMessageListMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getGetMessageListMethod = SatoriGrpc.getGetMessageListMethod) == null) { + SatoriGrpc.getGetMessageListMethod = getGetMessageListMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMessageList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.GetMessageListRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.GetMessageListResponse.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("GetMessageList")) + .build(); + } + } + } + return getGetMessageListMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateMessageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMessage", + requestType = com.heroiclabs.satori.api.UpdateMessageRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateMessageMethod() { + io.grpc.MethodDescriptor getUpdateMessageMethod; + if ((getUpdateMessageMethod = SatoriGrpc.getUpdateMessageMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getUpdateMessageMethod = SatoriGrpc.getUpdateMessageMethod) == null) { + SatoriGrpc.getUpdateMessageMethod = getUpdateMessageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateMessage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.UpdateMessageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("UpdateMessage")) + .build(); + } + } + } + return getUpdateMessageMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteMessageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteMessage", + requestType = com.heroiclabs.satori.api.DeleteMessageRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteMessageMethod() { + io.grpc.MethodDescriptor getDeleteMessageMethod; + if ((getDeleteMessageMethod = SatoriGrpc.getDeleteMessageMethod) == null) { + synchronized (SatoriGrpc.class) { + if ((getDeleteMessageMethod = SatoriGrpc.getDeleteMessageMethod) == null) { + SatoriGrpc.getDeleteMessageMethod = getDeleteMessageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteMessage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.heroiclabs.satori.api.DeleteMessageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new SatoriMethodDescriptorSupplier("DeleteMessage")) + .build(); + } + } + } + return getDeleteMessageMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SatoriStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SatoriStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SatoriStub(channel, callOptions); + } + }; + return SatoriStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SatoriBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SatoriBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SatoriBlockingStub(channel, callOptions); + } + }; + return SatoriBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SatoriFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SatoriFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SatoriFutureStub(channel, callOptions); + } + }; + return SatoriFutureStub.newStub(factory, channel); + } + + /** + *
+   **
+   * The GRPC protocol service for Satori built with GRPC.
+   * 
+ */ + public interface AsyncService { + + /** + *
+     * Authenticate against the server.
+     * 
+ */ + default void authenticate(com.heroiclabs.satori.api.AuthenticateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateMethod(), responseObserver); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + default void authenticateLogout(com.heroiclabs.satori.api.AuthenticateLogoutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateLogoutMethod(), responseObserver); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + default void authenticateRefresh(com.heroiclabs.satori.api.AuthenticateRefreshRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateRefreshMethod(), responseObserver); + } + + /** + *
+     * Delete the caller's identity and associated data.
+     * 
+ */ + default void deleteIdentity(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteIdentityMethod(), responseObserver); + } + + /** + *
+     * Publish an event for this session.
+     * 
+ */ + default void event(com.heroiclabs.satori.api.EventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEventMethod(), responseObserver); + } + + /** + *
+     * Get or list all available experiments for this identity.
+     * 
+ */ + default void getExperiments(com.heroiclabs.satori.api.GetExperimentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetExperimentsMethod(), responseObserver); + } + + /** + *
+     * List all available flags for this identity.
+     * 
+ */ + default void getFlags(com.heroiclabs.satori.api.GetFlagsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFlagsMethod(), responseObserver); + } + + /** + *
+     * List available live events.
+     * 
+ */ + default void getLiveEvents(com.heroiclabs.satori.api.GetLiveEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLiveEventsMethod(), responseObserver); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + default void healthcheck(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHealthcheckMethod(), responseObserver); + } + + /** + *
+     * Enrich/replace the current session with new identifier.
+     * 
+ */ + default void identify(com.heroiclabs.satori.api.IdentifyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIdentifyMethod(), responseObserver); + } + + /** + *
+     * List properties associated with this identity.
+     * 
+ */ + default void listProperties(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPropertiesMethod(), responseObserver); + } + + /** + *
+     * A readycheck which load balancers can use to check the service.
+     * 
+ */ + default void readycheck(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReadycheckMethod(), responseObserver); + } + + /** + *
+     * Update identity properties.
+     * 
+ */ + default void updateProperties(com.heroiclabs.satori.api.UpdatePropertiesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdatePropertiesMethod(), responseObserver); + } + + /** + *
+     * Get the list of messages for the identity.
+     * 
+ */ + default void getMessageList(com.heroiclabs.satori.api.GetMessageListRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMessageListMethod(), responseObserver); + } + + /** + *
+     * Updates a message for an identity.
+     * 
+ */ + default void updateMessage(com.heroiclabs.satori.api.UpdateMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMessageMethod(), responseObserver); + } + + /** + *
+     * Deletes a message for an identity.
+     * 
+ */ + default void deleteMessage(com.heroiclabs.satori.api.DeleteMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteMessageMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Satori. + *
+   **
+   * The GRPC protocol service for Satori built with GRPC.
+   * 
+ */ + public static abstract class SatoriImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return SatoriGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Satori. + *
+   **
+   * The GRPC protocol service for Satori built with GRPC.
+   * 
+ */ + public static final class SatoriStub + extends io.grpc.stub.AbstractAsyncStub { + private SatoriStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SatoriStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SatoriStub(channel, callOptions); + } + + /** + *
+     * Authenticate against the server.
+     * 
+ */ + public void authenticate(com.heroiclabs.satori.api.AuthenticateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + public void authenticateLogout(com.heroiclabs.satori.api.AuthenticateLogoutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateLogoutMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + public void authenticateRefresh(com.heroiclabs.satori.api.AuthenticateRefreshRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAuthenticateRefreshMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Delete the caller's identity and associated data.
+     * 
+ */ + public void deleteIdentity(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteIdentityMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Publish an event for this session.
+     * 
+ */ + public void event(com.heroiclabs.satori.api.EventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getEventMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Get or list all available experiments for this identity.
+     * 
+ */ + public void getExperiments(com.heroiclabs.satori.api.GetExperimentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetExperimentsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List all available flags for this identity.
+     * 
+ */ + public void getFlags(com.heroiclabs.satori.api.GetFlagsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFlagsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List available live events.
+     * 
+ */ + public void getLiveEvents(com.heroiclabs.satori.api.GetLiveEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLiveEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + public void healthcheck(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getHealthcheckMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Enrich/replace the current session with new identifier.
+     * 
+ */ + public void identify(com.heroiclabs.satori.api.IdentifyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getIdentifyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List properties associated with this identity.
+     * 
+ */ + public void listProperties(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPropertiesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * A readycheck which load balancers can use to check the service.
+     * 
+ */ + public void readycheck(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReadycheckMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Update identity properties.
+     * 
+ */ + public void updateProperties(com.heroiclabs.satori.api.UpdatePropertiesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePropertiesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Get the list of messages for the identity.
+     * 
+ */ + public void getMessageList(com.heroiclabs.satori.api.GetMessageListRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMessageListMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates a message for an identity.
+     * 
+ */ + public void updateMessage(com.heroiclabs.satori.api.UpdateMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMessageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a message for an identity.
+     * 
+ */ + public void deleteMessage(com.heroiclabs.satori.api.DeleteMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMessageMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Satori. + *
+   **
+   * The GRPC protocol service for Satori built with GRPC.
+   * 
+ */ + public static final class SatoriBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SatoriBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SatoriBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SatoriBlockingStub(channel, callOptions); + } + + /** + *
+     * Authenticate against the server.
+     * 
+ */ + public com.heroiclabs.satori.api.Session authenticate(com.heroiclabs.satori.api.AuthenticateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateMethod(), getCallOptions(), request); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + public com.google.protobuf.Empty authenticateLogout(com.heroiclabs.satori.api.AuthenticateLogoutRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateLogoutMethod(), getCallOptions(), request); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + public com.heroiclabs.satori.api.Session authenticateRefresh(com.heroiclabs.satori.api.AuthenticateRefreshRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAuthenticateRefreshMethod(), getCallOptions(), request); + } + + /** + *
+     * Delete the caller's identity and associated data.
+     * 
+ */ + public com.google.protobuf.Empty deleteIdentity(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteIdentityMethod(), getCallOptions(), request); + } + + /** + *
+     * Publish an event for this session.
+     * 
+ */ + public com.google.protobuf.Empty event(com.heroiclabs.satori.api.EventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getEventMethod(), getCallOptions(), request); + } + + /** + *
+     * Get or list all available experiments for this identity.
+     * 
+ */ + public com.heroiclabs.satori.api.ExperimentList getExperiments(com.heroiclabs.satori.api.GetExperimentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetExperimentsMethod(), getCallOptions(), request); + } + + /** + *
+     * List all available flags for this identity.
+     * 
+ */ + public com.heroiclabs.satori.api.FlagList getFlags(com.heroiclabs.satori.api.GetFlagsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFlagsMethod(), getCallOptions(), request); + } + + /** + *
+     * List available live events.
+     * 
+ */ + public com.heroiclabs.satori.api.LiveEventList getLiveEvents(com.heroiclabs.satori.api.GetLiveEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLiveEventsMethod(), getCallOptions(), request); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + public com.google.protobuf.Empty healthcheck(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getHealthcheckMethod(), getCallOptions(), request); + } + + /** + *
+     * Enrich/replace the current session with new identifier.
+     * 
+ */ + public com.heroiclabs.satori.api.Session identify(com.heroiclabs.satori.api.IdentifyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getIdentifyMethod(), getCallOptions(), request); + } + + /** + *
+     * List properties associated with this identity.
+     * 
+ */ + public com.heroiclabs.satori.api.Properties listProperties(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPropertiesMethod(), getCallOptions(), request); + } + + /** + *
+     * A readycheck which load balancers can use to check the service.
+     * 
+ */ + public com.google.protobuf.Empty readycheck(com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReadycheckMethod(), getCallOptions(), request); + } + + /** + *
+     * Update identity properties.
+     * 
+ */ + public com.google.protobuf.Empty updateProperties(com.heroiclabs.satori.api.UpdatePropertiesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePropertiesMethod(), getCallOptions(), request); + } + + /** + *
+     * Get the list of messages for the identity.
+     * 
+ */ + public com.heroiclabs.satori.api.GetMessageListResponse getMessageList(com.heroiclabs.satori.api.GetMessageListRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMessageListMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates a message for an identity.
+     * 
+ */ + public com.google.protobuf.Empty updateMessage(com.heroiclabs.satori.api.UpdateMessageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMessageMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a message for an identity.
+     * 
+ */ + public com.google.protobuf.Empty deleteMessage(com.heroiclabs.satori.api.DeleteMessageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMessageMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Satori. + *
+   **
+   * The GRPC protocol service for Satori built with GRPC.
+   * 
+ */ + public static final class SatoriFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SatoriFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SatoriFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SatoriFutureStub(channel, callOptions); + } + + /** + *
+     * Authenticate against the server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticate( + com.heroiclabs.satori.api.AuthenticateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateMethod(), getCallOptions()), request); + } + + /** + *
+     * Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateLogout( + com.heroiclabs.satori.api.AuthenticateLogoutRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateLogoutMethod(), getCallOptions()), request); + } + + /** + *
+     * Refresh a user's session using a refresh token retrieved from a previous authentication request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture authenticateRefresh( + com.heroiclabs.satori.api.AuthenticateRefreshRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAuthenticateRefreshMethod(), getCallOptions()), request); + } + + /** + *
+     * Delete the caller's identity and associated data.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteIdentity( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteIdentityMethod(), getCallOptions()), request); + } + + /** + *
+     * Publish an event for this session.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture event( + com.heroiclabs.satori.api.EventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getEventMethod(), getCallOptions()), request); + } + + /** + *
+     * Get or list all available experiments for this identity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getExperiments( + com.heroiclabs.satori.api.GetExperimentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetExperimentsMethod(), getCallOptions()), request); + } + + /** + *
+     * List all available flags for this identity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getFlags( + com.heroiclabs.satori.api.GetFlagsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFlagsMethod(), getCallOptions()), request); + } + + /** + *
+     * List available live events.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getLiveEvents( + com.heroiclabs.satori.api.GetLiveEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLiveEventsMethod(), getCallOptions()), request); + } + + /** + *
+     * A healthcheck which load balancers can use to check the service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture healthcheck( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getHealthcheckMethod(), getCallOptions()), request); + } + + /** + *
+     * Enrich/replace the current session with new identifier.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture identify( + com.heroiclabs.satori.api.IdentifyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getIdentifyMethod(), getCallOptions()), request); + } + + /** + *
+     * List properties associated with this identity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProperties( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPropertiesMethod(), getCallOptions()), request); + } + + /** + *
+     * A readycheck which load balancers can use to check the service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture readycheck( + com.google.protobuf.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReadycheckMethod(), getCallOptions()), request); + } + + /** + *
+     * Update identity properties.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateProperties( + com.heroiclabs.satori.api.UpdatePropertiesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePropertiesMethod(), getCallOptions()), request); + } + + /** + *
+     * Get the list of messages for the identity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getMessageList( + com.heroiclabs.satori.api.GetMessageListRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMessageListMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates a message for an identity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateMessage( + com.heroiclabs.satori.api.UpdateMessageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMessageMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a message for an identity.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteMessage( + com.heroiclabs.satori.api.DeleteMessageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMessageMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_AUTHENTICATE = 0; + private static final int METHODID_AUTHENTICATE_LOGOUT = 1; + private static final int METHODID_AUTHENTICATE_REFRESH = 2; + private static final int METHODID_DELETE_IDENTITY = 3; + private static final int METHODID_EVENT = 4; + private static final int METHODID_GET_EXPERIMENTS = 5; + private static final int METHODID_GET_FLAGS = 6; + private static final int METHODID_GET_LIVE_EVENTS = 7; + private static final int METHODID_HEALTHCHECK = 8; + private static final int METHODID_IDENTIFY = 9; + private static final int METHODID_LIST_PROPERTIES = 10; + private static final int METHODID_READYCHECK = 11; + private static final int METHODID_UPDATE_PROPERTIES = 12; + private static final int METHODID_GET_MESSAGE_LIST = 13; + private static final int METHODID_UPDATE_MESSAGE = 14; + private static final int METHODID_DELETE_MESSAGE = 15; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_AUTHENTICATE: + serviceImpl.authenticate((com.heroiclabs.satori.api.AuthenticateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_LOGOUT: + serviceImpl.authenticateLogout((com.heroiclabs.satori.api.AuthenticateLogoutRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_AUTHENTICATE_REFRESH: + serviceImpl.authenticateRefresh((com.heroiclabs.satori.api.AuthenticateRefreshRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_IDENTITY: + serviceImpl.deleteIdentity((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EVENT: + serviceImpl.event((com.heroiclabs.satori.api.EventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_EXPERIMENTS: + serviceImpl.getExperiments((com.heroiclabs.satori.api.GetExperimentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FLAGS: + serviceImpl.getFlags((com.heroiclabs.satori.api.GetFlagsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LIVE_EVENTS: + serviceImpl.getLiveEvents((com.heroiclabs.satori.api.GetLiveEventsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_HEALTHCHECK: + serviceImpl.healthcheck((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IDENTIFY: + serviceImpl.identify((com.heroiclabs.satori.api.IdentifyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PROPERTIES: + serviceImpl.listProperties((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_READYCHECK: + serviceImpl.readycheck((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PROPERTIES: + serviceImpl.updateProperties((com.heroiclabs.satori.api.UpdatePropertiesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MESSAGE_LIST: + serviceImpl.getMessageList((com.heroiclabs.satori.api.GetMessageListRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_MESSAGE: + serviceImpl.updateMessage((com.heroiclabs.satori.api.UpdateMessageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MESSAGE: + serviceImpl.deleteMessage((com.heroiclabs.satori.api.DeleteMessageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getAuthenticateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.AuthenticateRequest, + com.heroiclabs.satori.api.Session>( + service, METHODID_AUTHENTICATE))) + .addMethod( + getAuthenticateLogoutMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.AuthenticateLogoutRequest, + com.google.protobuf.Empty>( + service, METHODID_AUTHENTICATE_LOGOUT))) + .addMethod( + getAuthenticateRefreshMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.AuthenticateRefreshRequest, + com.heroiclabs.satori.api.Session>( + service, METHODID_AUTHENTICATE_REFRESH))) + .addMethod( + getDeleteIdentityMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.google.protobuf.Empty>( + service, METHODID_DELETE_IDENTITY))) + .addMethod( + getEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.EventRequest, + com.google.protobuf.Empty>( + service, METHODID_EVENT))) + .addMethod( + getGetExperimentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.GetExperimentsRequest, + com.heroiclabs.satori.api.ExperimentList>( + service, METHODID_GET_EXPERIMENTS))) + .addMethod( + getGetFlagsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.GetFlagsRequest, + com.heroiclabs.satori.api.FlagList>( + service, METHODID_GET_FLAGS))) + .addMethod( + getGetLiveEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.GetLiveEventsRequest, + com.heroiclabs.satori.api.LiveEventList>( + service, METHODID_GET_LIVE_EVENTS))) + .addMethod( + getHealthcheckMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.google.protobuf.Empty>( + service, METHODID_HEALTHCHECK))) + .addMethod( + getIdentifyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.IdentifyRequest, + com.heroiclabs.satori.api.Session>( + service, METHODID_IDENTIFY))) + .addMethod( + getListPropertiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.heroiclabs.satori.api.Properties>( + service, METHODID_LIST_PROPERTIES))) + .addMethod( + getReadycheckMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + com.google.protobuf.Empty>( + service, METHODID_READYCHECK))) + .addMethod( + getUpdatePropertiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.UpdatePropertiesRequest, + com.google.protobuf.Empty>( + service, METHODID_UPDATE_PROPERTIES))) + .addMethod( + getGetMessageListMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.GetMessageListRequest, + com.heroiclabs.satori.api.GetMessageListResponse>( + service, METHODID_GET_MESSAGE_LIST))) + .addMethod( + getUpdateMessageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.UpdateMessageRequest, + com.google.protobuf.Empty>( + service, METHODID_UPDATE_MESSAGE))) + .addMethod( + getDeleteMessageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.heroiclabs.satori.api.DeleteMessageRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_MESSAGE))) + .build(); + } + + private static abstract class SatoriBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SatoriBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Satori"); + } + } + + private static final class SatoriFileDescriptorSupplier + extends SatoriBaseDescriptorSupplier { + SatoriFileDescriptorSupplier() {} + } + + private static final class SatoriMethodDescriptorSupplier + extends SatoriBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SatoriMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SatoriGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SatoriFileDescriptorSupplier()) + .addMethod(getAuthenticateMethod()) + .addMethod(getAuthenticateLogoutMethod()) + .addMethod(getAuthenticateRefreshMethod()) + .addMethod(getDeleteIdentityMethod()) + .addMethod(getEventMethod()) + .addMethod(getGetExperimentsMethod()) + .addMethod(getGetFlagsMethod()) + .addMethod(getGetLiveEventsMethod()) + .addMethod(getHealthcheckMethod()) + .addMethod(getIdentifyMethod()) + .addMethod(getListPropertiesMethod()) + .addMethod(getReadycheckMethod()) + .addMethod(getUpdatePropertiesMethod()) + .addMethod(getGetMessageListMethod()) + .addMethod(getUpdateMessageMethod()) + .addMethod(getDeleteMessageMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/src/main/java/com/heroiclabs/satori/api/SatoriProto.java b/src/main/java/com/heroiclabs/satori/api/SatoriProto.java new file mode 100644 index 00000000..ea16fe46 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/SatoriProto.java @@ -0,0 +1,583 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public final class SatoriProto { + private SatoriProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + SatoriProto.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_AuthenticateLogoutRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_AuthenticateLogoutRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_AuthenticateRefreshRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_AuthenticateRefreshRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_AuthenticateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_AuthenticateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_AuthenticateRequest_DefaultEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_AuthenticateRequest_DefaultEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_AuthenticateRequest_CustomEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_AuthenticateRequest_CustomEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Event_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Event_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Event_MetadataEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Event_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_EventRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_EventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Experiment_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Experiment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_ExperimentList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_ExperimentList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Flag_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Flag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_FlagList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_FlagList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_GetExperimentsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_GetExperimentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_GetFlagsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_GetFlagsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_GetLiveEventsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_GetLiveEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_IdentifyRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_IdentifyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_IdentifyRequest_DefaultEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_IdentifyRequest_DefaultEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_IdentifyRequest_CustomEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_IdentifyRequest_CustomEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_LiveEvent_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_LiveEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_LiveEventList_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_LiveEventList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Properties_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Properties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Properties_DefaultEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Properties_DefaultEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Properties_ComputedEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Properties_ComputedEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Properties_CustomEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Properties_CustomEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Session_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Session_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_UpdatePropertiesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_UpdatePropertiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_UpdatePropertiesRequest_DefaultEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_UpdatePropertiesRequest_DefaultEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_UpdatePropertiesRequest_CustomEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_UpdatePropertiesRequest_CustomEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_GetMessageListRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_GetMessageListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_GetMessageListResponse_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_GetMessageListResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Message_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Message_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_Message_MetadataEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_Message_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_UpdateMessageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_UpdateMessageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_satori_api_DeleteMessageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_satori_api_DeleteMessageRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n-github.com/heroiclabs/satori/api/sator" + + "i.proto\022\nsatori.api\032\034google/api/annotati" + + "ons.proto\032\033google/protobuf/empty.proto\032\037" + + "google/protobuf/timestamp.proto\032.protoc-" + + "gen-openapiv2/options/annotations.proto\032" + + "\036google/protobuf/wrappers.proto\"V\n\031Authe" + + "nticateLogoutRequest\022\024\n\005token\030\001 \001(\tR\005tok" + + "en\022#\n\rrefresh_token\030\002 \001(\tR\014refreshToken\"" + + "A\n\032AuthenticateRefreshRequest\022#\n\rrefresh" + + "_token\030\001 \001(\tR\014refreshToken\"\251\002\n\023Authentic" + + "ateRequest\022\016\n\002id\030\001 \001(\tR\002id\022F\n\007default\030\002 " + + "\003(\0132,.satori.api.AuthenticateRequest.Def" + + "aultEntryR\007default\022C\n\006custom\030\003 \003(\0132+.sat" + + "ori.api.AuthenticateRequest.CustomEntryR" + + "\006custom\032:\n\014DefaultEntry\022\020\n\003key\030\001 \001(\tR\003ke" + + "y\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\0329\n\013CustomEnt" + + "ry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005val" + + "ue:\0028\001\"\365\001\n\005Event\022\022\n\004name\030\001 \001(\tR\004name\022\016\n\002" + + "id\030\002 \001(\tR\002id\022;\n\010metadata\030\003 \003(\0132\037.satori." + + "api.Event.MetadataEntryR\010metadata\022\024\n\005val" + + "ue\030\004 \001(\tR\005value\0228\n\ttimestamp\030\005 \001(\0132\032.goo" + + "gle.protobuf.TimestampR\ttimestamp\032;\n\rMet" + + "adataEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 " + + "\001(\tR\005value:\0028\001\"9\n\014EventRequest\022)\n\006events" + + "\030\001 \003(\0132\021.satori.api.EventR\006events\"6\n\nExp" + + "eriment\022\022\n\004name\030\001 \001(\tR\004name\022\024\n\005value\030\002 \001" + + "(\tR\005value\"J\n\016ExperimentList\0228\n\013experimen" + + "ts\030\001 \003(\0132\026.satori.api.ExperimentR\013experi" + + "ments\"]\n\004Flag\022\022\n\004name\030\001 \001(\tR\004name\022\024\n\005val" + + "ue\030\002 \001(\tR\005value\022+\n\021condition_changed\030\003 \001" + + "(\010R\020conditionChanged\"2\n\010FlagList\022&\n\005flag" + + "s\030\001 \003(\0132\020.satori.api.FlagR\005flags\"-\n\025GetE" + + "xperimentsRequest\022\024\n\005names\030\001 \003(\tR\005names\"" + + "\'\n\017GetFlagsRequest\022\024\n\005names\030\001 \003(\tR\005names" + + "\",\n\024GetLiveEventsRequest\022\024\n\005names\030\001 \003(\tR" + + "\005names\"\235\002\n\017IdentifyRequest\022\016\n\002id\030\001 \001(\tR\002" + + "id\022B\n\007default\030\002 \003(\0132(.satori.api.Identif" + + "yRequest.DefaultEntryR\007default\022?\n\006custom" + + "\030\003 \003(\0132\'.satori.api.IdentifyRequest.Cust" + + "omEntryR\006custom\032:\n\014DefaultEntry\022\020\n\003key\030\001" + + " \001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\0329\n\013C" + + "ustomEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 " + + "\001(\tR\005value:\0028\001\"\323\002\n\tLiveEvent\022\022\n\004name\030\001 \001" + + "(\tR\004name\022 \n\013description\030\002 \001(\tR\013descripti" + + "on\022\024\n\005value\030\003 \001(\tR\005value\0221\n\025active_start" + + "_time_sec\030\004 \001(\003R\022activeStartTimeSec\022-\n\023a" + + "ctive_end_time_sec\030\005 \001(\003R\020activeEndTimeS" + + "ec\022\016\n\002id\030\006 \001(\tR\002id\022$\n\016start_time_sec\030\007 \001" + + "(\003R\014startTimeSec\022 \n\014end_time_sec\030\010 \001(\003R\n" + + "endTimeSec\022!\n\014duration_sec\030\t \001(\003R\013durati" + + "onSec\022\035\n\nreset_cron\030\n \001(\tR\tresetCron\"G\n\r" + + "LiveEventList\0226\n\013live_events\030\001 \003(\0132\025.sat" + + "ori.api.LiveEventR\nliveEvents\"\375\002\n\nProper" + + "ties\022=\n\007default\030\001 \003(\0132#.satori.api.Prope" + + "rties.DefaultEntryR\007default\022@\n\010computed\030" + + "\002 \003(\0132$.satori.api.Properties.ComputedEn" + + "tryR\010computed\022:\n\006custom\030\003 \003(\0132\".satori.a" + + "pi.Properties.CustomEntryR\006custom\032:\n\014Def" + + "aultEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001" + + "(\tR\005value:\0028\001\032;\n\rComputedEntry\022\020\n\003key\030\001 " + + "\001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\0329\n\013Cu" + + "stomEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001" + + "(\tR\005value:\0028\001\"|\n\007Session\022\024\n\005token\030\001 \001(\tR" + + "\005token\022#\n\rrefresh_token\030\002 \001(\tR\014refreshTo" + + "ken\0226\n\nproperties\030\003 \001(\0132\026.satori.api.Pro" + + "pertiesR\nproperties\"\337\002\n\027UpdateProperties" + + "Request\022J\n\007default\030\001 \003(\01320.satori.api.Up" + + "datePropertiesRequest.DefaultEntryR\007defa" + + "ult\022G\n\006custom\030\002 \003(\0132/.satori.api.UpdateP" + + "ropertiesRequest.CustomEntryR\006custom\0228\n\t" + + "recompute\030\003 \001(\0132\032.google.protobuf.BoolVa" + + "lueR\trecompute\032:\n\014DefaultEntry\022\020\n\003key\030\001 " + + "\001(\tR\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\0329\n\013Cu" + + "stomEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001" + + "(\tR\005value:\0028\001\"_\n\025GetMessageListRequest\022\024" + + "\n\005limit\030\001 \001(\005R\005limit\022\030\n\007forward\030\002 \001(\010R\007f" + + "orward\022\026\n\006cursor\030\003 \001(\tR\006cursor\"\266\001\n\026GetMe" + + "ssageListResponse\022/\n\010messages\030\001 \003(\0132\023.sa" + + "tori.api.MessageR\010messages\022\037\n\013next_curso" + + "r\030\002 \001(\tR\nnextCursor\022\037\n\013prev_cursor\030\003 \001(\t" + + "R\nprevCursor\022)\n\020cacheable_cursor\030\004 \001(\tR\017" + + "cacheableCursor\"\234\003\n\007Message\022\037\n\013schedule_" + + "id\030\001 \001(\tR\nscheduleId\022\033\n\tsend_time\030\002 \001(\003R" + + "\010sendTime\022=\n\010metadata\030\003 \003(\0132!.satori.api" + + ".Message.MetadataEntryR\010metadata\022\037\n\013crea" + + "te_time\030\004 \001(\003R\ncreateTime\022\037\n\013update_time" + + "\030\005 \001(\003R\nupdateTime\022\033\n\tread_time\030\006 \001(\003R\010r" + + "eadTime\022!\n\014consume_time\030\007 \001(\003R\013consumeTi" + + "me\022\022\n\004text\030\010 \001(\tR\004text\022\016\n\002id\030\t \001(\tR\002id\022\024" + + "\n\005title\030\n \001(\tR\005title\022\033\n\timage_url\030\013 \001(\tR" + + "\010imageUrl\032;\n\rMetadataEntry\022\020\n\003key\030\001 \001(\tR" + + "\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"f\n\024Update" + + "MessageRequest\022\016\n\002id\030\001 \001(\tR\002id\022\033\n\tread_t" + + "ime\030\002 \001(\003R\010readTime\022!\n\014consume_time\030\003 \001(" + + "\003R\013consumeTime\"&\n\024DeleteMessageRequest\022\016" + + "\n\002id\030\001 \001(\tR\002id2\364\014\n\006Satori\022u\n\014Authenticat" + + "e\022\037.satori.api.AuthenticateRequest\032\023.sat" + + "ori.api.Session\"/\222A\021b\017\n\r\n\tBasicAuth\022\000\202\323\344" + + "\223\002\025\"\020/v1/authenticate:\001*\022w\n\022Authenticate" + + "Logout\022%.satori.api.AuthenticateLogoutRe" + + "quest\032\026.google.protobuf.Empty\"\"\202\323\344\223\002\034\"\027/" + + "v1/authenticate/logout:\001*\022\213\001\n\023Authentica" + + "teRefresh\022&.satori.api.AuthenticateRefre" + + "shRequest\032\023.satori.api.Session\"7\222A\021b\017\n\r\n" + + "\tBasicAuth\022\000\202\323\344\223\002\035\"\030/v1/authenticate/ref" + + "resh:\001*\022V\n\016DeleteIdentity\022\026.google.proto" + + "buf.Empty\032\026.google.protobuf.Empty\"\024\202\323\344\223\002" + + "\016*\014/v1/identity\022O\n\005Event\022\030.satori.api.Ev" + + "entRequest\032\026.google.protobuf.Empty\"\024\202\323\344\223" + + "\002\016\"\t/v1/event:\001*\022g\n\016GetExperiments\022!.sat" + + "ori.api.GetExperimentsRequest\032\032.satori.a" + + "pi.ExperimentList\"\026\202\323\344\223\002\020\022\016/v1/experimen" + + "t\022t\n\010GetFlags\022\033.satori.api.GetFlagsReque" + + "st\032\024.satori.api.FlagList\"5\222A\"b \n\r\n\tBeare" + + "rJwt\022\000\n\017\n\013HttpKeyAuth\022\000\202\323\344\223\002\n\022\010/v1/flag\022" + + "d\n\rGetLiveEvents\022 .satori.api.GetLiveEve" + + "ntsRequest\032\031.satori.api.LiveEventList\"\026\202" + + "\323\344\223\002\020\022\016/v1/live-event\022S\n\013Healthcheck\022\026.g" + + "oogle.protobuf.Empty\032\026.google.protobuf.E" + + "mpty\"\024\202\323\344\223\002\016\022\014/healthcheck\022U\n\010Identify\022\033" + + ".satori.api.IdentifyRequest\032\023.satori.api" + + ".Session\"\027\202\323\344\223\002\021\032\014/v1/identify:\001*\022X\n\016Lis" + + "tProperties\022\026.google.protobuf.Empty\032\026.sa" + + "tori.api.Properties\"\026\202\323\344\223\002\020\022\016/v1/propert" + + "ies\022Q\n\nReadycheck\022\026.google.protobuf.Empt" + + "y\032\026.google.protobuf.Empty\"\023\202\323\344\223\002\r\022\013/read" + + "ycheck\022j\n\020UpdateProperties\022#.satori.api." + + "UpdatePropertiesRequest\032\026.google.protobu" + + "f.Empty\"\031\202\323\344\223\002\023\032\016/v1/properties:\001*\022l\n\016Ge" + + "tMessageList\022!.satori.api.GetMessageList" + + "Request\032\".satori.api.GetMessageListRespo" + + "nse\"\023\202\323\344\223\002\r\022\013/v1/message\022f\n\rUpdateMessag" + + "e\022 .satori.api.UpdateMessageRequest\032\026.go" + + "ogle.protobuf.Empty\"\033\202\323\344\223\002\025\032\020/v1/message" + + "/{id}:\001*\022c\n\rDeleteMessage\022 .satori.api.D" + + "eleteMessageRequest\032\026.google.protobuf.Em" + + "pty\"\030\202\323\344\223\002\022*\020/v1/message/{id}B\330\002\n\031com.he" + + "roiclabs.satori.apiB\013SatoriProtoP\001Z gith" + + "ub.com/heroiclabs/satori/api\242\002\003SAX\252\002\nSat" + + "ori.Api\312\002\nSatori\\Api\342\002\026Satori\\Api\\GPBMet" + + "adata\352\002\013Satori::Api\222A\301\001\022U\n\021Satori Server" + + " API\";\n\013Heroic Labs\022\026https://heroiclabs." + + "com\032\024hello@heroiclabs.com2\0031.0\032\016127.0.0." + + "1:7450*\001\0012\020application/json:\020application" + + "/jsonZ \n\017\n\tBasicAuth\022\002\010\001\n\r\n\tBearerJwt\022\000b" + + "\017\n\r\n\tBearerJwt\022\000b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + }); + internal_static_satori_api_AuthenticateLogoutRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_satori_api_AuthenticateLogoutRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_AuthenticateLogoutRequest_descriptor, + new java.lang.String[] { "Token", "RefreshToken", }); + internal_static_satori_api_AuthenticateRefreshRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_satori_api_AuthenticateRefreshRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_AuthenticateRefreshRequest_descriptor, + new java.lang.String[] { "RefreshToken", }); + internal_static_satori_api_AuthenticateRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_satori_api_AuthenticateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_AuthenticateRequest_descriptor, + new java.lang.String[] { "Id", "Default", "Custom", }); + internal_static_satori_api_AuthenticateRequest_DefaultEntry_descriptor = + internal_static_satori_api_AuthenticateRequest_descriptor.getNestedTypes().get(0); + internal_static_satori_api_AuthenticateRequest_DefaultEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_AuthenticateRequest_DefaultEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_AuthenticateRequest_CustomEntry_descriptor = + internal_static_satori_api_AuthenticateRequest_descriptor.getNestedTypes().get(1); + internal_static_satori_api_AuthenticateRequest_CustomEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_AuthenticateRequest_CustomEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_Event_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_satori_api_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Event_descriptor, + new java.lang.String[] { "Name", "Id", "Metadata", "Value", "Timestamp", }); + internal_static_satori_api_Event_MetadataEntry_descriptor = + internal_static_satori_api_Event_descriptor.getNestedTypes().get(0); + internal_static_satori_api_Event_MetadataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Event_MetadataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_EventRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_satori_api_EventRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_EventRequest_descriptor, + new java.lang.String[] { "Events", }); + internal_static_satori_api_Experiment_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_satori_api_Experiment_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Experiment_descriptor, + new java.lang.String[] { "Name", "Value", }); + internal_static_satori_api_ExperimentList_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_satori_api_ExperimentList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_ExperimentList_descriptor, + new java.lang.String[] { "Experiments", }); + internal_static_satori_api_Flag_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_satori_api_Flag_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Flag_descriptor, + new java.lang.String[] { "Name", "Value", "ConditionChanged", }); + internal_static_satori_api_FlagList_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_satori_api_FlagList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_FlagList_descriptor, + new java.lang.String[] { "Flags", }); + internal_static_satori_api_GetExperimentsRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_satori_api_GetExperimentsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_GetExperimentsRequest_descriptor, + new java.lang.String[] { "Names", }); + internal_static_satori_api_GetFlagsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_satori_api_GetFlagsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_GetFlagsRequest_descriptor, + new java.lang.String[] { "Names", }); + internal_static_satori_api_GetLiveEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_satori_api_GetLiveEventsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_GetLiveEventsRequest_descriptor, + new java.lang.String[] { "Names", }); + internal_static_satori_api_IdentifyRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_satori_api_IdentifyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_IdentifyRequest_descriptor, + new java.lang.String[] { "Id", "Default", "Custom", }); + internal_static_satori_api_IdentifyRequest_DefaultEntry_descriptor = + internal_static_satori_api_IdentifyRequest_descriptor.getNestedTypes().get(0); + internal_static_satori_api_IdentifyRequest_DefaultEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_IdentifyRequest_DefaultEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_IdentifyRequest_CustomEntry_descriptor = + internal_static_satori_api_IdentifyRequest_descriptor.getNestedTypes().get(1); + internal_static_satori_api_IdentifyRequest_CustomEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_IdentifyRequest_CustomEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_LiveEvent_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_satori_api_LiveEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_LiveEvent_descriptor, + new java.lang.String[] { "Name", "Description", "Value", "ActiveStartTimeSec", "ActiveEndTimeSec", "Id", "StartTimeSec", "EndTimeSec", "DurationSec", "ResetCron", }); + internal_static_satori_api_LiveEventList_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_satori_api_LiveEventList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_LiveEventList_descriptor, + new java.lang.String[] { "LiveEvents", }); + internal_static_satori_api_Properties_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_satori_api_Properties_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Properties_descriptor, + new java.lang.String[] { "Default", "Computed", "Custom", }); + internal_static_satori_api_Properties_DefaultEntry_descriptor = + internal_static_satori_api_Properties_descriptor.getNestedTypes().get(0); + internal_static_satori_api_Properties_DefaultEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Properties_DefaultEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_Properties_ComputedEntry_descriptor = + internal_static_satori_api_Properties_descriptor.getNestedTypes().get(1); + internal_static_satori_api_Properties_ComputedEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Properties_ComputedEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_Properties_CustomEntry_descriptor = + internal_static_satori_api_Properties_descriptor.getNestedTypes().get(2); + internal_static_satori_api_Properties_CustomEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Properties_CustomEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_Session_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_satori_api_Session_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Session_descriptor, + new java.lang.String[] { "Token", "RefreshToken", "Properties", }); + internal_static_satori_api_UpdatePropertiesRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_satori_api_UpdatePropertiesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_UpdatePropertiesRequest_descriptor, + new java.lang.String[] { "Default", "Custom", "Recompute", }); + internal_static_satori_api_UpdatePropertiesRequest_DefaultEntry_descriptor = + internal_static_satori_api_UpdatePropertiesRequest_descriptor.getNestedTypes().get(0); + internal_static_satori_api_UpdatePropertiesRequest_DefaultEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_UpdatePropertiesRequest_DefaultEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_UpdatePropertiesRequest_CustomEntry_descriptor = + internal_static_satori_api_UpdatePropertiesRequest_descriptor.getNestedTypes().get(1); + internal_static_satori_api_UpdatePropertiesRequest_CustomEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_UpdatePropertiesRequest_CustomEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_GetMessageListRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_satori_api_GetMessageListRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_GetMessageListRequest_descriptor, + new java.lang.String[] { "Limit", "Forward", "Cursor", }); + internal_static_satori_api_GetMessageListResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_satori_api_GetMessageListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_GetMessageListResponse_descriptor, + new java.lang.String[] { "Messages", "NextCursor", "PrevCursor", "CacheableCursor", }); + internal_static_satori_api_Message_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_satori_api_Message_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Message_descriptor, + new java.lang.String[] { "ScheduleId", "SendTime", "Metadata", "CreateTime", "UpdateTime", "ReadTime", "ConsumeTime", "Text", "Id", "Title", "ImageUrl", }); + internal_static_satori_api_Message_MetadataEntry_descriptor = + internal_static_satori_api_Message_descriptor.getNestedTypes().get(0); + internal_static_satori_api_Message_MetadataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_Message_MetadataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_satori_api_UpdateMessageRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_satori_api_UpdateMessageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_UpdateMessageRequest_descriptor, + new java.lang.String[] { "Id", "ReadTime", "ConsumeTime", }); + internal_static_satori_api_DeleteMessageRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_satori_api_DeleteMessageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_satori_api_DeleteMessageRequest_descriptor, + new java.lang.String[] { "Id", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Operation); + registry.add(com.grpc.gateway.protoc_gen_openapiv2.options.AnnotationsProto.openapiv2Swagger); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/heroiclabs/satori/api/Session.java b/src/main/java/com/heroiclabs/satori/api/Session.java new file mode 100644 index 00000000..9a295502 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/Session.java @@ -0,0 +1,942 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * A session.
+ * 
+ * + * Protobuf type {@code satori.api.Session} + */ +public final class Session extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.Session) + SessionOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + Session.class.getName()); + } + // Use Session.newBuilder() to construct. + private Session(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Session() { + token_ = ""; + refreshToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Session_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Session_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Session.class, com.heroiclabs.satori.api.Session.Builder.class); + } + + private int bitField0_; + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + *
+   * Token credential.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + *
+   * Token credential.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFRESH_TOKEN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object refreshToken_ = ""; + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + @java.lang.Override + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } + } + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTIES_FIELD_NUMBER = 3; + private com.heroiclabs.satori.api.Properties properties_; + /** + *
+   * Properties associated with this identity.
+   * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + * @return Whether the properties field is set. + */ + @java.lang.Override + public boolean hasProperties() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Properties associated with this identity.
+   * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + * @return The properties. + */ + @java.lang.Override + public com.heroiclabs.satori.api.Properties getProperties() { + return properties_ == null ? com.heroiclabs.satori.api.Properties.getDefaultInstance() : properties_; + } + /** + *
+   * Properties associated with this identity.
+   * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + @java.lang.Override + public com.heroiclabs.satori.api.PropertiesOrBuilder getPropertiesOrBuilder() { + return properties_ == null ? com.heroiclabs.satori.api.Properties.getDefaultInstance() : properties_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, refreshToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getProperties()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, refreshToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getProperties()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.Session)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.Session other = (com.heroiclabs.satori.api.Session) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!getRefreshToken() + .equals(other.getRefreshToken())) return false; + if (hasProperties() != other.hasProperties()) return false; + if (hasProperties()) { + if (!getProperties() + .equals(other.getProperties())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (37 * hash) + REFRESH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getRefreshToken().hashCode(); + if (hasProperties()) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getProperties().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.Session parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Session parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Session parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Session parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Session parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.Session parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.Session parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Session parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.Session parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.Session parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.Session parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.Session parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.Session prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A session.
+   * 
+ * + * Protobuf type {@code satori.api.Session} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.Session) + com.heroiclabs.satori.api.SessionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Session_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Session_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.Session.class, com.heroiclabs.satori.api.Session.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.Session.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPropertiesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + refreshToken_ = ""; + properties_ = null; + if (propertiesBuilder_ != null) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_Session_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Session getDefaultInstanceForType() { + return com.heroiclabs.satori.api.Session.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.Session build() { + com.heroiclabs.satori.api.Session result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Session buildPartial() { + com.heroiclabs.satori.api.Session result = new com.heroiclabs.satori.api.Session(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.Session result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.refreshToken_ = refreshToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.properties_ = propertiesBuilder_ == null + ? properties_ + : propertiesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.Session) { + return mergeFrom((com.heroiclabs.satori.api.Session)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.Session other) { + if (other == com.heroiclabs.satori.api.Session.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRefreshToken().isEmpty()) { + refreshToken_ = other.refreshToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasProperties()) { + mergeProperties(other.getProperties()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + refreshToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + *
+     * Token credential.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token credential.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token credential.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * Token credential.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Token credential.
+     * 
+ * + * string token = 1 [json_name = "token"]; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object refreshToken_ = ""; + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + public java.lang.String getRefreshToken() { + java.lang.Object ref = refreshToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + public com.google.protobuf.ByteString + getRefreshTokenBytes() { + java.lang.Object ref = refreshToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @param value The refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refreshToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return This builder for chaining. + */ + public Builder clearRefreshToken() { + refreshToken_ = getDefaultInstance().getRefreshToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Refresh token.
+     * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @param value The bytes for refreshToken to set. + * @return This builder for chaining. + */ + public Builder setRefreshTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refreshToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.heroiclabs.satori.api.Properties properties_; + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.satori.api.Properties, com.heroiclabs.satori.api.Properties.Builder, com.heroiclabs.satori.api.PropertiesOrBuilder> propertiesBuilder_; + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + * @return Whether the properties field is set. + */ + public boolean hasProperties() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + * @return The properties. + */ + public com.heroiclabs.satori.api.Properties getProperties() { + if (propertiesBuilder_ == null) { + return properties_ == null ? com.heroiclabs.satori.api.Properties.getDefaultInstance() : properties_; + } else { + return propertiesBuilder_.getMessage(); + } + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + public Builder setProperties(com.heroiclabs.satori.api.Properties value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + properties_ = value; + } else { + propertiesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + public Builder setProperties( + com.heroiclabs.satori.api.Properties.Builder builderForValue) { + if (propertiesBuilder_ == null) { + properties_ = builderForValue.build(); + } else { + propertiesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + public Builder mergeProperties(com.heroiclabs.satori.api.Properties value) { + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + properties_ != null && + properties_ != com.heroiclabs.satori.api.Properties.getDefaultInstance()) { + getPropertiesBuilder().mergeFrom(value); + } else { + properties_ = value; + } + } else { + propertiesBuilder_.mergeFrom(value); + } + if (properties_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000004); + properties_ = null; + if (propertiesBuilder_ != null) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + public com.heroiclabs.satori.api.Properties.Builder getPropertiesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPropertiesFieldBuilder().getBuilder(); + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + public com.heroiclabs.satori.api.PropertiesOrBuilder getPropertiesOrBuilder() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilder(); + } else { + return properties_ == null ? + com.heroiclabs.satori.api.Properties.getDefaultInstance() : properties_; + } + } + /** + *
+     * Properties associated with this identity.
+     * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.satori.api.Properties, com.heroiclabs.satori.api.Properties.Builder, com.heroiclabs.satori.api.PropertiesOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.heroiclabs.satori.api.Properties, com.heroiclabs.satori.api.Properties.Builder, com.heroiclabs.satori.api.PropertiesOrBuilder>( + getProperties(), + getParentForChildren(), + isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:satori.api.Session) + } + + // @@protoc_insertion_point(class_scope:satori.api.Session) + private static final com.heroiclabs.satori.api.Session DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.Session(); + } + + public static com.heroiclabs.satori.api.Session getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Session parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.Session getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/SessionOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/SessionOrBuilder.java new file mode 100644 index 00000000..b23c6f6e --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/SessionOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface SessionOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.Session) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Token credential.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The token. + */ + java.lang.String getToken(); + /** + *
+   * Token credential.
+   * 
+ * + * string token = 1 [json_name = "token"]; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The refreshToken. + */ + java.lang.String getRefreshToken(); + /** + *
+   * Refresh token.
+   * 
+ * + * string refresh_token = 2 [json_name = "refreshToken"]; + * @return The bytes for refreshToken. + */ + com.google.protobuf.ByteString + getRefreshTokenBytes(); + + /** + *
+   * Properties associated with this identity.
+   * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + * @return Whether the properties field is set. + */ + boolean hasProperties(); + /** + *
+   * Properties associated with this identity.
+   * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + * @return The properties. + */ + com.heroiclabs.satori.api.Properties getProperties(); + /** + *
+   * Properties associated with this identity.
+   * 
+ * + * .satori.api.Properties properties = 3 [json_name = "properties"]; + */ + com.heroiclabs.satori.api.PropertiesOrBuilder getPropertiesOrBuilder(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/UpdateMessageRequest.java b/src/main/java/com/heroiclabs/satori/api/UpdateMessageRequest.java new file mode 100644 index 00000000..71f0b52c --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/UpdateMessageRequest.java @@ -0,0 +1,703 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * The request to update the status of a message.
+ * 
+ * + * Protobuf type {@code satori.api.UpdateMessageRequest} + */ +public final class UpdateMessageRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.UpdateMessageRequest) + UpdateMessageRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + UpdateMessageRequest.class.getName()); + } + // Use UpdateMessageRequest.newBuilder() to construct. + private UpdateMessageRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UpdateMessageRequest() { + id_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdateMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdateMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.UpdateMessageRequest.class, com.heroiclabs.satori.api.UpdateMessageRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The identifier of the messages.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The identifier of the messages.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_TIME_FIELD_NUMBER = 2; + private long readTime_ = 0L; + /** + *
+   * The time the message was read at the client.
+   * 
+ * + * int64 read_time = 2 [json_name = "readTime"]; + * @return The readTime. + */ + @java.lang.Override + public long getReadTime() { + return readTime_; + } + + public static final int CONSUME_TIME_FIELD_NUMBER = 3; + private long consumeTime_ = 0L; + /** + *
+   * The time the message was consumed by the identity.
+   * 
+ * + * int64 consume_time = 3 [json_name = "consumeTime"]; + * @return The consumeTime. + */ + @java.lang.Override + public long getConsumeTime() { + return consumeTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); + } + if (readTime_ != 0L) { + output.writeInt64(2, readTime_); + } + if (consumeTime_ != 0L) { + output.writeInt64(3, consumeTime_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); + } + if (readTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, readTime_); + } + if (consumeTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, consumeTime_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.UpdateMessageRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.UpdateMessageRequest other = (com.heroiclabs.satori.api.UpdateMessageRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (getReadTime() + != other.getReadTime()) return false; + if (getConsumeTime() + != other.getConsumeTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getReadTime()); + hash = (37 * hash) + CONSUME_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getConsumeTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.UpdateMessageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.UpdateMessageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.UpdateMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.UpdateMessageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request to update the status of a message.
+   * 
+ * + * Protobuf type {@code satori.api.UpdateMessageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.UpdateMessageRequest) + com.heroiclabs.satori.api.UpdateMessageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdateMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdateMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.UpdateMessageRequest.class, com.heroiclabs.satori.api.UpdateMessageRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.UpdateMessageRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + readTime_ = 0L; + consumeTime_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdateMessageRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdateMessageRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.UpdateMessageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdateMessageRequest build() { + com.heroiclabs.satori.api.UpdateMessageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdateMessageRequest buildPartial() { + com.heroiclabs.satori.api.UpdateMessageRequest result = new com.heroiclabs.satori.api.UpdateMessageRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.UpdateMessageRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.readTime_ = readTime_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.consumeTime_ = consumeTime_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.UpdateMessageRequest) { + return mergeFrom((com.heroiclabs.satori.api.UpdateMessageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.UpdateMessageRequest other) { + if (other == com.heroiclabs.satori.api.UpdateMessageRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getReadTime() != 0L) { + setReadTime(other.getReadTime()); + } + if (other.getConsumeTime() != 0L) { + setConsumeTime(other.getConsumeTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + readTime_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + consumeTime_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + *
+     * The identifier of the messages.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The identifier of the messages.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The identifier of the messages.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The identifier of the messages.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The identifier of the messages.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long readTime_ ; + /** + *
+     * The time the message was read at the client.
+     * 
+ * + * int64 read_time = 2 [json_name = "readTime"]; + * @return The readTime. + */ + @java.lang.Override + public long getReadTime() { + return readTime_; + } + /** + *
+     * The time the message was read at the client.
+     * 
+ * + * int64 read_time = 2 [json_name = "readTime"]; + * @param value The readTime to set. + * @return This builder for chaining. + */ + public Builder setReadTime(long value) { + + readTime_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The time the message was read at the client.
+     * 
+ * + * int64 read_time = 2 [json_name = "readTime"]; + * @return This builder for chaining. + */ + public Builder clearReadTime() { + bitField0_ = (bitField0_ & ~0x00000002); + readTime_ = 0L; + onChanged(); + return this; + } + + private long consumeTime_ ; + /** + *
+     * The time the message was consumed by the identity.
+     * 
+ * + * int64 consume_time = 3 [json_name = "consumeTime"]; + * @return The consumeTime. + */ + @java.lang.Override + public long getConsumeTime() { + return consumeTime_; + } + /** + *
+     * The time the message was consumed by the identity.
+     * 
+ * + * int64 consume_time = 3 [json_name = "consumeTime"]; + * @param value The consumeTime to set. + * @return This builder for chaining. + */ + public Builder setConsumeTime(long value) { + + consumeTime_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The time the message was consumed by the identity.
+     * 
+ * + * int64 consume_time = 3 [json_name = "consumeTime"]; + * @return This builder for chaining. + */ + public Builder clearConsumeTime() { + bitField0_ = (bitField0_ & ~0x00000004); + consumeTime_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:satori.api.UpdateMessageRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.UpdateMessageRequest) + private static final com.heroiclabs.satori.api.UpdateMessageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.UpdateMessageRequest(); + } + + public static com.heroiclabs.satori.api.UpdateMessageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMessageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdateMessageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/UpdateMessageRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/UpdateMessageRequestOrBuilder.java new file mode 100644 index 00000000..7496ea0a --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/UpdateMessageRequestOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface UpdateMessageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.UpdateMessageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The identifier of the messages.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The identifier of the messages.
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The time the message was read at the client.
+   * 
+ * + * int64 read_time = 2 [json_name = "readTime"]; + * @return The readTime. + */ + long getReadTime(); + + /** + *
+   * The time the message was consumed by the identity.
+   * 
+ * + * int64 consume_time = 3 [json_name = "consumeTime"]; + * @return The consumeTime. + */ + long getConsumeTime(); +} diff --git a/src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequest.java b/src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequest.java new file mode 100644 index 00000000..16cd982f --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequest.java @@ -0,0 +1,1232 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +/** + *
+ * Update Properties associated with this identity.
+ * 
+ * + * Protobuf type {@code satori.api.UpdatePropertiesRequest} + */ +public final class UpdatePropertiesRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:satori.api.UpdatePropertiesRequest) + UpdatePropertiesRequestOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 2, + /* suffix= */ "", + UpdatePropertiesRequest.class.getName()); + } + // Use UpdatePropertiesRequest.newBuilder() to construct. + private UpdatePropertiesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UpdatePropertiesRequest() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdatePropertiesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetDefault(); + case 2: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdatePropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.UpdatePropertiesRequest.class, com.heroiclabs.satori.api.UpdatePropertiesRequest.Builder.class); + } + + private int bitField0_; + public static final int DEFAULT_FIELD_NUMBER = 1; + private static final class DefaultDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdatePropertiesRequest_DefaultEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CUSTOM_FIELD_NUMBER = 2; + private static final class CustomDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdatePropertiesRequest_CustomEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RECOMPUTE_FIELD_NUMBER = 3; + private com.google.protobuf.BoolValue recompute_; + /** + *
+   * Informs the server to recompute the audience membership of the identity.
+   * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + * @return Whether the recompute field is set. + */ + @java.lang.Override + public boolean hasRecompute() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+   * Informs the server to recompute the audience membership of the identity.
+   * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + * @return The recompute. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getRecompute() { + return recompute_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : recompute_; + } + /** + *
+   * Informs the server to recompute the audience membership of the identity.
+   * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getRecomputeOrBuilder() { + return recompute_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : recompute_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetDefault(), + DefaultDefaultEntryHolder.defaultEntry, + 1); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetCustom(), + CustomDefaultEntryHolder.defaultEntry, + 2); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getRecompute()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetDefault().getMap().entrySet()) { + com.google.protobuf.MapEntry + default__ = DefaultDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, default__); + } + for (java.util.Map.Entry entry + : internalGetCustom().getMap().entrySet()) { + com.google.protobuf.MapEntry + custom__ = CustomDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, custom__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getRecompute()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.heroiclabs.satori.api.UpdatePropertiesRequest)) { + return super.equals(obj); + } + com.heroiclabs.satori.api.UpdatePropertiesRequest other = (com.heroiclabs.satori.api.UpdatePropertiesRequest) obj; + + if (!internalGetDefault().equals( + other.internalGetDefault())) return false; + if (!internalGetCustom().equals( + other.internalGetCustom())) return false; + if (hasRecompute() != other.hasRecompute()) return false; + if (hasRecompute()) { + if (!getRecompute() + .equals(other.getRecompute())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetDefault().getMap().isEmpty()) { + hash = (37 * hash) + DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + internalGetDefault().hashCode(); + } + if (!internalGetCustom().getMap().isEmpty()) { + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + internalGetCustom().hashCode(); + } + if (hasRecompute()) { + hash = (37 * hash) + RECOMPUTE_FIELD_NUMBER; + hash = (53 * hash) + getRecompute().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.heroiclabs.satori.api.UpdatePropertiesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.heroiclabs.satori.api.UpdatePropertiesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Update Properties associated with this identity.
+   * 
+ * + * Protobuf type {@code satori.api.UpdatePropertiesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:satori.api.UpdatePropertiesRequest) + com.heroiclabs.satori.api.UpdatePropertiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdatePropertiesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetDefault(); + case 2: + return internalGetCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableDefault(); + case 2: + return internalGetMutableCustom(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdatePropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.heroiclabs.satori.api.UpdatePropertiesRequest.class, com.heroiclabs.satori.api.UpdatePropertiesRequest.Builder.class); + } + + // Construct using com.heroiclabs.satori.api.UpdatePropertiesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getRecomputeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableDefault().clear(); + internalGetMutableCustom().clear(); + recompute_ = null; + if (recomputeBuilder_ != null) { + recomputeBuilder_.dispose(); + recomputeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.heroiclabs.satori.api.SatoriProto.internal_static_satori_api_UpdatePropertiesRequest_descriptor; + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdatePropertiesRequest getDefaultInstanceForType() { + return com.heroiclabs.satori.api.UpdatePropertiesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdatePropertiesRequest build() { + com.heroiclabs.satori.api.UpdatePropertiesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdatePropertiesRequest buildPartial() { + com.heroiclabs.satori.api.UpdatePropertiesRequest result = new com.heroiclabs.satori.api.UpdatePropertiesRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.heroiclabs.satori.api.UpdatePropertiesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.default_ = internalGetDefault(); + result.default_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.custom_ = internalGetCustom(); + result.custom_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.recompute_ = recomputeBuilder_ == null + ? recompute_ + : recomputeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.heroiclabs.satori.api.UpdatePropertiesRequest) { + return mergeFrom((com.heroiclabs.satori.api.UpdatePropertiesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.heroiclabs.satori.api.UpdatePropertiesRequest other) { + if (other == com.heroiclabs.satori.api.UpdatePropertiesRequest.getDefaultInstance()) return this; + internalGetMutableDefault().mergeFrom( + other.internalGetDefault()); + bitField0_ |= 0x00000001; + internalGetMutableCustom().mergeFrom( + other.internalGetCustom()); + bitField0_ |= 0x00000002; + if (other.hasRecompute()) { + mergeRecompute(other.getRecompute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + default__ = input.readMessage( + DefaultDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableDefault().getMutableMap().put( + default__.getKey(), default__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + custom__ = input.readMessage( + CustomDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableCustom().getMutableMap().put( + custom__.getKey(), custom__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getRecomputeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> default_; + private com.google.protobuf.MapField + internalGetDefault() { + if (default_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + return default_; + } + private com.google.protobuf.MapField + internalGetMutableDefault() { + if (default_ == null) { + default_ = com.google.protobuf.MapField.newMapField( + DefaultDefaultEntryHolder.defaultEntry); + } + if (!default_.isMutable()) { + default_ = default_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return default_; + } + public int getDefaultCount() { + return internalGetDefault().getMap().size(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public boolean containsDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetDefault().getMap().containsKey(key); + } + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDefault() { + return getDefaultMap(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.util.Map getDefaultMap() { + return internalGetDefault().getMap(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + @java.lang.Override + public java.lang.String getDefaultOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetDefault().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearDefault() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableDefault().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + public Builder removeDefault( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableDefault().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableDefault() { + bitField0_ |= 0x00000001; + return internalGetMutableDefault().getMutableMap(); + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + public Builder putDefault( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableDefault().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + *
+     * Event default properties.
+     * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + public Builder putAllDefault( + java.util.Map values) { + internalGetMutableDefault().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> custom_; + private com.google.protobuf.MapField + internalGetCustom() { + if (custom_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CustomDefaultEntryHolder.defaultEntry); + } + return custom_; + } + private com.google.protobuf.MapField + internalGetMutableCustom() { + if (custom_ == null) { + custom_ = com.google.protobuf.MapField.newMapField( + CustomDefaultEntryHolder.defaultEntry); + } + if (!custom_.isMutable()) { + custom_ = custom_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return custom_; + } + public int getCustomCount() { + return internalGetCustom().getMap().size(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public boolean containsCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetCustom().getMap().containsKey(key); + } + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCustom() { + return getCustomMap(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public java.util.Map getCustomMap() { + return internalGetCustom().getMap(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + @java.lang.Override + public java.lang.String getCustomOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetCustom().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearCustom() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableCustom().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + public Builder removeCustom( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableCustom().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCustom() { + bitField0_ |= 0x00000002; + return internalGetMutableCustom().getMutableMap(); + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + public Builder putCustom( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableCustom().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + *
+     * Event custom properties.
+     * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + public Builder putAllCustom( + java.util.Map values) { + internalGetMutableCustom().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.BoolValue recompute_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> recomputeBuilder_; + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + * @return Whether the recompute field is set. + */ + public boolean hasRecompute() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + * @return The recompute. + */ + public com.google.protobuf.BoolValue getRecompute() { + if (recomputeBuilder_ == null) { + return recompute_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : recompute_; + } else { + return recomputeBuilder_.getMessage(); + } + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + public Builder setRecompute(com.google.protobuf.BoolValue value) { + if (recomputeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recompute_ = value; + } else { + recomputeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + public Builder setRecompute( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (recomputeBuilder_ == null) { + recompute_ = builderForValue.build(); + } else { + recomputeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + public Builder mergeRecompute(com.google.protobuf.BoolValue value) { + if (recomputeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + recompute_ != null && + recompute_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getRecomputeBuilder().mergeFrom(value); + } else { + recompute_ = value; + } + } else { + recomputeBuilder_.mergeFrom(value); + } + if (recompute_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + public Builder clearRecompute() { + bitField0_ = (bitField0_ & ~0x00000004); + recompute_ = null; + if (recomputeBuilder_ != null) { + recomputeBuilder_.dispose(); + recomputeBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + public com.google.protobuf.BoolValue.Builder getRecomputeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRecomputeFieldBuilder().getBuilder(); + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + public com.google.protobuf.BoolValueOrBuilder getRecomputeOrBuilder() { + if (recomputeBuilder_ != null) { + return recomputeBuilder_.getMessageOrBuilder(); + } else { + return recompute_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : recompute_; + } + } + /** + *
+     * Informs the server to recompute the audience membership of the identity.
+     * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getRecomputeFieldBuilder() { + if (recomputeBuilder_ == null) { + recomputeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getRecompute(), + getParentForChildren(), + isClean()); + recompute_ = null; + } + return recomputeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:satori.api.UpdatePropertiesRequest) + } + + // @@protoc_insertion_point(class_scope:satori.api.UpdatePropertiesRequest) + private static final com.heroiclabs.satori.api.UpdatePropertiesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.heroiclabs.satori.api.UpdatePropertiesRequest(); + } + + public static com.heroiclabs.satori.api.UpdatePropertiesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePropertiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.heroiclabs.satori.api.UpdatePropertiesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequestOrBuilder.java b/src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequestOrBuilder.java new file mode 100644 index 00000000..53150992 --- /dev/null +++ b/src/main/java/com/heroiclabs/satori/api/UpdatePropertiesRequestOrBuilder.java @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: github.com/heroiclabs/satori/api/satori.proto +// Protobuf Java Version: 4.28.2 + +package com.heroiclabs.satori.api; + +public interface UpdatePropertiesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:satori.api.UpdatePropertiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + int getDefaultCount(); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + boolean containsDefault( + java.lang.String key); + /** + * Use {@link #getDefaultMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getDefault(); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + java.util.Map + getDefaultMap(); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + /* nullable */ +java.lang.String getDefaultOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Event default properties.
+   * 
+ * + * map<string, string> default = 1 [json_name = "default"]; + */ + java.lang.String getDefaultOrThrow( + java.lang.String key); + + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + int getCustomCount(); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + boolean containsCustom( + java.lang.String key); + /** + * Use {@link #getCustomMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCustom(); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + java.util.Map + getCustomMap(); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + /* nullable */ +java.lang.String getCustomOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Event custom properties.
+   * 
+ * + * map<string, string> custom = 2 [json_name = "custom"]; + */ + java.lang.String getCustomOrThrow( + java.lang.String key); + + /** + *
+   * Informs the server to recompute the audience membership of the identity.
+   * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + * @return Whether the recompute field is set. + */ + boolean hasRecompute(); + /** + *
+   * Informs the server to recompute the audience membership of the identity.
+   * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + * @return The recompute. + */ + com.google.protobuf.BoolValue getRecompute(); + /** + *
+   * Informs the server to recompute the audience membership of the identity.
+   * 
+ * + * .google.protobuf.BoolValue recompute = 3 [json_name = "recompute"]; + */ + com.google.protobuf.BoolValueOrBuilder getRecomputeOrBuilder(); +}