├── LineJava.iml ├── META-INF └── MANIFEST.MF ├── README.md ├── ScreenShots ├── ScreenShot_2018-01-30_14-27-18-01.jpeg ├── ScreenShot_2018-01-30_14-30-20.png └── ScreenShot_2018-01-30_14-30-36.png ├── pom.xml └── src └── main ├── java ├── AccountMigrationCheckType.java ├── AccountMigrationPincodeType.java ├── AccountSupervisorService.java ├── AgeCheckDocomoResult.java ├── AgeCheckRequestResult.java ├── AgeCheckService.java ├── Announcement.java ├── ApplicationType.java ├── ApproveSquareMembersRequest.java ├── ApproveSquareMembersResponse.java ├── ApprovedChannelInfo.java ├── ApprovedChannelInfos.java ├── AsymmetricKeyAlgorithm.java ├── AuthQrcode.java ├── BooleanState.java ├── BotType.java ├── BuddyBanner.java ├── BuddyBannerLinkType.java ├── BuddyDetail.java ├── BuddyList.java ├── BuddyManagementService.java ├── BuddyMessageRequest.java ├── BuddyOnAir.java ├── BuddyOnAirLabel.java ├── BuddyOnAirType.java ├── BuddyOnAirUrls.java ├── BuddyProfile.java ├── BuddyResultState.java ├── BuddySearchRequestSource.java ├── BuddySearchResult.java ├── BuddyService.java ├── CallHost.java ├── CarrierCode.java ├── Category.java ├── ChannelApplicationProvidedService.java ├── ChannelConfiguration.java ├── ChannelDomain.java ├── ChannelDomains.java ├── ChannelErrorCode.java ├── ChannelException.java ├── ChannelFeatureLicense.java ├── ChannelInfo.java ├── ChannelInfos.java ├── ChannelNotificationSetting.java ├── ChannelPermission.java ├── ChannelProvider.java ├── ChannelService.java ├── ChannelSyncDatas.java ├── ChannelSyncType.java ├── ChannelToken.java ├── Coin.java ├── CoinHistory.java ├── CoinHistoryCondition.java ├── CoinHistoryResult.java ├── CoinPayLoad.java ├── CoinProductItem.java ├── CoinPurchaseConfirm.java ├── CoinPurchaseReservation.java ├── CoinUseReservation.java ├── CoinUseReservationItem.java ├── CompactContact.java ├── Contact.java ├── ContactAttribute.java ├── ContactCategory.java ├── ContactModification.java ├── ContactRegistration.java ├── ContactRelation.java ├── ContactReport.java ├── ContactReportResult.java ├── ContactSetting.java ├── ContactStatus.java ├── ContactType.java ├── ContentType.java ├── CreateSquareChatRequest.java ├── CreateSquareChatResponse.java ├── CreateSquareRequest.java ├── CreateSquareResponse.java ├── CustomMode.java ├── DeleteSquareChatRequest.java ├── DeleteSquareChatResponse.java ├── DeleteSquareRequest.java ├── DeleteSquareResponse.java ├── DestroyMessageRequest.java ├── DestroyMessageResponse.java ├── DeviceInfo.java ├── Diff.java ├── EmailConfirmation.java ├── EmailConfirmationSession.java ├── EmailConfirmationStatus.java ├── EmailConfirmationType.java ├── ErrorCode.java ├── ErrorExtraInfo.java ├── FeatureType.java ├── FetchDirection.java ├── FindSquareByInvitationTicketRequest.java ├── FindSquareByInvitationTicketResponse.java ├── FriendChannelMatricesResponse.java ├── FriendChannelMatrix.java ├── FriendRequestStatus.java ├── Geolocation.java ├── GlobalEvent.java ├── Group.java ├── GroupAttribute.java ├── GroupCall.java ├── GroupCallRoute.java ├── GroupPreference.java ├── IdentityCredential.java ├── IdentityProvider.java ├── LINEClient.java ├── LastReadMessageId.java ├── LastReadMessageIds.java ├── Location.java ├── LoginResult.java ├── LoginResultType.java ├── LoginSession.java ├── LoginType.java ├── MIDType.java ├── Main.java ├── MediaType.java ├── Message.java ├── MessageOperation.java ├── MessageOperationType.java ├── MessageOperations.java ├── MessageRelationType.java ├── MessageService.java ├── MetaProfile.java ├── ModificationType.java ├── NotificationFetchResult.java ├── NotificationItem.java ├── NotificationItemFetchMode.java ├── NotificationQueueType.java ├── NotificationStatus.java ├── NotificationTarget.java ├── NotificationType.java ├── OpStatus.java ├── OpType.java ├── Operation.java ├── PayloadType.java ├── PaymentPgType.java ├── PaymentReservation.java ├── PaymentReservationResult.java ├── PaymentType.java ├── PreconditionFailedExtraInfo.java ├── Product.java ├── ProductBannerLinkType.java ├── ProductEventType.java ├── ProductList.java ├── ProductSimple.java ├── ProductSimpleList.java ├── Profile.java ├── ProfileAttribute.java ├── ProximityMatchCandidateResult.java ├── PublicType.java ├── RSAKey.java ├── RedirectType.java ├── RegisterWithSnsIdResult.java ├── RegistrationType.java ├── ReportCategory.java ├── RequestTokenResponse.java ├── Room.java ├── SQErrorCode.java ├── SecurityCenterSettingsType.java ├── SendBuddyMessageResult.java ├── ServiceCode.java ├── SetBuddyOnAirResult.java ├── Settings.java ├── SettingsAttribute.java ├── SettingsAttributeEx.java ├── ShopService.java ├── SimpleChannelClient.java ├── SimpleChannelContact.java ├── SnsAdaptorService.java ├── SnsFriend.java ├── SnsFriendContactRegistration.java ├── SnsFriendModification.java ├── SnsFriends.java ├── SnsIdType.java ├── SnsIdUserStatus.java ├── SnsProfile.java ├── SpammerReason.java ├── Square.java ├── SquareAuthority.java ├── SquareChat.java ├── SquareChatMember.java ├── SquareChatMembershipState.java ├── SquareChatState.java ├── SquareChatStatus.java ├── SquareChatStatusWithoutMessage.java ├── SquareChatType.java ├── SquareEvent.java ├── SquareEventNotificationJoinRequest.java ├── SquareEventNotificationMemberUpdate.java ├── SquareEventNotificationMessage.java ├── SquareEventNotificationSquareChatDelete.java ├── SquareEventNotificationSquareDelete.java ├── SquareEventNotifiedCreateSquareChatMember.java ├── SquareEventNotifiedCreateSquareMember.java ├── SquareEventNotifiedDeleteSquareChat.java ├── SquareEventNotifiedDestroyMessage.java ├── SquareEventNotifiedInviteIntoSquareChat.java ├── SquareEventNotifiedJoinSquareChat.java ├── SquareEventNotifiedKickoutFromSquare.java ├── SquareEventNotifiedLeaveSquareChat.java ├── SquareEventNotifiedMarkAsRead.java ├── SquareEventNotifiedShutdownSquare.java ├── SquareEventNotifiedUpdateSquare.java ├── SquareEventNotifiedUpdateSquareAuthority.java ├── SquareEventNotifiedUpdateSquareChat.java ├── SquareEventNotifiedUpdateSquareChatMember.java ├── SquareEventNotifiedUpdateSquareChatProfileImage.java ├── SquareEventNotifiedUpdateSquareChatProfileName.java ├── SquareEventNotifiedUpdateSquareChatStatus.java ├── SquareEventNotifiedUpdateSquareFeatureSet.java ├── SquareEventNotifiedUpdateSquareMember.java ├── SquareEventNotifiedUpdateSquareMemberProfile.java ├── SquareEventNotifiedUpdateSquareMemberRelation.java ├── SquareEventNotifiedUpdateSquareStatus.java ├── SquareEventPayload.java ├── SquareEventReceiveMessage.java ├── SquareEventSendMessage.java ├── SquareEventStatus.java ├── SquareEventType.java ├── SquareException.java ├── SquareFeature.java ├── SquareFeatureControlState.java ├── SquareFeatureSet.java ├── SquareMember.java ├── SquareMemberRelation.java ├── SquareMemberRelationState.java ├── SquareMemberRole.java ├── SquareMembershipState.java ├── SquareMessage.java ├── SquarePreference.java ├── SquareService.java ├── SquareStatus.java ├── SquareType.java ├── StickerResourceType.java ├── SubscriptionState.java ├── SyncActionType.java ├── SyncCategory.java ├── SyncTriggerReason.java ├── SystemConfiguration.java ├── TMessageBox.java ├── TMessageBoxStatus.java ├── TMessageBoxWrapUp.java ├── TMessageBoxWrapUpResponse.java ├── TalkException.java ├── TalkService.java ├── Ticket.java ├── UniversalNotificationService.java ├── UniversalNotificationServiceErrorCode.java ├── UniversalNotificationServiceException.java ├── UnregistrationReason.java ├── UpdateBuddyProfileResult.java ├── UserAgeType.java ├── UserAuthStatus.java ├── VerificationMethod.java ├── VerificationResult.java ├── VerificationSessionData.java ├── WapInvitation.java ├── WapInvitationType.java ├── loginRequest.java └── org │ └── json │ ├── .gitignore │ ├── CDL.java │ ├── Cookie.java │ ├── CookieList.java │ ├── HTTP.java │ ├── HTTPTokener.java │ ├── JSONArray.java │ ├── JSONException.java │ ├── JSONML.java │ ├── JSONObject.java │ ├── JSONPointer.java │ ├── JSONPointerException.java │ ├── JSONString.java │ ├── JSONStringer.java │ ├── JSONTokener.java │ ├── JSONWriter.java │ ├── LICENSE │ ├── Property.java │ ├── README │ ├── XML.java │ └── XMLTokener.java └── resources ├── en.json └── ja.json /LineJava.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Main-Class: Main 2 | Manifest-Version: 1.0 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LineJava 2 | Naver's line API for Java 3 | 4 | これらの作成にはLINE Corporationは一切関連しておりません 5 | 6 | For PC Intellij IDEA (https://www.jetbrains.com/idea/download) 7 | 8 | 9 | A : How use in VPS? 10 | 11 | 12 | B : 13 | 14 | sudo apt-get install python-software-properties 15 | 16 | 17 | sudo add-apt-repository ppa:webupd8team/java 18 | 19 | 20 | sudo apt-get update 21 | 22 | 23 | sudo apt-get install openjdk-7-jdk 24 | 25 | 26 | java -version 27 | 28 | 29 | Then, cd to Examples->, java -jar line.jar 30 | 31 | # 概要 32 | Line API for JavaはPythonより高速なLineのBotの作成を可能にします 33 | 34 | # 使い方 35 | Main.javaを編集します 36 | 37 | ここにあるのはあくまで一例です 38 | 39 | ``` 40 | // LINEClientの作成 41 | LINEClient client = new LINEClient("authtoken"); 42 | //To send text msg 43 | client.sendText("to", "message"); 44 | //テキスト送信にも使用可能だが、より高度なメッセージの送信に使う 45 | client.sendMessage(new Message().setTo("to").setText("message")); 46 | //Mention 47 | ArrayList list = new ArrayList<>(); 48 | list.add(mid); 49 | list.add(mid); 50 | client.sendMessageWithMention(op.message.to,"message",list,"\n"); 51 | //or... 52 | client.sendMessageWithMention(op.message.to,"message",list); 53 | ``` 54 | 55 | LINEClient.java内にある関数が利用可能です 56 | 57 | 詳しくはそちらをご覧ください 58 | 59 | Javaで動くものなら組み込めるのでMCBE ServerのNUkkitやJupiterにも組み込めるよ! 60 | 61 | 62 | # ビルド 63 | これは[Intellij IDEA](https://www.jetbrains.com/idea/download)を使うことを前提とされています 64 | 65 | お使いのPCにインストールされてない場合はインストールしてください 66 | 67 | まず、このプロジェクトをダウンロードしてください 68 | 69 | それから、ideaで開いてください 70 | 71 | ideaで開くと.ideaというフォルダーが作成されます。 72 | 73 | そのフォルダーを開いてarfifactsという名前のフォルダーを作成してください 74 | 75 | そのフィルダーの中に下のコードをline.xmlを作成して貼り付けてください 76 | 77 | ``` 78 | 79 | 80 | $PROJECT_DIR$/out/artifacts/line 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | ``` 98 | 99 | それからBuild > Build Arfifactsを選択してビルドします 100 | 101 | それからJarが出力されたパスにcdして、java -jar line.jarをすればLogin用のURLが形成されます 102 | 103 | このURLをスマホ版LINEで踏んでログインすればauthtokenを取得できます 104 | 105 | authtokenの情報はご自身で大切に保管してください(authtokenは漏らさないように) 106 | 107 | 二度目以降はjava -jar line.jar authtokenとするとまたリンクを踏む必要がなくなります 108 | 109 | ![Build Without Run Config](https://raw.githubusercontent.com/kaoru-nishida/LineJava/master/ScreenShots/ScreenShot_2018-01-30_14-27-18-01.jpeg) 110 | 111 | Run/Debug設定を設定するとより簡単に実行できるようになります 112 | 113 | ![Run/Debug Config](https://raw.githubusercontent.com/kaoru-nishida/LineJava/master/ScreenShots/ScreenShot_2018-01-30_14-30-36.png) 114 | 115 | このように設定して上部バーの実行ボタンの横でLINEを選択すると実行ボタンを押すだけで実行できるようなります 116 | 117 | ![Run With Eun Config](https://raw.githubusercontent.com/kaoru-nishida/LineJava/master/ScreenShots/ScreenShot_2018-01-30_14-30-20.png) -------------------------------------------------------------------------------- /ScreenShots/ScreenShot_2018-01-30_14-27-18-01.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomo0611/LineJava/79bcde7f1a96f9876d21ebfe05c8d720abee6927/ScreenShots/ScreenShot_2018-01-30_14-27-18-01.jpeg -------------------------------------------------------------------------------- /ScreenShots/ScreenShot_2018-01-30_14-30-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomo0611/LineJava/79bcde7f1a96f9876d21ebfe05c8d720abee6927/ScreenShots/ScreenShot_2018-01-30_14-30-20.png -------------------------------------------------------------------------------- /ScreenShots/ScreenShot_2018-01-30_14-30-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tomo0611/LineJava/79bcde7f1a96f9876d21ebfe05c8d720abee6927/ScreenShots/ScreenShot_2018-01-30_14-30-36.png -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | LineJava 8 | LineJava 9 | 1.0-SNAPSHOT 10 | 11 | http://maven.apache.org 12 | 13 | 14 | 15 | org.apache.maven.plugins 16 | maven-compiler-plugin 17 | 2.3.2 18 | 19 | 1.8 20 | 1.8 21 | 22 | 23 | 24 | org.codehaus.mojo 25 | exec-maven-plugin 26 | 1.2.1 27 | 28 | 29 | 30 | 31 | UTF-8 32 | 33 | 34 | 35 | 36 | commons-lang 37 | commons-lang 38 | 2.5 39 | 40 | 41 | commons-codec 42 | commons-codec 43 | 1.9 44 | 45 | 46 | commons-logging 47 | commons-logging 48 | 1.2 49 | 50 | 51 | org.apache.httpcomponents 52 | httpclient 53 | 4.4.1 54 | 55 | 56 | org.apache.httpcomponents 57 | httpcore 58 | 4.4.1 59 | 60 | 61 | org.apache.thrift 62 | libthrift 63 | 0.9.1 64 | 65 | 66 | org.slf4j 67 | slf4j-api 68 | 1.7.12 69 | 70 | 71 | 72 | org.slf4j 73 | slf4j-simple 74 | 1.5.8 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/main/java/AccountMigrationCheckType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum AccountMigrationCheckType implements org.apache.thrift.TEnum { 13 | SKIP(0), 14 | PINCODE(1), 15 | SECURITY_CENTER(2); 16 | 17 | private final int value; 18 | 19 | private AccountMigrationCheckType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static AccountMigrationCheckType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return SKIP; 38 | case 1: 39 | return PINCODE; 40 | case 2: 41 | return SECURITY_CENTER; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/AccountMigrationPincodeType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum AccountMigrationPincodeType implements org.apache.thrift.TEnum { 13 | NOT_APPLICABLE(0), 14 | NOT_SET(1), 15 | SET(2), 16 | NEED_ENFORCED_INPUT(3); 17 | 18 | private final int value; 19 | 20 | private AccountMigrationPincodeType(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static AccountMigrationPincodeType findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return NOT_APPLICABLE; 39 | case 1: 40 | return NOT_SET; 41 | case 2: 42 | return SET; 43 | case 3: 44 | return NEED_ENFORCED_INPUT; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/ApplicationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ApplicationType implements org.apache.thrift.TEnum { 13 | IOS(16), 14 | IOS_RC(17), 15 | IOS_BETA(18), 16 | IOS_ALPHA(19), 17 | ANDROID(32), 18 | ANDROID_RC(33), 19 | ANDROID_BETA(34), 20 | ANDROID_ALPHA(35), 21 | WAP(48), 22 | WAP_RC(49), 23 | WAP_BETA(50), 24 | WAP_ALPHA(51), 25 | BOT(64), 26 | BOT_RC(65), 27 | BOT_BETA(66), 28 | BOT_ALPHA(67), 29 | WEB(80), 30 | WEB_RC(81), 31 | WEB_BETA(82), 32 | WEB_ALPHA(83), 33 | DESKTOPWIN(96), 34 | DESKTOPWIN_RC(97), 35 | DESKTOPWIN_BETA(98), 36 | DESKTOPWIN_ALPHA(99), 37 | DESKTOPMAC(112), 38 | DESKTOPMAC_RC(113), 39 | DESKTOPMAC_BETA(114), 40 | DESKTOPMAC_ALPHA(115), 41 | CHANNELGW(128), 42 | CHANNELGW_RC(129), 43 | CHANNELGW_BETA(130), 44 | CHANNELGW_ALPHA(131), 45 | CHANNELCP(144), 46 | CHANNELCP_RC(145), 47 | CHANNELCP_BETA(146), 48 | CHANNELCP_ALPHA(147), 49 | WINPHONE(160), 50 | WINPHONE_RC(161), 51 | WINPHONE_BETA(162), 52 | WINPHONE_ALPHA(163), 53 | BLACKBERRY(176), 54 | BLACKBERRY_RC(177), 55 | BLACKBERRY_BETA(178), 56 | BLACKBERRY_ALPHA(179), 57 | WINMETRO(192), 58 | WINMETRO_RC(193), 59 | WINMETRO_BETA(194), 60 | WINMETRO_ALPHA(195), 61 | S40(208), 62 | S40_RC(209), 63 | S40_BETA(210), 64 | S40_ALPHA(211), 65 | CHRONO(224), 66 | CHRONO_RC(225), 67 | CHRONO_BETA(226), 68 | CHRONO_ALPHA(227), 69 | TIZEN(256), 70 | TIZEN_RC(257), 71 | TIZEN_BETA(258), 72 | TIZEN_ALPHA(259), 73 | VIRTUAL(272), 74 | FIREFOXOS(288), 75 | FIREFOXOS_RC(289), 76 | FIREFOXOS_BETA(290), 77 | FIREFOXOS_ALPHA(291), 78 | IOSIPAD(304), 79 | IOSIPAD_RC(305), 80 | IOSIPAD_BETA(306), 81 | IOSIPAD_ALPHA(307), 82 | BIZIOS(320), 83 | BIZIOS_RC(321), 84 | BIZIOS_BETA(322), 85 | BIZIOS_ALPHA(323), 86 | BIZANDROID(336), 87 | BIZANDROID_RC(337), 88 | BIZANDROID_BETA(338), 89 | BIZANDROID_ALPHA(339), 90 | BIZBOT(352), 91 | BIZBOT_RC(353), 92 | BIZBOT_BETA(354), 93 | BIZBOT_ALPHA(355), 94 | CHROMEOS(368), 95 | CHROMEOS_RC(369), 96 | CHROMEOS_BETA(370), 97 | CHROMEOS_ALPHA(371), 98 | ANDROIDLITE(384), 99 | ANDROIDLITE_RC(385), 100 | ANDROIDLITE_BETA(386), 101 | ANDROIDLITE_ALPHA(387), 102 | WIN10(400), 103 | WIN10_RC(401), 104 | WIN10_BETA(402), 105 | WIN10_ALPHA(403), 106 | BIZWEB(416), 107 | BIZWEB_RC(417), 108 | BIZWEB_BETA(418), 109 | BIZWEB_ALPHA(419), 110 | DUMMYPRIMARY(432), 111 | DUMMYPRIMARY_RC(433), 112 | DUMMYPRIMARY_BETA(434), 113 | DUMMYPRIMARY_ALPHA(435), 114 | SQUARE(448), 115 | SQUARE_RC(449), 116 | SQUARE_BETA(450), 117 | SQUARE_ALPHA(451), 118 | INTERNAL(464), 119 | INTERNAL_RC(465), 120 | INTERNAL_BETA(466), 121 | INTERNAL_ALPHA(467), 122 | CLOVAFRIENDS(480), 123 | CLOVAFRIENDS_RC(481), 124 | CLOVAFRIENDS_BETA(482), 125 | CLOVAFRIENDS_ALPHA(483); 126 | 127 | private final int value; 128 | 129 | private ApplicationType(int value) { 130 | this.value = value; 131 | } 132 | 133 | /** 134 | * Get the integer value of this enum value, as defined in the Thrift IDL. 135 | */ 136 | public int getValue() { 137 | return value; 138 | } 139 | 140 | /** 141 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 142 | * @return null if the value is not found. 143 | */ 144 | public static ApplicationType findByValue(int value) { 145 | switch (value) { 146 | case 16: 147 | return IOS; 148 | case 17: 149 | return IOS_RC; 150 | case 18: 151 | return IOS_BETA; 152 | case 19: 153 | return IOS_ALPHA; 154 | case 32: 155 | return ANDROID; 156 | case 33: 157 | return ANDROID_RC; 158 | case 34: 159 | return ANDROID_BETA; 160 | case 35: 161 | return ANDROID_ALPHA; 162 | case 48: 163 | return WAP; 164 | case 49: 165 | return WAP_RC; 166 | case 50: 167 | return WAP_BETA; 168 | case 51: 169 | return WAP_ALPHA; 170 | case 64: 171 | return BOT; 172 | case 65: 173 | return BOT_RC; 174 | case 66: 175 | return BOT_BETA; 176 | case 67: 177 | return BOT_ALPHA; 178 | case 80: 179 | return WEB; 180 | case 81: 181 | return WEB_RC; 182 | case 82: 183 | return WEB_BETA; 184 | case 83: 185 | return WEB_ALPHA; 186 | case 96: 187 | return DESKTOPWIN; 188 | case 97: 189 | return DESKTOPWIN_RC; 190 | case 98: 191 | return DESKTOPWIN_BETA; 192 | case 99: 193 | return DESKTOPWIN_ALPHA; 194 | case 112: 195 | return DESKTOPMAC; 196 | case 113: 197 | return DESKTOPMAC_RC; 198 | case 114: 199 | return DESKTOPMAC_BETA; 200 | case 115: 201 | return DESKTOPMAC_ALPHA; 202 | case 128: 203 | return CHANNELGW; 204 | case 129: 205 | return CHANNELGW_RC; 206 | case 130: 207 | return CHANNELGW_BETA; 208 | case 131: 209 | return CHANNELGW_ALPHA; 210 | case 144: 211 | return CHANNELCP; 212 | case 145: 213 | return CHANNELCP_RC; 214 | case 146: 215 | return CHANNELCP_BETA; 216 | case 147: 217 | return CHANNELCP_ALPHA; 218 | case 160: 219 | return WINPHONE; 220 | case 161: 221 | return WINPHONE_RC; 222 | case 162: 223 | return WINPHONE_BETA; 224 | case 163: 225 | return WINPHONE_ALPHA; 226 | case 176: 227 | return BLACKBERRY; 228 | case 177: 229 | return BLACKBERRY_RC; 230 | case 178: 231 | return BLACKBERRY_BETA; 232 | case 179: 233 | return BLACKBERRY_ALPHA; 234 | case 192: 235 | return WINMETRO; 236 | case 193: 237 | return WINMETRO_RC; 238 | case 194: 239 | return WINMETRO_BETA; 240 | case 195: 241 | return WINMETRO_ALPHA; 242 | case 208: 243 | return S40; 244 | case 209: 245 | return S40_RC; 246 | case 210: 247 | return S40_BETA; 248 | case 211: 249 | return S40_ALPHA; 250 | case 224: 251 | return CHRONO; 252 | case 225: 253 | return CHRONO_RC; 254 | case 226: 255 | return CHRONO_BETA; 256 | case 227: 257 | return CHRONO_ALPHA; 258 | case 256: 259 | return TIZEN; 260 | case 257: 261 | return TIZEN_RC; 262 | case 258: 263 | return TIZEN_BETA; 264 | case 259: 265 | return TIZEN_ALPHA; 266 | case 272: 267 | return VIRTUAL; 268 | case 288: 269 | return FIREFOXOS; 270 | case 289: 271 | return FIREFOXOS_RC; 272 | case 290: 273 | return FIREFOXOS_BETA; 274 | case 291: 275 | return FIREFOXOS_ALPHA; 276 | case 304: 277 | return IOSIPAD; 278 | case 305: 279 | return IOSIPAD_RC; 280 | case 306: 281 | return IOSIPAD_BETA; 282 | case 307: 283 | return IOSIPAD_ALPHA; 284 | case 320: 285 | return BIZIOS; 286 | case 321: 287 | return BIZIOS_RC; 288 | case 322: 289 | return BIZIOS_BETA; 290 | case 323: 291 | return BIZIOS_ALPHA; 292 | case 336: 293 | return BIZANDROID; 294 | case 337: 295 | return BIZANDROID_RC; 296 | case 338: 297 | return BIZANDROID_BETA; 298 | case 339: 299 | return BIZANDROID_ALPHA; 300 | case 352: 301 | return BIZBOT; 302 | case 353: 303 | return BIZBOT_RC; 304 | case 354: 305 | return BIZBOT_BETA; 306 | case 355: 307 | return BIZBOT_ALPHA; 308 | case 368: 309 | return CHROMEOS; 310 | case 369: 311 | return CHROMEOS_RC; 312 | case 370: 313 | return CHROMEOS_BETA; 314 | case 371: 315 | return CHROMEOS_ALPHA; 316 | case 384: 317 | return ANDROIDLITE; 318 | case 385: 319 | return ANDROIDLITE_RC; 320 | case 386: 321 | return ANDROIDLITE_BETA; 322 | case 387: 323 | return ANDROIDLITE_ALPHA; 324 | case 400: 325 | return WIN10; 326 | case 401: 327 | return WIN10_RC; 328 | case 402: 329 | return WIN10_BETA; 330 | case 403: 331 | return WIN10_ALPHA; 332 | case 416: 333 | return BIZWEB; 334 | case 417: 335 | return BIZWEB_RC; 336 | case 418: 337 | return BIZWEB_BETA; 338 | case 419: 339 | return BIZWEB_ALPHA; 340 | case 432: 341 | return DUMMYPRIMARY; 342 | case 433: 343 | return DUMMYPRIMARY_RC; 344 | case 434: 345 | return DUMMYPRIMARY_BETA; 346 | case 435: 347 | return DUMMYPRIMARY_ALPHA; 348 | case 448: 349 | return SQUARE; 350 | case 449: 351 | return SQUARE_RC; 352 | case 450: 353 | return SQUARE_BETA; 354 | case 451: 355 | return SQUARE_ALPHA; 356 | case 464: 357 | return INTERNAL; 358 | case 465: 359 | return INTERNAL_RC; 360 | case 466: 361 | return INTERNAL_BETA; 362 | case 467: 363 | return INTERNAL_ALPHA; 364 | case 480: 365 | return CLOVAFRIENDS; 366 | case 481: 367 | return CLOVAFRIENDS_RC; 368 | case 482: 369 | return CLOVAFRIENDS_BETA; 370 | case 483: 371 | return CLOVAFRIENDS_ALPHA; 372 | default: 373 | return null; 374 | } 375 | } 376 | } 377 | -------------------------------------------------------------------------------- /src/main/java/AsymmetricKeyAlgorithm.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum AsymmetricKeyAlgorithm implements org.apache.thrift.TEnum { 13 | ASYMMETRIC_KEY_ALGORITHM_RSA(1), 14 | ASYMMETRIC_KEY_ALGORITHM_ECDH(2); 15 | 16 | private final int value; 17 | 18 | private AsymmetricKeyAlgorithm(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static AsymmetricKeyAlgorithm findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return ASYMMETRIC_KEY_ALGORITHM_RSA; 37 | case 2: 38 | return ASYMMETRIC_KEY_ALGORITHM_ECDH; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/BooleanState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum BooleanState implements org.apache.thrift.TEnum { 13 | NONE(0), 14 | OFF(1), 15 | ON(2); 16 | 17 | private final int value; 18 | 19 | private BooleanState(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static BooleanState findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return NONE; 38 | case 1: 39 | return OFF; 40 | case 2: 41 | return ON; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/BotType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum BotType implements org.apache.thrift.TEnum { 13 | RESERVED(0), 14 | OFFICIAL(1), 15 | LINE_AT_0(2), 16 | LINE_AT(3); 17 | 18 | private final int value; 19 | 20 | private BotType(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static BotType findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return RESERVED; 39 | case 1: 40 | return OFFICIAL; 41 | case 2: 42 | return LINE_AT_0; 43 | case 3: 44 | return LINE_AT; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/BuddyBannerLinkType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum BuddyBannerLinkType implements org.apache.thrift.TEnum { 13 | BUDDY_BANNER_LINK_HIDDEN(0), 14 | BUDDY_BANNER_LINK_MID(1), 15 | BUDDY_BANNER_LINK_URL(2); 16 | 17 | private final int value; 18 | 19 | private BuddyBannerLinkType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static BuddyBannerLinkType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return BUDDY_BANNER_LINK_HIDDEN; 38 | case 1: 39 | return BUDDY_BANNER_LINK_MID; 40 | case 2: 41 | return BUDDY_BANNER_LINK_URL; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/BuddyOnAirLabel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum BuddyOnAirLabel implements org.apache.thrift.TEnum { 13 | ON_AIR(0), 14 | LIVE(1); 15 | 16 | private final int value; 17 | 18 | private BuddyOnAirLabel(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static BuddyOnAirLabel findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return ON_AIR; 37 | case 1: 38 | return LIVE; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/BuddyOnAirType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum BuddyOnAirType implements org.apache.thrift.TEnum { 13 | NORMAL(0), 14 | LIVE(1), 15 | VOIP(2); 16 | 17 | private final int value; 18 | 19 | private BuddyOnAirType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static BuddyOnAirType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return NORMAL; 38 | case 1: 39 | return LIVE; 40 | case 2: 41 | return VOIP; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/BuddyResultState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum BuddyResultState implements org.apache.thrift.TEnum { 13 | ACCEPTED(1), 14 | SUCCEEDED(2), 15 | FAILED(3), 16 | CANCELLED(4), 17 | NOTIFY_FAILED(5), 18 | STORING(11), 19 | UPLOADING(21), 20 | NOTIFYING(31), 21 | REMOVING_SUBSCRIPTION(41), 22 | UNREGISTERING_ACCOUNT(42), 23 | NOTIFYING_LEAVE_CHAT(43); 24 | 25 | private final int value; 26 | 27 | private BuddyResultState(int value) { 28 | this.value = value; 29 | } 30 | 31 | /** 32 | * Get the integer value of this enum value, as defined in the Thrift IDL. 33 | */ 34 | public int getValue() { 35 | return value; 36 | } 37 | 38 | /** 39 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 40 | * @return null if the value is not found. 41 | */ 42 | public static BuddyResultState findByValue(int value) { 43 | switch (value) { 44 | case 1: 45 | return ACCEPTED; 46 | case 2: 47 | return SUCCEEDED; 48 | case 3: 49 | return FAILED; 50 | case 4: 51 | return CANCELLED; 52 | case 5: 53 | return NOTIFY_FAILED; 54 | case 11: 55 | return STORING; 56 | case 21: 57 | return UPLOADING; 58 | case 31: 59 | return NOTIFYING; 60 | case 41: 61 | return REMOVING_SUBSCRIPTION; 62 | case 42: 63 | return UNREGISTERING_ACCOUNT; 64 | case 43: 65 | return NOTIFYING_LEAVE_CHAT; 66 | default: 67 | return null; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/BuddySearchRequestSource.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum BuddySearchRequestSource implements org.apache.thrift.TEnum { 13 | NA(0), 14 | FRIEND_VIEW(1), 15 | OFFICIAL_ACCOUNT_VIEW(2); 16 | 17 | private final int value; 18 | 19 | private BuddySearchRequestSource(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static BuddySearchRequestSource findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return NA; 38 | case 1: 39 | return FRIEND_VIEW; 40 | case 2: 41 | return OFFICIAL_ACCOUNT_VIEW; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/CarrierCode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum CarrierCode implements org.apache.thrift.TEnum { 13 | NOT_SPECIFIED(0), 14 | JP_DOCOMO(1), 15 | JP_AU(2), 16 | JP_SOFTBANK(3), 17 | JP_DOCOMO_LINE(4), 18 | KR_SKT(17), 19 | KR_KT(18), 20 | KR_LGT(19); 21 | 22 | private final int value; 23 | 24 | private CarrierCode(int value) { 25 | this.value = value; 26 | } 27 | 28 | /** 29 | * Get the integer value of this enum value, as defined in the Thrift IDL. 30 | */ 31 | public int getValue() { 32 | return value; 33 | } 34 | 35 | /** 36 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 37 | * @return null if the value is not found. 38 | */ 39 | public static CarrierCode findByValue(int value) { 40 | switch (value) { 41 | case 0: 42 | return NOT_SPECIFIED; 43 | case 1: 44 | return JP_DOCOMO; 45 | case 2: 46 | return JP_AU; 47 | case 3: 48 | return JP_SOFTBANK; 49 | case 4: 50 | return JP_DOCOMO_LINE; 51 | case 17: 52 | return KR_SKT; 53 | case 18: 54 | return KR_KT; 55 | case 19: 56 | return KR_LGT; 57 | default: 58 | return null; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/ChannelConfiguration.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ChannelConfiguration implements org.apache.thrift.TEnum { 13 | MESSAGE(0), 14 | MESSAGE_NOTIFICATION(1), 15 | NOTIFICATION_CENTER(2); 16 | 17 | private final int value; 18 | 19 | private ChannelConfiguration(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static ChannelConfiguration findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return MESSAGE; 38 | case 1: 39 | return MESSAGE_NOTIFICATION; 40 | case 2: 41 | return NOTIFICATION_CENTER; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/ChannelErrorCode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ChannelErrorCode implements org.apache.thrift.TEnum { 13 | ILLEGAL_ARGUMENT(0), 14 | INTERNAL_ERROR(1), 15 | CONNECTION_ERROR(2), 16 | AUTHENTICATIONI_FAILED(3), 17 | NEED_PERMISSION_APPROVAL(4), 18 | COIN_NOT_USABLE(5), 19 | WEBVIEW_NOT_ALLOWED(6); 20 | 21 | private final int value; 22 | 23 | private ChannelErrorCode(int value) { 24 | this.value = value; 25 | } 26 | 27 | /** 28 | * Get the integer value of this enum value, as defined in the Thrift IDL. 29 | */ 30 | public int getValue() { 31 | return value; 32 | } 33 | 34 | /** 35 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 36 | * @return null if the value is not found. 37 | */ 38 | public static ChannelErrorCode findByValue(int value) { 39 | switch (value) { 40 | case 0: 41 | return ILLEGAL_ARGUMENT; 42 | case 1: 43 | return INTERNAL_ERROR; 44 | case 2: 45 | return CONNECTION_ERROR; 46 | case 3: 47 | return AUTHENTICATIONI_FAILED; 48 | case 4: 49 | return NEED_PERMISSION_APPROVAL; 50 | case 5: 51 | return COIN_NOT_USABLE; 52 | case 6: 53 | return WEBVIEW_NOT_ALLOWED; 54 | default: 55 | return null; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/ChannelFeatureLicense.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ChannelFeatureLicense implements org.apache.thrift.TEnum { 13 | BLE_LCS_API_USABLE(26), 14 | PROHIBIT_MINIMIZE_CHANNEL_BROWSER(27), 15 | ALLOW_IOS_WEBKIT(28); 16 | 17 | private final int value; 18 | 19 | private ChannelFeatureLicense(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static ChannelFeatureLicense findByValue(int value) { 35 | switch (value) { 36 | case 26: 37 | return BLE_LCS_API_USABLE; 38 | case 27: 39 | return PROHIBIT_MINIMIZE_CHANNEL_BROWSER; 40 | case 28: 41 | return ALLOW_IOS_WEBKIT; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/ChannelPermission.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ChannelPermission implements org.apache.thrift.TEnum { 13 | PROFILE(0), 14 | FRIENDS(1), 15 | GROUP(2); 16 | 17 | private final int value; 18 | 19 | private ChannelPermission(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static ChannelPermission findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return PROFILE; 38 | case 1: 39 | return FRIENDS; 40 | case 2: 41 | return GROUP; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/ChannelSyncType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ChannelSyncType implements org.apache.thrift.TEnum { 13 | SYNC(0), 14 | REMOVE(1), 15 | REMOVE_ALL(2); 16 | 17 | private final int value; 18 | 19 | private ChannelSyncType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static ChannelSyncType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return SYNC; 38 | case 1: 39 | return REMOVE; 40 | case 2: 41 | return REMOVE_ALL; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/ContactAttribute.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ContactAttribute implements org.apache.thrift.TEnum { 13 | CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL(1), 14 | CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL(2), 15 | CONTACT_ATTRIBUTE_CAPABLE_MY_HOME(16), 16 | CONTACT_ATTRIBUTE_CAPABLE_BUDDY(32); 17 | 18 | private final int value; 19 | 20 | private ContactAttribute(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static ContactAttribute findByValue(int value) { 36 | switch (value) { 37 | case 1: 38 | return CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL; 39 | case 2: 40 | return CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL; 41 | case 16: 42 | return CONTACT_ATTRIBUTE_CAPABLE_MY_HOME; 43 | case 32: 44 | return CONTACT_ATTRIBUTE_CAPABLE_BUDDY; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/ContactCategory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ContactCategory implements org.apache.thrift.TEnum { 13 | NORMAL(0), 14 | RECOMMEND(1); 15 | 16 | private final int value; 17 | 18 | private ContactCategory(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static ContactCategory findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return NORMAL; 37 | case 1: 38 | return RECOMMEND; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/ContactRelation.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ContactRelation implements org.apache.thrift.TEnum { 13 | ONEWAY(0), 14 | BOTH(1), 15 | NOT_REGISTERED(2); 16 | 17 | private final int value; 18 | 19 | private ContactRelation(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static ContactRelation findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return ONEWAY; 38 | case 1: 39 | return BOTH; 40 | case 2: 41 | return NOT_REGISTERED; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/ContactSetting.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ContactSetting implements org.apache.thrift.TEnum { 13 | CONTACT_SETTING_NOTIFICATION_DISABLE(1), 14 | CONTACT_SETTING_DISPLAY_NAME_OVERRIDE(2), 15 | CONTACT_SETTING_CONTACT_HIDE(4), 16 | CONTACT_SETTING_FAVORITE(8), 17 | CONTACT_SETTING_DELETE(16); 18 | 19 | private final int value; 20 | 21 | private ContactSetting(int value) { 22 | this.value = value; 23 | } 24 | 25 | /** 26 | * Get the integer value of this enum value, as defined in the Thrift IDL. 27 | */ 28 | public int getValue() { 29 | return value; 30 | } 31 | 32 | /** 33 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 34 | * @return null if the value is not found. 35 | */ 36 | public static ContactSetting findByValue(int value) { 37 | switch (value) { 38 | case 1: 39 | return CONTACT_SETTING_NOTIFICATION_DISABLE; 40 | case 2: 41 | return CONTACT_SETTING_DISPLAY_NAME_OVERRIDE; 42 | case 4: 43 | return CONTACT_SETTING_CONTACT_HIDE; 44 | case 8: 45 | return CONTACT_SETTING_FAVORITE; 46 | case 16: 47 | return CONTACT_SETTING_DELETE; 48 | default: 49 | return null; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/ContactStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ContactStatus implements org.apache.thrift.TEnum { 13 | UNSPECIFIED(0), 14 | FRIEND(1), 15 | FRIEND_BLOCKED(2), 16 | RECOMMEND(3), 17 | RECOMMEND_BLOCKED(4), 18 | DELETED(5), 19 | DELETED_BLOCKED(6); 20 | 21 | private final int value; 22 | 23 | private ContactStatus(int value) { 24 | this.value = value; 25 | } 26 | 27 | /** 28 | * Get the integer value of this enum value, as defined in the Thrift IDL. 29 | */ 30 | public int getValue() { 31 | return value; 32 | } 33 | 34 | /** 35 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 36 | * @return null if the value is not found. 37 | */ 38 | public static ContactStatus findByValue(int value) { 39 | switch (value) { 40 | case 0: 41 | return UNSPECIFIED; 42 | case 1: 43 | return FRIEND; 44 | case 2: 45 | return FRIEND_BLOCKED; 46 | case 3: 47 | return RECOMMEND; 48 | case 4: 49 | return RECOMMEND_BLOCKED; 50 | case 5: 51 | return DELETED; 52 | case 6: 53 | return DELETED_BLOCKED; 54 | default: 55 | return null; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/ContactType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ContactType implements org.apache.thrift.TEnum { 13 | MID(0), 14 | PHONE(1), 15 | EMAIL(2), 16 | USERID(3), 17 | PROXIMITY(4), 18 | GROUP(5), 19 | USER(6), 20 | QRCODE(7), 21 | PROMOTION_BOT(8), 22 | CONTACT_MESSAGE(9), 23 | FRIEND_REQUEST(10), 24 | REPAIR(128), 25 | FACEBOOK(2305), 26 | SINA(2306), 27 | RENREN(2307), 28 | FEIXIN(2308), 29 | BBM(2309), 30 | BEACON(11); 31 | 32 | private final int value; 33 | 34 | private ContactType(int value) { 35 | this.value = value; 36 | } 37 | 38 | /** 39 | * Get the integer value of this enum value, as defined in the Thrift IDL. 40 | */ 41 | public int getValue() { 42 | return value; 43 | } 44 | 45 | /** 46 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 47 | * @return null if the value is not found. 48 | */ 49 | public static ContactType findByValue(int value) { 50 | switch (value) { 51 | case 0: 52 | return MID; 53 | case 1: 54 | return PHONE; 55 | case 2: 56 | return EMAIL; 57 | case 3: 58 | return USERID; 59 | case 4: 60 | return PROXIMITY; 61 | case 5: 62 | return GROUP; 63 | case 6: 64 | return USER; 65 | case 7: 66 | return QRCODE; 67 | case 8: 68 | return PROMOTION_BOT; 69 | case 9: 70 | return CONTACT_MESSAGE; 71 | case 10: 72 | return FRIEND_REQUEST; 73 | case 128: 74 | return REPAIR; 75 | case 2305: 76 | return FACEBOOK; 77 | case 2306: 78 | return SINA; 79 | case 2307: 80 | return RENREN; 81 | case 2308: 82 | return FEIXIN; 83 | case 2309: 84 | return BBM; 85 | case 11: 86 | return BEACON; 87 | default: 88 | return null; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/ContentType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ContentType implements org.apache.thrift.TEnum { 13 | NONE(0), 14 | IMAGE(1), 15 | VIDEO(2), 16 | AUDIO(3), 17 | HTML(4), 18 | PDF(5), 19 | CALL(6), 20 | STICKER(7), 21 | PRESENCE(8), 22 | GIFT(9), 23 | GROUPBOARD(10), 24 | APPLINK(11), 25 | LINK(12), 26 | CONTACT(13), 27 | FILE(14), 28 | LOCATION(15), 29 | POSTNOTIFICATION(16), 30 | RICH(17), 31 | CHATEVENT(18), 32 | MUSIC(19), 33 | PAYMENT(20), 34 | EXTIMAGE(21); 35 | 36 | private final int value; 37 | 38 | private ContentType(int value) { 39 | this.value = value; 40 | } 41 | 42 | /** 43 | * Get the integer value of this enum value, as defined in the Thrift IDL. 44 | */ 45 | public int getValue() { 46 | return value; 47 | } 48 | 49 | /** 50 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 51 | * @return null if the value is not found. 52 | */ 53 | public static ContentType findByValue(int value) { 54 | switch (value) { 55 | case 0: 56 | return NONE; 57 | case 1: 58 | return IMAGE; 59 | case 2: 60 | return VIDEO; 61 | case 3: 62 | return AUDIO; 63 | case 4: 64 | return HTML; 65 | case 5: 66 | return PDF; 67 | case 6: 68 | return CALL; 69 | case 7: 70 | return STICKER; 71 | case 8: 72 | return PRESENCE; 73 | case 9: 74 | return GIFT; 75 | case 10: 76 | return GROUPBOARD; 77 | case 11: 78 | return APPLINK; 79 | case 12: 80 | return LINK; 81 | case 13: 82 | return CONTACT; 83 | case 14: 84 | return FILE; 85 | case 15: 86 | return LOCATION; 87 | case 16: 88 | return POSTNOTIFICATION; 89 | case 17: 90 | return RICH; 91 | case 18: 92 | return CHATEVENT; 93 | case 19: 94 | return MUSIC; 95 | case 20: 96 | return PAYMENT; 97 | case 21: 98 | return EXTIMAGE; 99 | default: 100 | return null; 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/CustomMode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum CustomMode implements org.apache.thrift.TEnum { 13 | PROMOTION_FRIENDS_INVITE(1), 14 | CAPABILITY_SERVER_SIDE_SMS(2), 15 | LINE_CLIENT_ANALYTICS_CONFIGURATION(3); 16 | 17 | private final int value; 18 | 19 | private CustomMode(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static CustomMode findByValue(int value) { 35 | switch (value) { 36 | case 1: 37 | return PROMOTION_FRIENDS_INVITE; 38 | case 2: 39 | return CAPABILITY_SERVER_SIDE_SMS; 40 | case 3: 41 | return LINE_CLIENT_ANALYTICS_CONFIGURATION; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/DeleteSquareResponse.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | import org.apache.thrift.scheme.IScheme; 8 | import org.apache.thrift.scheme.SchemeFactory; 9 | import org.apache.thrift.scheme.StandardScheme; 10 | 11 | import org.apache.thrift.scheme.TupleScheme; 12 | import org.apache.thrift.protocol.TTupleProtocol; 13 | import org.apache.thrift.protocol.TProtocolException; 14 | import org.apache.thrift.EncodingUtils; 15 | import org.apache.thrift.TException; 16 | import org.apache.thrift.async.AsyncMethodCallback; 17 | import org.apache.thrift.server.AbstractNonblockingServer.*; 18 | import java.util.List; 19 | import java.util.ArrayList; 20 | import java.util.Map; 21 | import java.util.HashMap; 22 | import java.util.EnumMap; 23 | import java.util.Set; 24 | import java.util.HashSet; 25 | import java.util.EnumSet; 26 | import java.util.Collections; 27 | import java.util.BitSet; 28 | import java.nio.ByteBuffer; 29 | import java.util.Arrays; 30 | import org.slf4j.Logger; 31 | import org.slf4j.LoggerFactory; 32 | 33 | public class DeleteSquareResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { 34 | private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeleteSquareResponse"); 35 | 36 | 37 | private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); 38 | static { 39 | schemes.put(StandardScheme.class, new DeleteSquareResponseStandardSchemeFactory()); 40 | schemes.put(TupleScheme.class, new DeleteSquareResponseTupleSchemeFactory()); 41 | } 42 | 43 | 44 | /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ 45 | public enum _Fields implements org.apache.thrift.TFieldIdEnum { 46 | ; 47 | 48 | private static final Map byName = new HashMap(); 49 | 50 | static { 51 | for (_Fields field : EnumSet.allOf(_Fields.class)) { 52 | byName.put(field.getFieldName(), field); 53 | } 54 | } 55 | 56 | /** 57 | * Find the _Fields constant that matches fieldId, or null if its not found. 58 | */ 59 | public static _Fields findByThriftId(int fieldId) { 60 | switch(fieldId) { 61 | default: 62 | return null; 63 | } 64 | } 65 | 66 | /** 67 | * Find the _Fields constant that matches fieldId, throwing an exception 68 | * if it is not found. 69 | */ 70 | public static _Fields findByThriftIdOrThrow(int fieldId) { 71 | _Fields fields = findByThriftId(fieldId); 72 | if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); 73 | return fields; 74 | } 75 | 76 | /** 77 | * Find the _Fields constant that matches name, or null if its not found. 78 | */ 79 | public static _Fields findByName(String name) { 80 | return byName.get(name); 81 | } 82 | 83 | private final short _thriftId; 84 | private final String _fieldName; 85 | 86 | _Fields(short thriftId, String fieldName) { 87 | _thriftId = thriftId; 88 | _fieldName = fieldName; 89 | } 90 | 91 | public short getThriftFieldId() { 92 | return _thriftId; 93 | } 94 | 95 | public String getFieldName() { 96 | return _fieldName; 97 | } 98 | } 99 | public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; 100 | static { 101 | Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); 102 | metaDataMap = Collections.unmodifiableMap(tmpMap); 103 | org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DeleteSquareResponse.class, metaDataMap); 104 | } 105 | 106 | public DeleteSquareResponse() { 107 | } 108 | 109 | /** 110 | * Performs a deep copy on other. 111 | */ 112 | public DeleteSquareResponse(DeleteSquareResponse other) { 113 | } 114 | 115 | public DeleteSquareResponse deepCopy() { 116 | return new DeleteSquareResponse(this); 117 | } 118 | 119 | @Override 120 | public void clear() { 121 | } 122 | 123 | public void setFieldValue(_Fields field, Object value) { 124 | switch (field) { 125 | } 126 | } 127 | 128 | public Object getFieldValue(_Fields field) { 129 | switch (field) { 130 | } 131 | throw new IllegalStateException(); 132 | } 133 | 134 | /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ 135 | public boolean isSet(_Fields field) { 136 | if (field == null) { 137 | throw new IllegalArgumentException(); 138 | } 139 | 140 | switch (field) { 141 | } 142 | throw new IllegalStateException(); 143 | } 144 | 145 | @Override 146 | public boolean equals(Object that) { 147 | if (that == null) 148 | return false; 149 | if (that instanceof DeleteSquareResponse) 150 | return this.equals((DeleteSquareResponse)that); 151 | return false; 152 | } 153 | 154 | public boolean equals(DeleteSquareResponse that) { 155 | if (that == null) 156 | return false; 157 | 158 | return true; 159 | } 160 | 161 | @Override 162 | public int hashCode() { 163 | return 0; 164 | } 165 | 166 | @Override 167 | public int compareTo(DeleteSquareResponse other) { 168 | if (!getClass().equals(other.getClass())) { 169 | return getClass().getName().compareTo(other.getClass().getName()); 170 | } 171 | 172 | int lastComparison = 0; 173 | 174 | return 0; 175 | } 176 | 177 | public _Fields fieldForId(int fieldId) { 178 | return _Fields.findByThriftId(fieldId); 179 | } 180 | 181 | public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { 182 | schemes.get(iprot.getScheme()).getScheme().read(iprot, this); 183 | } 184 | 185 | public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { 186 | schemes.get(oprot.getScheme()).getScheme().write(oprot, this); 187 | } 188 | 189 | @Override 190 | public String toString() { 191 | StringBuilder sb = new StringBuilder("DeleteSquareResponse("); 192 | boolean first = true; 193 | 194 | sb.append(")"); 195 | return sb.toString(); 196 | } 197 | 198 | public void validate() throws org.apache.thrift.TException { 199 | // check for required fields 200 | // check for sub-struct validity 201 | } 202 | 203 | private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { 204 | try { 205 | write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); 206 | } catch (org.apache.thrift.TException te) { 207 | throw new java.io.IOException(te); 208 | } 209 | } 210 | 211 | private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { 212 | try { 213 | read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); 214 | } catch (org.apache.thrift.TException te) { 215 | throw new java.io.IOException(te); 216 | } 217 | } 218 | 219 | private static class DeleteSquareResponseStandardSchemeFactory implements SchemeFactory { 220 | public DeleteSquareResponseStandardScheme getScheme() { 221 | return new DeleteSquareResponseStandardScheme(); 222 | } 223 | } 224 | 225 | private static class DeleteSquareResponseStandardScheme extends StandardScheme { 226 | 227 | public void read(org.apache.thrift.protocol.TProtocol iprot, DeleteSquareResponse struct) throws org.apache.thrift.TException { 228 | org.apache.thrift.protocol.TField schemeField; 229 | iprot.readStructBegin(); 230 | while (true) 231 | { 232 | schemeField = iprot.readFieldBegin(); 233 | if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 234 | break; 235 | } 236 | switch (schemeField.id) { 237 | default: 238 | org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); 239 | } 240 | iprot.readFieldEnd(); 241 | } 242 | iprot.readStructEnd(); 243 | 244 | // check for required fields of primitive type, which can't be checked in the validate method 245 | struct.validate(); 246 | } 247 | 248 | public void write(org.apache.thrift.protocol.TProtocol oprot, DeleteSquareResponse struct) throws org.apache.thrift.TException { 249 | struct.validate(); 250 | 251 | oprot.writeStructBegin(STRUCT_DESC); 252 | oprot.writeFieldStop(); 253 | oprot.writeStructEnd(); 254 | } 255 | 256 | } 257 | 258 | private static class DeleteSquareResponseTupleSchemeFactory implements SchemeFactory { 259 | public DeleteSquareResponseTupleScheme getScheme() { 260 | return new DeleteSquareResponseTupleScheme(); 261 | } 262 | } 263 | 264 | private static class DeleteSquareResponseTupleScheme extends TupleScheme { 265 | 266 | @Override 267 | public void write(org.apache.thrift.protocol.TProtocol prot, DeleteSquareResponse struct) throws org.apache.thrift.TException { 268 | TTupleProtocol oprot = (TTupleProtocol) prot; 269 | } 270 | 271 | @Override 272 | public void read(org.apache.thrift.protocol.TProtocol prot, DeleteSquareResponse struct) throws org.apache.thrift.TException { 273 | TTupleProtocol iprot = (TTupleProtocol) prot; 274 | } 275 | } 276 | 277 | } 278 | 279 | -------------------------------------------------------------------------------- /src/main/java/DestroyMessageResponse.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | import org.apache.thrift.scheme.IScheme; 8 | import org.apache.thrift.scheme.SchemeFactory; 9 | import org.apache.thrift.scheme.StandardScheme; 10 | 11 | import org.apache.thrift.scheme.TupleScheme; 12 | import org.apache.thrift.protocol.TTupleProtocol; 13 | import org.apache.thrift.protocol.TProtocolException; 14 | import org.apache.thrift.EncodingUtils; 15 | import org.apache.thrift.TException; 16 | import org.apache.thrift.async.AsyncMethodCallback; 17 | import org.apache.thrift.server.AbstractNonblockingServer.*; 18 | import java.util.List; 19 | import java.util.ArrayList; 20 | import java.util.Map; 21 | import java.util.HashMap; 22 | import java.util.EnumMap; 23 | import java.util.Set; 24 | import java.util.HashSet; 25 | import java.util.EnumSet; 26 | import java.util.Collections; 27 | import java.util.BitSet; 28 | import java.nio.ByteBuffer; 29 | import java.util.Arrays; 30 | import org.slf4j.Logger; 31 | import org.slf4j.LoggerFactory; 32 | 33 | public class DestroyMessageResponse implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { 34 | private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DestroyMessageResponse"); 35 | 36 | 37 | private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); 38 | static { 39 | schemes.put(StandardScheme.class, new DestroyMessageResponseStandardSchemeFactory()); 40 | schemes.put(TupleScheme.class, new DestroyMessageResponseTupleSchemeFactory()); 41 | } 42 | 43 | 44 | /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ 45 | public enum _Fields implements org.apache.thrift.TFieldIdEnum { 46 | ; 47 | 48 | private static final Map byName = new HashMap(); 49 | 50 | static { 51 | for (_Fields field : EnumSet.allOf(_Fields.class)) { 52 | byName.put(field.getFieldName(), field); 53 | } 54 | } 55 | 56 | /** 57 | * Find the _Fields constant that matches fieldId, or null if its not found. 58 | */ 59 | public static _Fields findByThriftId(int fieldId) { 60 | switch(fieldId) { 61 | default: 62 | return null; 63 | } 64 | } 65 | 66 | /** 67 | * Find the _Fields constant that matches fieldId, throwing an exception 68 | * if it is not found. 69 | */ 70 | public static _Fields findByThriftIdOrThrow(int fieldId) { 71 | _Fields fields = findByThriftId(fieldId); 72 | if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); 73 | return fields; 74 | } 75 | 76 | /** 77 | * Find the _Fields constant that matches name, or null if its not found. 78 | */ 79 | public static _Fields findByName(String name) { 80 | return byName.get(name); 81 | } 82 | 83 | private final short _thriftId; 84 | private final String _fieldName; 85 | 86 | _Fields(short thriftId, String fieldName) { 87 | _thriftId = thriftId; 88 | _fieldName = fieldName; 89 | } 90 | 91 | public short getThriftFieldId() { 92 | return _thriftId; 93 | } 94 | 95 | public String getFieldName() { 96 | return _fieldName; 97 | } 98 | } 99 | public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; 100 | static { 101 | Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); 102 | metaDataMap = Collections.unmodifiableMap(tmpMap); 103 | org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DestroyMessageResponse.class, metaDataMap); 104 | } 105 | 106 | public DestroyMessageResponse() { 107 | } 108 | 109 | /** 110 | * Performs a deep copy on other. 111 | */ 112 | public DestroyMessageResponse(DestroyMessageResponse other) { 113 | } 114 | 115 | public DestroyMessageResponse deepCopy() { 116 | return new DestroyMessageResponse(this); 117 | } 118 | 119 | @Override 120 | public void clear() { 121 | } 122 | 123 | public void setFieldValue(_Fields field, Object value) { 124 | switch (field) { 125 | } 126 | } 127 | 128 | public Object getFieldValue(_Fields field) { 129 | switch (field) { 130 | } 131 | throw new IllegalStateException(); 132 | } 133 | 134 | /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ 135 | public boolean isSet(_Fields field) { 136 | if (field == null) { 137 | throw new IllegalArgumentException(); 138 | } 139 | 140 | switch (field) { 141 | } 142 | throw new IllegalStateException(); 143 | } 144 | 145 | @Override 146 | public boolean equals(Object that) { 147 | if (that == null) 148 | return false; 149 | if (that instanceof DestroyMessageResponse) 150 | return this.equals((DestroyMessageResponse)that); 151 | return false; 152 | } 153 | 154 | public boolean equals(DestroyMessageResponse that) { 155 | if (that == null) 156 | return false; 157 | 158 | return true; 159 | } 160 | 161 | @Override 162 | public int hashCode() { 163 | return 0; 164 | } 165 | 166 | @Override 167 | public int compareTo(DestroyMessageResponse other) { 168 | if (!getClass().equals(other.getClass())) { 169 | return getClass().getName().compareTo(other.getClass().getName()); 170 | } 171 | 172 | int lastComparison = 0; 173 | 174 | return 0; 175 | } 176 | 177 | public _Fields fieldForId(int fieldId) { 178 | return _Fields.findByThriftId(fieldId); 179 | } 180 | 181 | public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { 182 | schemes.get(iprot.getScheme()).getScheme().read(iprot, this); 183 | } 184 | 185 | public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { 186 | schemes.get(oprot.getScheme()).getScheme().write(oprot, this); 187 | } 188 | 189 | @Override 190 | public String toString() { 191 | StringBuilder sb = new StringBuilder("DestroyMessageResponse("); 192 | boolean first = true; 193 | 194 | sb.append(")"); 195 | return sb.toString(); 196 | } 197 | 198 | public void validate() throws org.apache.thrift.TException { 199 | // check for required fields 200 | // check for sub-struct validity 201 | } 202 | 203 | private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { 204 | try { 205 | write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); 206 | } catch (org.apache.thrift.TException te) { 207 | throw new java.io.IOException(te); 208 | } 209 | } 210 | 211 | private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { 212 | try { 213 | read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); 214 | } catch (org.apache.thrift.TException te) { 215 | throw new java.io.IOException(te); 216 | } 217 | } 218 | 219 | private static class DestroyMessageResponseStandardSchemeFactory implements SchemeFactory { 220 | public DestroyMessageResponseStandardScheme getScheme() { 221 | return new DestroyMessageResponseStandardScheme(); 222 | } 223 | } 224 | 225 | private static class DestroyMessageResponseStandardScheme extends StandardScheme { 226 | 227 | public void read(org.apache.thrift.protocol.TProtocol iprot, DestroyMessageResponse struct) throws org.apache.thrift.TException { 228 | org.apache.thrift.protocol.TField schemeField; 229 | iprot.readStructBegin(); 230 | while (true) 231 | { 232 | schemeField = iprot.readFieldBegin(); 233 | if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 234 | break; 235 | } 236 | switch (schemeField.id) { 237 | default: 238 | org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); 239 | } 240 | iprot.readFieldEnd(); 241 | } 242 | iprot.readStructEnd(); 243 | 244 | // check for required fields of primitive type, which can't be checked in the validate method 245 | struct.validate(); 246 | } 247 | 248 | public void write(org.apache.thrift.protocol.TProtocol oprot, DestroyMessageResponse struct) throws org.apache.thrift.TException { 249 | struct.validate(); 250 | 251 | oprot.writeStructBegin(STRUCT_DESC); 252 | oprot.writeFieldStop(); 253 | oprot.writeStructEnd(); 254 | } 255 | 256 | } 257 | 258 | private static class DestroyMessageResponseTupleSchemeFactory implements SchemeFactory { 259 | public DestroyMessageResponseTupleScheme getScheme() { 260 | return new DestroyMessageResponseTupleScheme(); 261 | } 262 | } 263 | 264 | private static class DestroyMessageResponseTupleScheme extends TupleScheme { 265 | 266 | @Override 267 | public void write(org.apache.thrift.protocol.TProtocol prot, DestroyMessageResponse struct) throws org.apache.thrift.TException { 268 | TTupleProtocol oprot = (TTupleProtocol) prot; 269 | } 270 | 271 | @Override 272 | public void read(org.apache.thrift.protocol.TProtocol prot, DestroyMessageResponse struct) throws org.apache.thrift.TException { 273 | TTupleProtocol iprot = (TTupleProtocol) prot; 274 | } 275 | } 276 | 277 | } 278 | 279 | -------------------------------------------------------------------------------- /src/main/java/Diff.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum Diff implements org.apache.thrift.TEnum { 13 | ADDED(0), 14 | UPDATED(1), 15 | REMOVED(2); 16 | 17 | private final int value; 18 | 19 | private Diff(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static Diff findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return ADDED; 38 | case 1: 39 | return UPDATED; 40 | case 2: 41 | return REMOVED; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/EmailConfirmationStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum EmailConfirmationStatus implements org.apache.thrift.TEnum { 13 | NOT_SPECIFIED(0), 14 | NOT_YET(1), 15 | DONE(3), 16 | NEED_ENFORCED_INPUT(4); 17 | 18 | private final int value; 19 | 20 | private EmailConfirmationStatus(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static EmailConfirmationStatus findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return NOT_SPECIFIED; 39 | case 1: 40 | return NOT_YET; 41 | case 3: 42 | return DONE; 43 | case 4: 44 | return NEED_ENFORCED_INPUT; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/EmailConfirmationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum EmailConfirmationType implements org.apache.thrift.TEnum { 13 | SERVER_SIDE_EMAIL(0), 14 | CLIENT_SIDE_EMAIL(1); 15 | 16 | private final int value; 17 | 18 | private EmailConfirmationType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static EmailConfirmationType findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return SERVER_SIDE_EMAIL; 37 | case 1: 38 | return CLIENT_SIDE_EMAIL; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/FeatureType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum FeatureType implements org.apache.thrift.TEnum { 13 | OBS_VIDEO(1), 14 | OBS_GENERAL(2); 15 | 16 | private final int value; 17 | 18 | private FeatureType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static FeatureType findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return OBS_VIDEO; 37 | case 2: 38 | return OBS_GENERAL; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/FetchDirection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum FetchDirection implements org.apache.thrift.TEnum { 13 | FORWARD(1), 14 | BACKWARD(2); 15 | 16 | private final int value; 17 | 18 | private FetchDirection(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static FetchDirection findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return FORWARD; 37 | case 2: 38 | return BACKWARD; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/FriendRequestStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum FriendRequestStatus implements org.apache.thrift.TEnum { 13 | NONE(0), 14 | AVAILABLE(1), 15 | ALREADY_REQUESTED(2), 16 | UNAVAILABLE(3); 17 | 18 | private final int value; 19 | 20 | private FriendRequestStatus(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static FriendRequestStatus findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return NONE; 39 | case 1: 40 | return AVAILABLE; 41 | case 2: 42 | return ALREADY_REQUESTED; 43 | case 3: 44 | return UNAVAILABLE; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/GroupAttribute.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum GroupAttribute implements org.apache.thrift.TEnum { 13 | NAME(1), 14 | PICTURE_STATUS(2), 15 | ALL(255), 16 | PREVENTED_JOIN_BY_TICKET(4), 17 | NOTIFICATION_SETTING(8); 18 | 19 | private final int value; 20 | 21 | private GroupAttribute(int value) { 22 | this.value = value; 23 | } 24 | 25 | /** 26 | * Get the integer value of this enum value, as defined in the Thrift IDL. 27 | */ 28 | public int getValue() { 29 | return value; 30 | } 31 | 32 | /** 33 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 34 | * @return null if the value is not found. 35 | */ 36 | public static GroupAttribute findByValue(int value) { 37 | switch (value) { 38 | case 1: 39 | return NAME; 40 | case 2: 41 | return PICTURE_STATUS; 42 | case 255: 43 | return ALL; 44 | case 4: 45 | return PREVENTED_JOIN_BY_TICKET; 46 | case 8: 47 | return NOTIFICATION_SETTING; 48 | default: 49 | return null; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/IdentityProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum IdentityProvider implements org.apache.thrift.TEnum { 13 | UNKNOWN(0), 14 | LINE(1), 15 | NAVER_KR(2), 16 | LINE_PHONE(3); 17 | 18 | private final int value; 19 | 20 | private IdentityProvider(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static IdentityProvider findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return UNKNOWN; 39 | case 1: 40 | return LINE; 41 | case 2: 42 | return NAVER_KR; 43 | case 3: 44 | return LINE_PHONE; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/LINEClient.java: -------------------------------------------------------------------------------- 1 | import org.apache.thrift.protocol.TCompactProtocol; 2 | import org.apache.thrift.protocol.TProtocol; 3 | import org.apache.thrift.transport.THttpClient; 4 | import org.json.JSONArray; 5 | import org.json.JSONObject; 6 | 7 | import java.io.BufferedReader; 8 | import java.io.InputStream; 9 | import java.io.InputStreamReader; 10 | import java.net.HttpURLConnection; 11 | import java.net.URL; 12 | import java.util.ArrayList; 13 | import java.util.HashMap; 14 | import java.util.List; 15 | import java.util.Map; 16 | 17 | public class LINEClient { 18 | 19 | public String authtoken = ""; 20 | public String certificate = ""; 21 | public String mid = ""; 22 | public TalkService.Client client; 23 | 24 | private String code = ""; 25 | 26 | public LINEClient(LoginBy type,String code)throws Exception{ 27 | switch (type){ 28 | case QRCODE: 29 | loginByQRCode(); 30 | break; 31 | case CREDENTIAL: 32 | certificate = code; 33 | break; 34 | case TOKEN: 35 | authtoken = code; 36 | loginWithAuthToken(code); 37 | break; 38 | } 39 | } 40 | 41 | public LoginResult loginByQRCode() throws Exception{ 42 | THttpClient transport = new THttpClient("https://gd2.line.naver.jp/api/v4/TalkService.do"); 43 | transport.setCustomHeader("X-Line-Application", "DESKTOPWIN\t7.18.1\tYUZU\t11.2.5"); 44 | TProtocol protocol = new TCompactProtocol(transport); 45 | TalkService.Client client = new TalkService.Client(protocol); 46 | transport.open(); 47 | AuthQrcode qr = client.getAuthQrcode(true, "YUZU"); 48 | System.out.println("(*´ヮ`)<二分以内にこのリンクを踏んでくださいね!"); 49 | System.out.println("line://au/q/" + qr.verifier); 50 | URL myURL = new URL("https://gd2.line.naver.jp/Q"); 51 | HttpURLConnection conn = (HttpURLConnection) myURL.openConnection(); 52 | conn.setRequestProperty("X-Line-Access", qr.verifier); 53 | conn.setRequestMethod("GET"); 54 | conn.setUseCaches(false); 55 | conn.setDoInput(true); 56 | conn.setInstanceFollowRedirects(true); 57 | conn.connect(); 58 | InputStream in; 59 | try { 60 | in = conn.getInputStream(); 61 | } catch (Exception e) { 62 | in = conn.getErrorStream(); 63 | } 64 | String encoding = conn.getContentEncoding(); 65 | if (null == encoding) { 66 | encoding = "UTF-8"; 67 | } 68 | InputStreamReader inReader = new InputStreamReader(in, encoding); 69 | BufferedReader bufReader = new BufferedReader(inReader); 70 | String result = ""; 71 | String line = null; 72 | while ((line = bufReader.readLine()) != null) { 73 | result = result + line; 74 | } 75 | JSONObject jo = new JSONObject(result); 76 | THttpClient transport1 = new THttpClient("https://gd2.line.naver.jp/api/v4p/rs"); 77 | transport1.setCustomHeader("X-Line-Application", "DESKTOPWIN\t7.18.1\tYUZU\t11.2.5"); 78 | TProtocol protocol1 = new TCompactProtocol(transport1); 79 | TalkService.Client client1 = new TalkService.Client(protocol1); 80 | transport1.open(); 81 | loginRequest req = new loginRequest() 82 | .setAccessLocation("8.8.8.8") 83 | .setE2eeVersion(0) 84 | .setType(LoginType.QRCODE.getValue()) 85 | .setKeepLoggedIn(true) 86 | .setSystemName("YUZU") 87 | .setIdentityProvider(IdentityProvider.LINE.getValue()) 88 | .setVerifier(jo.getJSONObject("result").getString("verifier")); 89 | LoginResult loginresult = client1.loginZ(req); 90 | bufReader.close(); 91 | inReader.close(); 92 | in.close(); 93 | transport.close(); 94 | authtoken = loginresult.authToken; 95 | certificate = loginresult.certificate; 96 | System.out.println("(*´ヮ`)<Login成功しました メモとかしとくことをおすすめします"); 97 | System.out.println("authtoken : "+authtoken); 98 | System.out.println("certificate : "+certificate); 99 | return loginresult; 100 | } 101 | 102 | public TalkService.Client loginWithAuthToken(String token) throws Exception{ 103 | THttpClient transport = new THttpClient("https://gd2.line.naver.jp/S4"); 104 | transport.setCustomHeader("X-Line-Application", "DESKTOPWIN\t7.18.1\tYUZU\t11.2.5"); 105 | transport.setCustomHeader("X-Line-Access",token); 106 | TProtocol protocol = new TCompactProtocol(transport); 107 | TalkService.Client myclient = new TalkService.Client(protocol); 108 | transport.open(); 109 | client = myclient; 110 | mid = myclient.getProfile().mid; 111 | return myclient; 112 | } 113 | 114 | public enum LoginBy{ 115 | CREDENTIAL, 116 | QRCODE, 117 | TOKEN 118 | } 119 | 120 | public TalkService.Client getTalkService(){ 121 | return client; 122 | } 123 | 124 | public void acceptGroupInvitation(String groupId) throws Exception{ 125 | client.acceptGroupInvitation(0,groupId); 126 | } 127 | 128 | public void leaveRoom(String roomId) throws Exception{ 129 | client.leaveRoom(0,roomId); 130 | } 131 | 132 | public void kickoutFromGroup(String gid,String mid) throws Exception{ 133 | List list = new ArrayList<>(); 134 | list.add(mid); 135 | client.kickoutFromGroup(0,gid,list); 136 | } 137 | 138 | public void leaveGroup(String groupId) throws Exception{ 139 | client.leaveGroup(0,groupId); 140 | } 141 | 142 | public Contact getContact(String id) throws Exception{ 143 | return client.getContact(id); 144 | } 145 | 146 | public Group getGroup(String groupId) throws Exception{ 147 | return client.getGroup(groupId); 148 | } 149 | 150 | public Group getCompactGroup(String groupId) throws Exception{ 151 | return client.getCompactGroup(groupId); 152 | } 153 | 154 | public List getGroupIdsInvited() throws Exception{ 155 | return client.getGroupIdsInvited(); 156 | } 157 | 158 | public List getGroupIdsJoined() throws Exception{ 159 | return client.getGroupIdsJoined(); 160 | } 161 | 162 | public Profile getProfile() throws Exception{ 163 | return client.getProfile(); 164 | } 165 | 166 | public long getLastOpRevision() throws Exception{ 167 | return client.getLastOpRevision(); 168 | } 169 | 170 | public void sendText(String to,String text) throws Exception{ 171 | client.sendMessage(0,new Message().setTo(to).setText(text)); 172 | } 173 | 174 | public void sendMessage(Message msg) throws Exception{ 175 | client.sendMessage(0,msg); 176 | } 177 | 178 | public void sendMessageWithMention(String to,String msg, ArrayList mids) throws Exception{ 179 | List contacts = client.getContacts(mids); 180 | Map map = new HashMap<>(); 181 | String message = ""; 182 | int pointer = 0; 183 | JSONArray jsonArray = new JSONArray(); 184 | for(Contact c : contacts){ 185 | String text = "@"+c.displayName; 186 | message = message + text; 187 | jsonArray.put(new JSONObject().put("S",pointer+"").put("E",(pointer + text.split("").length)+"").put("M",c.mid)); 188 | pointer = pointer + text.split("").length; 189 | } 190 | map.put("MENTION",new JSONObject().put("MENTIONEES",jsonArray).toString()); 191 | client.sendMessage(0,new Message().setTo(to).setContentMetadata(map).setText(message+msg)); 192 | } 193 | 194 | public void sendMessageWithMention(String to,String msg, ArrayList mids,String space) throws Exception{ 195 | List contacts = client.getContacts(mids); 196 | Map map = new HashMap<>(); 197 | String message = ""; 198 | int pointer = 0; 199 | JSONArray jsonArray = new JSONArray(); 200 | for(Contact c : contacts){ 201 | String text = "@"+c.displayName; 202 | message = message + text + space; 203 | jsonArray.put(new JSONObject().put("S",pointer+"").put("E",(pointer + text.split("").length)+"").put("M",c.mid)); 204 | pointer = pointer + text.split("").length + space.split("").length; 205 | } 206 | map.put("MENTION",new JSONObject().put("MENTIONEES",jsonArray).toString()); 207 | client.sendMessage(0,new Message().setTo(to).setContentMetadata(map).setText(message+msg)); 208 | } 209 | 210 | public void setGroupName(String groupId,String name) throws Exception{ 211 | Group group = client.getGroup(groupId); 212 | client.updateGroup(0,new Group().setId(groupId).setPictureStatus(group.pictureStatus).setPreventedJoinByTicket(group.preventedJoinByTicket).setName(name)); 213 | } 214 | 215 | public String getGroupURL(String groupMid) throws Exception{ 216 | return client.reissueGroupTicket(groupMid); 217 | } 218 | } -------------------------------------------------------------------------------- /src/main/java/LoginResultType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum LoginResultType implements org.apache.thrift.TEnum { 13 | SUCCESS(1), 14 | REQUIRE_QRCODE(2), 15 | REQUIRE_DEVICE_CONFIRM(3), 16 | REQUIRE_SMS_CONFIRM(4); 17 | 18 | private final int value; 19 | 20 | private LoginResultType(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static LoginResultType findByValue(int value) { 36 | switch (value) { 37 | case 1: 38 | return SUCCESS; 39 | case 2: 40 | return REQUIRE_QRCODE; 41 | case 3: 42 | return REQUIRE_DEVICE_CONFIRM; 43 | case 4: 44 | return REQUIRE_SMS_CONFIRM; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/LoginType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum LoginType implements org.apache.thrift.TEnum { 13 | ID_CREDENTIAL(0), 14 | QRCODE(1), 15 | ID_CREDENTIAL_WITH_E2EE(2); 16 | 17 | private final int value; 18 | 19 | private LoginType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static LoginType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return ID_CREDENTIAL; 38 | case 1: 39 | return QRCODE; 40 | case 2: 41 | return ID_CREDENTIAL_WITH_E2EE; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/MIDType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum MIDType implements org.apache.thrift.TEnum { 13 | USER(0), 14 | ROOM(1), 15 | GROUP(2), 16 | SQUARE(3), 17 | SQUARE_CHAT(4), 18 | SQUARE_MEMBER(5), 19 | BOT(6); 20 | 21 | private final int value; 22 | 23 | private MIDType(int value) { 24 | this.value = value; 25 | } 26 | 27 | /** 28 | * Get the integer value of this enum value, as defined in the Thrift IDL. 29 | */ 30 | public int getValue() { 31 | return value; 32 | } 33 | 34 | /** 35 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 36 | * @return null if the value is not found. 37 | */ 38 | public static MIDType findByValue(int value) { 39 | switch (value) { 40 | case 0: 41 | return USER; 42 | case 1: 43 | return ROOM; 44 | case 2: 45 | return GROUP; 46 | case 3: 47 | return SQUARE; 48 | case 4: 49 | return SQUARE_CHAT; 50 | case 5: 51 | return SQUARE_MEMBER; 52 | case 6: 53 | return BOT; 54 | default: 55 | return null; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/MediaType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum MediaType implements org.apache.thrift.TEnum { 13 | AUDIO(1), 14 | VIDEO(2); 15 | 16 | private final int value; 17 | 18 | private MediaType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static MediaType findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return AUDIO; 37 | case 2: 38 | return VIDEO; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/MessageOperationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum MessageOperationType implements org.apache.thrift.TEnum { 13 | SEND_MESSAGE(1), 14 | RECEIVE_MESSAGE(2), 15 | READ_MESSAGE(3), 16 | NOTIFIED_READ_MESSAGE(4), 17 | NOTIFIED_JOIN_CHAT(5), 18 | FAILED_SEND_MESSAGE(6), 19 | SEND_CONTENT(7), 20 | SEND_CONTENT_RECEIPT(8), 21 | SEND_CHAT_REMOVED(9), 22 | REMOVE_ALL_MESSAGES(10); 23 | 24 | private final int value; 25 | 26 | private MessageOperationType(int value) { 27 | this.value = value; 28 | } 29 | 30 | /** 31 | * Get the integer value of this enum value, as defined in the Thrift IDL. 32 | */ 33 | public int getValue() { 34 | return value; 35 | } 36 | 37 | /** 38 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 39 | * @return null if the value is not found. 40 | */ 41 | public static MessageOperationType findByValue(int value) { 42 | switch (value) { 43 | case 1: 44 | return SEND_MESSAGE; 45 | case 2: 46 | return RECEIVE_MESSAGE; 47 | case 3: 48 | return READ_MESSAGE; 49 | case 4: 50 | return NOTIFIED_READ_MESSAGE; 51 | case 5: 52 | return NOTIFIED_JOIN_CHAT; 53 | case 6: 54 | return FAILED_SEND_MESSAGE; 55 | case 7: 56 | return SEND_CONTENT; 57 | case 8: 58 | return SEND_CONTENT_RECEIPT; 59 | case 9: 60 | return SEND_CHAT_REMOVED; 61 | case 10: 62 | return REMOVE_ALL_MESSAGES; 63 | default: 64 | return null; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/MessageRelationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum MessageRelationType implements org.apache.thrift.TEnum { 13 | FORWARD(0), 14 | AUTO_REPLY(1), 15 | SUBORDINATE(2); 16 | 17 | private final int value; 18 | 19 | private MessageRelationType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static MessageRelationType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return FORWARD; 38 | case 1: 39 | return AUTO_REPLY; 40 | case 2: 41 | return SUBORDINATE; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/ModificationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ModificationType implements org.apache.thrift.TEnum { 13 | ADD(0), 14 | REMOVE(1), 15 | MODIFY(2); 16 | 17 | private final int value; 18 | 19 | private ModificationType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static ModificationType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return ADD; 38 | case 1: 39 | return REMOVE; 40 | case 2: 41 | return MODIFY; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/NotificationItemFetchMode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum NotificationItemFetchMode implements org.apache.thrift.TEnum { 13 | ALL(0), 14 | APPEND(1); 15 | 16 | private final int value; 17 | 18 | private NotificationItemFetchMode(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static NotificationItemFetchMode findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return ALL; 37 | case 1: 38 | return APPEND; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/NotificationQueueType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum NotificationQueueType implements org.apache.thrift.TEnum { 13 | GLOBAL(1), 14 | MESSAGE(2), 15 | PRIMARY(3); 16 | 17 | private final int value; 18 | 19 | private NotificationQueueType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static NotificationQueueType findByValue(int value) { 35 | switch (value) { 36 | case 1: 37 | return GLOBAL; 38 | case 2: 39 | return MESSAGE; 40 | case 3: 41 | return PRIMARY; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/NotificationStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum NotificationStatus implements org.apache.thrift.TEnum { 13 | NOTIFICATION_ITEM_EXIST(1), 14 | TIMELINE_ITEM_EXIST(2), 15 | NOTE_GROUP_NEW_ITEM_EXIST(4), 16 | TIMELINE_BUDDYGROUP_CHANGED(8), 17 | NOTE_ONE_TO_ONE_NEW_ITEM_EXIST(16), 18 | ALBUM_ITEM_EXIST(32), 19 | TIMELINE_ITEM_DELETED(64), 20 | OTOGROUP_ITEM_EXIST(128), 21 | GROUPHOME_NEW_ITEM_EXIST(256), 22 | GROUPHOME_HIDDEN_ITEM_CHANGED(512), 23 | NOTIFICATION_ITEM_CHANGED(1024), 24 | BEAD_ITEM_HIDE(2048), 25 | BEAD_ITEM_SHOW(4096); 26 | 27 | private final int value; 28 | 29 | private NotificationStatus(int value) { 30 | this.value = value; 31 | } 32 | 33 | /** 34 | * Get the integer value of this enum value, as defined in the Thrift IDL. 35 | */ 36 | public int getValue() { 37 | return value; 38 | } 39 | 40 | /** 41 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 42 | * @return null if the value is not found. 43 | */ 44 | public static NotificationStatus findByValue(int value) { 45 | switch (value) { 46 | case 1: 47 | return NOTIFICATION_ITEM_EXIST; 48 | case 2: 49 | return TIMELINE_ITEM_EXIST; 50 | case 4: 51 | return NOTE_GROUP_NEW_ITEM_EXIST; 52 | case 8: 53 | return TIMELINE_BUDDYGROUP_CHANGED; 54 | case 16: 55 | return NOTE_ONE_TO_ONE_NEW_ITEM_EXIST; 56 | case 32: 57 | return ALBUM_ITEM_EXIST; 58 | case 64: 59 | return TIMELINE_ITEM_DELETED; 60 | case 128: 61 | return OTOGROUP_ITEM_EXIST; 62 | case 256: 63 | return GROUPHOME_NEW_ITEM_EXIST; 64 | case 512: 65 | return GROUPHOME_HIDDEN_ITEM_CHANGED; 66 | case 1024: 67 | return NOTIFICATION_ITEM_CHANGED; 68 | case 2048: 69 | return BEAD_ITEM_HIDE; 70 | case 4096: 71 | return BEAD_ITEM_SHOW; 72 | default: 73 | return null; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/NotificationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum NotificationType implements org.apache.thrift.TEnum { 13 | APPLE_APNS(1), 14 | GOOGLE_C2DM(2), 15 | NHN_NNI(3), 16 | SKT_AOM(4), 17 | MS_MPNS(5), 18 | RIM_BIS(6), 19 | GOOGLE_GCM(7), 20 | NOKIA_NNAPI(8), 21 | TIZEN(9), 22 | LINE_BOT(17), 23 | LINE_WAP(18), 24 | APPLE_APNS_VOIP(19), 25 | MS_WNS(20), 26 | GOOGLE_FCM(21); 27 | 28 | private final int value; 29 | 30 | private NotificationType(int value) { 31 | this.value = value; 32 | } 33 | 34 | /** 35 | * Get the integer value of this enum value, as defined in the Thrift IDL. 36 | */ 37 | public int getValue() { 38 | return value; 39 | } 40 | 41 | /** 42 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 43 | * @return null if the value is not found. 44 | */ 45 | public static NotificationType findByValue(int value) { 46 | switch (value) { 47 | case 1: 48 | return APPLE_APNS; 49 | case 2: 50 | return GOOGLE_C2DM; 51 | case 3: 52 | return NHN_NNI; 53 | case 4: 54 | return SKT_AOM; 55 | case 5: 56 | return MS_MPNS; 57 | case 6: 58 | return RIM_BIS; 59 | case 7: 60 | return GOOGLE_GCM; 61 | case 8: 62 | return NOKIA_NNAPI; 63 | case 9: 64 | return TIZEN; 65 | case 17: 66 | return LINE_BOT; 67 | case 18: 68 | return LINE_WAP; 69 | case 19: 70 | return APPLE_APNS_VOIP; 71 | case 20: 72 | return MS_WNS; 73 | case 21: 74 | return GOOGLE_FCM; 75 | default: 76 | return null; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/OpStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum OpStatus implements org.apache.thrift.TEnum { 13 | NORMAL(0), 14 | ALERT_DISABLED(1), 15 | ALWAYS(2); 16 | 17 | private final int value; 18 | 19 | private OpStatus(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static OpStatus findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return NORMAL; 38 | case 1: 39 | return ALERT_DISABLED; 40 | case 2: 41 | return ALWAYS; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/PayloadType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum PayloadType implements org.apache.thrift.TEnum { 13 | PAYLOAD_BUY(101), 14 | PAYLOAD_CS(111), 15 | PAYLOAD_BONUS(121), 16 | PAYLOAD_EVENT(131); 17 | 18 | private final int value; 19 | 20 | private PayloadType(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static PayloadType findByValue(int value) { 36 | switch (value) { 37 | case 101: 38 | return PAYLOAD_BUY; 39 | case 111: 40 | return PAYLOAD_CS; 41 | case 121: 42 | return PAYLOAD_BONUS; 43 | case 131: 44 | return PAYLOAD_EVENT; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/PaymentPgType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum PaymentPgType implements org.apache.thrift.TEnum { 13 | PAYMENT_PG_NONE(0), 14 | PAYMENT_PG_AU(1), 15 | PAYMENT_PG_AL(2); 16 | 17 | private final int value; 18 | 19 | private PaymentPgType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static PaymentPgType findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return PAYMENT_PG_NONE; 38 | case 1: 39 | return PAYMENT_PG_AU; 40 | case 2: 41 | return PAYMENT_PG_AL; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/PaymentType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum PaymentType implements org.apache.thrift.TEnum { 13 | PAYMENT_APPLE(1), 14 | PAYMENT_GOOGLE(2); 15 | 16 | private final int value; 17 | 18 | private PaymentType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static PaymentType findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return PAYMENT_APPLE; 37 | case 2: 38 | return PAYMENT_GOOGLE; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/PreconditionFailedExtraInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum PreconditionFailedExtraInfo implements org.apache.thrift.TEnum { 13 | DUPLICATED_DISPLAY_NAME(0); 14 | 15 | private final int value; 16 | 17 | private PreconditionFailedExtraInfo(int value) { 18 | this.value = value; 19 | } 20 | 21 | /** 22 | * Get the integer value of this enum value, as defined in the Thrift IDL. 23 | */ 24 | public int getValue() { 25 | return value; 26 | } 27 | 28 | /** 29 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 30 | * @return null if the value is not found. 31 | */ 32 | public static PreconditionFailedExtraInfo findByValue(int value) { 33 | switch (value) { 34 | case 0: 35 | return DUPLICATED_DISPLAY_NAME; 36 | default: 37 | return null; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/ProductBannerLinkType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ProductBannerLinkType implements org.apache.thrift.TEnum { 13 | BANNER_LINK_NONE(0), 14 | BANNER_LINK_ITEM(1), 15 | BANNER_LINK_URL(2), 16 | BANNER_LINK_CATEGORY(3); 17 | 18 | private final int value; 19 | 20 | private ProductBannerLinkType(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static ProductBannerLinkType findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return BANNER_LINK_NONE; 39 | case 1: 40 | return BANNER_LINK_ITEM; 41 | case 2: 42 | return BANNER_LINK_URL; 43 | case 3: 44 | return BANNER_LINK_CATEGORY; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/ProductEventType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ProductEventType implements org.apache.thrift.TEnum { 13 | NO_EVENT(0), 14 | CARRIER_ANY(65537), 15 | BUDDY_ANY(131073), 16 | INSTALL_IOS(196609), 17 | INSTALL_ANDROID(196610), 18 | MISSION_ANY(262145), 19 | MUSTBUY_ANY(327681); 20 | 21 | private final int value; 22 | 23 | private ProductEventType(int value) { 24 | this.value = value; 25 | } 26 | 27 | /** 28 | * Get the integer value of this enum value, as defined in the Thrift IDL. 29 | */ 30 | public int getValue() { 31 | return value; 32 | } 33 | 34 | /** 35 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 36 | * @return null if the value is not found. 37 | */ 38 | public static ProductEventType findByValue(int value) { 39 | switch (value) { 40 | case 0: 41 | return NO_EVENT; 42 | case 65537: 43 | return CARRIER_ANY; 44 | case 131073: 45 | return BUDDY_ANY; 46 | case 196609: 47 | return INSTALL_IOS; 48 | case 196610: 49 | return INSTALL_ANDROID; 50 | case 262145: 51 | return MISSION_ANY; 52 | case 327681: 53 | return MUSTBUY_ANY; 54 | default: 55 | return null; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/ProfileAttribute.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ProfileAttribute implements org.apache.thrift.TEnum { 13 | ALL(511), 14 | EMAIL(1), 15 | DISPLAY_NAME(2), 16 | PHONETIC_NAME(4), 17 | PICTURE(8), 18 | STATUS_MESSAGE(16), 19 | ALLOW_SEARCH_BY_USERID(32), 20 | ALLOW_SEARCH_BY_EMAIL(64), 21 | BUDDY_STATUS(128), 22 | MUSIC_PROFILE(256); 23 | 24 | private final int value; 25 | 26 | private ProfileAttribute(int value) { 27 | this.value = value; 28 | } 29 | 30 | /** 31 | * Get the integer value of this enum value, as defined in the Thrift IDL. 32 | */ 33 | public int getValue() { 34 | return value; 35 | } 36 | 37 | /** 38 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 39 | * @return null if the value is not found. 40 | */ 41 | public static ProfileAttribute findByValue(int value) { 42 | switch (value) { 43 | case 511: 44 | return ALL; 45 | case 1: 46 | return EMAIL; 47 | case 2: 48 | return DISPLAY_NAME; 49 | case 4: 50 | return PHONETIC_NAME; 51 | case 8: 52 | return PICTURE; 53 | case 16: 54 | return STATUS_MESSAGE; 55 | case 32: 56 | return ALLOW_SEARCH_BY_USERID; 57 | case 64: 58 | return ALLOW_SEARCH_BY_EMAIL; 59 | case 128: 60 | return BUDDY_STATUS; 61 | case 256: 62 | return MUSIC_PROFILE; 63 | default: 64 | return null; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/PublicType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum PublicType implements org.apache.thrift.TEnum { 13 | HIDDEN(0), 14 | PUBLIC(1000); 15 | 16 | private final int value; 17 | 18 | private PublicType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static PublicType findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return HIDDEN; 37 | case 1000: 38 | return PUBLIC; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/RedirectType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum RedirectType implements org.apache.thrift.TEnum { 13 | NONE(0), 14 | EXPIRE_SECOND(1); 15 | 16 | private final int value; 17 | 18 | private RedirectType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static RedirectType findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return NONE; 37 | case 1: 38 | return EXPIRE_SECOND; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/RegistrationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum RegistrationType implements org.apache.thrift.TEnum { 13 | PHONE(0), 14 | EMAIL_WAP(1), 15 | FACEBOOK(2305), 16 | SINA(2306), 17 | RENREN(2307), 18 | FEIXIN(2308); 19 | 20 | private final int value; 21 | 22 | private RegistrationType(int value) { 23 | this.value = value; 24 | } 25 | 26 | /** 27 | * Get the integer value of this enum value, as defined in the Thrift IDL. 28 | */ 29 | public int getValue() { 30 | return value; 31 | } 32 | 33 | /** 34 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 35 | * @return null if the value is not found. 36 | */ 37 | public static RegistrationType findByValue(int value) { 38 | switch (value) { 39 | case 0: 40 | return PHONE; 41 | case 1: 42 | return EMAIL_WAP; 43 | case 2305: 44 | return FACEBOOK; 45 | case 2306: 46 | return SINA; 47 | case 2307: 48 | return RENREN; 49 | case 2308: 50 | return FEIXIN; 51 | default: 52 | return null; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/ReportCategory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ReportCategory implements org.apache.thrift.TEnum { 13 | PUSH_NORMAL_PLAIN(0), 14 | PUSH_NORMAL_E2EE(1), 15 | PUSH_VOIP_PLAIN(2), 16 | PUSH_VOIP_E2EE(3); 17 | 18 | private final int value; 19 | 20 | private ReportCategory(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static ReportCategory findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return PUSH_NORMAL_PLAIN; 39 | case 1: 40 | return PUSH_NORMAL_E2EE; 41 | case 2: 42 | return PUSH_VOIP_PLAIN; 43 | case 3: 44 | return PUSH_VOIP_E2EE; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/SQErrorCode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SQErrorCode implements org.apache.thrift.TEnum { 13 | UNKNOWN(0), 14 | ILLEGAL_ARGUMENT(400), 15 | AUTHENTICATION_FAILURE(401), 16 | FORBIDDEN(403), 17 | NOT_FOUND(404), 18 | REVISION_MISMATCH(409), 19 | PRECONDITION_FAILED(410), 20 | INTERNAL_ERROR(500), 21 | NOT_IMPLEMENTED(501), 22 | TRY_AGAIN_LATER(505); 23 | 24 | private final int value; 25 | 26 | private SQErrorCode(int value) { 27 | this.value = value; 28 | } 29 | 30 | /** 31 | * Get the integer value of this enum value, as defined in the Thrift IDL. 32 | */ 33 | public int getValue() { 34 | return value; 35 | } 36 | 37 | /** 38 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 39 | * @return null if the value is not found. 40 | */ 41 | public static SQErrorCode findByValue(int value) { 42 | switch (value) { 43 | case 0: 44 | return UNKNOWN; 45 | case 400: 46 | return ILLEGAL_ARGUMENT; 47 | case 401: 48 | return AUTHENTICATION_FAILURE; 49 | case 403: 50 | return FORBIDDEN; 51 | case 404: 52 | return NOT_FOUND; 53 | case 409: 54 | return REVISION_MISMATCH; 55 | case 410: 56 | return PRECONDITION_FAILED; 57 | case 500: 58 | return INTERNAL_ERROR; 59 | case 501: 60 | return NOT_IMPLEMENTED; 61 | case 505: 62 | return TRY_AGAIN_LATER; 63 | default: 64 | return null; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/SecurityCenterSettingsType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SecurityCenterSettingsType implements org.apache.thrift.TEnum { 13 | NOT_APPLICABLE(0), 14 | NOT_SET(1), 15 | SET(2), 16 | NEED_ENFORCED_INPUT(3); 17 | 18 | private final int value; 19 | 20 | private SecurityCenterSettingsType(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static SecurityCenterSettingsType findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return NOT_APPLICABLE; 39 | case 1: 40 | return NOT_SET; 41 | case 2: 42 | return SET; 43 | case 3: 44 | return NEED_ENFORCED_INPUT; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/ServiceCode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum ServiceCode implements org.apache.thrift.TEnum { 13 | UNKNOWN(0), 14 | TALK(1), 15 | SQUARE(2); 16 | 17 | private final int value; 18 | 19 | private ServiceCode(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static ServiceCode findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return UNKNOWN; 38 | case 1: 39 | return TALK; 40 | case 2: 41 | return SQUARE; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/SettingsAttribute.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SettingsAttribute implements org.apache.thrift.TEnum { 13 | ALL(2147483647), 14 | NOTIFICATION_ENABLE(1), 15 | NOTIFICATION_MUTE_EXPIRATION(2), 16 | NOTIFICATION_NEW_MESSAGE(4), 17 | NOTIFICATION_GROUP_INVITATION(8), 18 | NOTIFICATION_SHOW_MESSAGE(16), 19 | NOTIFICATION_INCOMING_CALL(32), 20 | NOTIFICATION_SOUND_MESSAGE(256), 21 | NOTIFICATION_SOUND_GROUP(512), 22 | NOTIFICATION_DISABLED_WITH_SUB(65536), 23 | NOTIFICATION_PAYMENT(131072), 24 | PRIVACY_SYNC_CONTACTS(64), 25 | PRIVACY_SEARCH_BY_PHONE_NUMBER(128), 26 | PRIVACY_SEARCH_BY_USERID(8192), 27 | PRIVACY_SEARCH_BY_EMAIL(16384), 28 | PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN(2097152), 29 | PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME(8388608), 30 | PRIVACY_ALLOW_FRIEND_REQUEST(1073741824), 31 | PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND(33554432), 32 | PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL(67108864), 33 | PRIVACY_AGREE_USE_PAIDCALL(134217728), 34 | CONTACT_MY_TICKET(1024), 35 | IDENTITY_PROVIDER(2048), 36 | IDENTITY_IDENTIFIER(4096), 37 | SNS_ACCOUNT(524288), 38 | PHONE_REGISTRATION(1048576), 39 | PREFERENCE_LOCALE(32768), 40 | CUSTOM_MODE(4194304), 41 | EMAIL_CONFIRMATION_STATUS(16777216), 42 | ACCOUNT_MIGRATION_PINCODE(268435456), 43 | ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE(536870912), 44 | SECURITY_CENTER_SETTINGS(262144); 45 | 46 | private final int value; 47 | 48 | private SettingsAttribute(int value) { 49 | this.value = value; 50 | } 51 | 52 | /** 53 | * Get the integer value of this enum value, as defined in the Thrift IDL. 54 | */ 55 | public int getValue() { 56 | return value; 57 | } 58 | 59 | /** 60 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 61 | * @return null if the value is not found. 62 | */ 63 | public static SettingsAttribute findByValue(int value) { 64 | switch (value) { 65 | case 2147483647: 66 | return ALL; 67 | case 1: 68 | return NOTIFICATION_ENABLE; 69 | case 2: 70 | return NOTIFICATION_MUTE_EXPIRATION; 71 | case 4: 72 | return NOTIFICATION_NEW_MESSAGE; 73 | case 8: 74 | return NOTIFICATION_GROUP_INVITATION; 75 | case 16: 76 | return NOTIFICATION_SHOW_MESSAGE; 77 | case 32: 78 | return NOTIFICATION_INCOMING_CALL; 79 | case 256: 80 | return NOTIFICATION_SOUND_MESSAGE; 81 | case 512: 82 | return NOTIFICATION_SOUND_GROUP; 83 | case 65536: 84 | return NOTIFICATION_DISABLED_WITH_SUB; 85 | case 131072: 86 | return NOTIFICATION_PAYMENT; 87 | case 64: 88 | return PRIVACY_SYNC_CONTACTS; 89 | case 128: 90 | return PRIVACY_SEARCH_BY_PHONE_NUMBER; 91 | case 8192: 92 | return PRIVACY_SEARCH_BY_USERID; 93 | case 16384: 94 | return PRIVACY_SEARCH_BY_EMAIL; 95 | case 2097152: 96 | return PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN; 97 | case 8388608: 98 | return PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME; 99 | case 1073741824: 100 | return PRIVACY_ALLOW_FRIEND_REQUEST; 101 | case 33554432: 102 | return PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND; 103 | case 67108864: 104 | return PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL; 105 | case 134217728: 106 | return PRIVACY_AGREE_USE_PAIDCALL; 107 | case 1024: 108 | return CONTACT_MY_TICKET; 109 | case 2048: 110 | return IDENTITY_PROVIDER; 111 | case 4096: 112 | return IDENTITY_IDENTIFIER; 113 | case 524288: 114 | return SNS_ACCOUNT; 115 | case 1048576: 116 | return PHONE_REGISTRATION; 117 | case 32768: 118 | return PREFERENCE_LOCALE; 119 | case 4194304: 120 | return CUSTOM_MODE; 121 | case 16777216: 122 | return EMAIL_CONFIRMATION_STATUS; 123 | case 268435456: 124 | return ACCOUNT_MIGRATION_PINCODE; 125 | case 536870912: 126 | return ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE; 127 | case 262144: 128 | return SECURITY_CENTER_SETTINGS; 129 | default: 130 | return null; 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /src/main/java/SettingsAttributeEx.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SettingsAttributeEx implements org.apache.thrift.TEnum { 13 | NOTIFICATION_ENABLE(0), 14 | NOTIFICATION_MUTE_EXPIRATION(1), 15 | NOTIFICATION_NEW_MESSAGE(2), 16 | NOTIFICATION_GROUP_INVITATION(3), 17 | NOTIFICATION_SHOW_MESSAGE(4), 18 | NOTIFICATION_INCOMING_CALL(5), 19 | NOTIFICATION_SOUND_MESSAGE(8), 20 | NOTIFICATION_SOUND_GROUP(9), 21 | NOTIFICATION_DISABLED_WITH_SUB(16), 22 | NOTIFICATION_PAYMENT(17), 23 | NOTIFICATION_MENTION(40), 24 | NOTIFICATION_THUMBNAIL(45), 25 | PRIVACY_SYNC_CONTACTS(6), 26 | PRIVACY_SEARCH_BY_PHONE_NUMBER(7), 27 | PRIVACY_SEARCH_BY_USERID(13), 28 | PRIVACY_SEARCH_BY_EMAIL(14), 29 | PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN(21), 30 | PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME(23), 31 | PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME(35), 32 | PRIVACY_ALLOW_FRIEND_REQUEST(30), 33 | PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND(25), 34 | PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL(26), 35 | PRIVACY_AGREE_USE_PAIDCALL(27), 36 | CONTACT_MY_TICKET(10), 37 | IDENTITY_PROVIDER(11), 38 | IDENTITY_IDENTIFIER(12), 39 | SNS_ACCOUNT(19), 40 | PHONE_REGISTRATION(20), 41 | PREFERENCE_LOCALE(15), 42 | CUSTOM_MODE(22), 43 | EMAIL_CONFIRMATION_STATUS(24), 44 | ACCOUNT_MIGRATION_PINCODE(28), 45 | ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE(29), 46 | SECURITY_CENTER_SETTINGS(18), 47 | E2EE_ENABLE(33), 48 | ENABLE_SOUND_TO_TEXT(47), 49 | HITOKOTO_BACKUP_REQUESTED(34), 50 | CONTACT_ALLOW_FOLLOWING(36), 51 | PRIVACY_ALLOW_NEARBY(37), 52 | AGREEMENT_NEARBY(38), 53 | AGREEMENT_SQUARE(39), 54 | ALLOW_UNREGISTRATION_SECONDARY_DEVICE(41), 55 | AGREEMENT_BOT_USE(42), 56 | AGREEMENT_SHAKE_FUNCTION(43), 57 | AGREEMENT_MOBILE_CONTACT_NAME(44), 58 | AGREEMENT_SOUND_TO_TEXT(46); 59 | 60 | private final int value; 61 | 62 | private SettingsAttributeEx(int value) { 63 | this.value = value; 64 | } 65 | 66 | /** 67 | * Get the integer value of this enum value, as defined in the Thrift IDL. 68 | */ 69 | public int getValue() { 70 | return value; 71 | } 72 | 73 | /** 74 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 75 | * @return null if the value is not found. 76 | */ 77 | public static SettingsAttributeEx findByValue(int value) { 78 | switch (value) { 79 | case 0: 80 | return NOTIFICATION_ENABLE; 81 | case 1: 82 | return NOTIFICATION_MUTE_EXPIRATION; 83 | case 2: 84 | return NOTIFICATION_NEW_MESSAGE; 85 | case 3: 86 | return NOTIFICATION_GROUP_INVITATION; 87 | case 4: 88 | return NOTIFICATION_SHOW_MESSAGE; 89 | case 5: 90 | return NOTIFICATION_INCOMING_CALL; 91 | case 8: 92 | return NOTIFICATION_SOUND_MESSAGE; 93 | case 9: 94 | return NOTIFICATION_SOUND_GROUP; 95 | case 16: 96 | return NOTIFICATION_DISABLED_WITH_SUB; 97 | case 17: 98 | return NOTIFICATION_PAYMENT; 99 | case 40: 100 | return NOTIFICATION_MENTION; 101 | case 45: 102 | return NOTIFICATION_THUMBNAIL; 103 | case 6: 104 | return PRIVACY_SYNC_CONTACTS; 105 | case 7: 106 | return PRIVACY_SEARCH_BY_PHONE_NUMBER; 107 | case 13: 108 | return PRIVACY_SEARCH_BY_USERID; 109 | case 14: 110 | return PRIVACY_SEARCH_BY_EMAIL; 111 | case 21: 112 | return PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN; 113 | case 23: 114 | return PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME; 115 | case 35: 116 | return PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME; 117 | case 30: 118 | return PRIVACY_ALLOW_FRIEND_REQUEST; 119 | case 25: 120 | return PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND; 121 | case 26: 122 | return PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL; 123 | case 27: 124 | return PRIVACY_AGREE_USE_PAIDCALL; 125 | case 10: 126 | return CONTACT_MY_TICKET; 127 | case 11: 128 | return IDENTITY_PROVIDER; 129 | case 12: 130 | return IDENTITY_IDENTIFIER; 131 | case 19: 132 | return SNS_ACCOUNT; 133 | case 20: 134 | return PHONE_REGISTRATION; 135 | case 15: 136 | return PREFERENCE_LOCALE; 137 | case 22: 138 | return CUSTOM_MODE; 139 | case 24: 140 | return EMAIL_CONFIRMATION_STATUS; 141 | case 28: 142 | return ACCOUNT_MIGRATION_PINCODE; 143 | case 29: 144 | return ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE; 145 | case 18: 146 | return SECURITY_CENTER_SETTINGS; 147 | case 33: 148 | return E2EE_ENABLE; 149 | case 47: 150 | return ENABLE_SOUND_TO_TEXT; 151 | case 34: 152 | return HITOKOTO_BACKUP_REQUESTED; 153 | case 36: 154 | return CONTACT_ALLOW_FOLLOWING; 155 | case 37: 156 | return PRIVACY_ALLOW_NEARBY; 157 | case 38: 158 | return AGREEMENT_NEARBY; 159 | case 39: 160 | return AGREEMENT_SQUARE; 161 | case 41: 162 | return ALLOW_UNREGISTRATION_SECONDARY_DEVICE; 163 | case 42: 164 | return AGREEMENT_BOT_USE; 165 | case 43: 166 | return AGREEMENT_SHAKE_FUNCTION; 167 | case 44: 168 | return AGREEMENT_MOBILE_CONTACT_NAME; 169 | case 46: 170 | return AGREEMENT_SOUND_TO_TEXT; 171 | default: 172 | return null; 173 | } 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /src/main/java/SnsIdType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SnsIdType implements org.apache.thrift.TEnum { 13 | FACEBOOK(1), 14 | SINA(2), 15 | RENREN(3), 16 | FEIXIN(4), 17 | BBM(5); 18 | 19 | private final int value; 20 | 21 | private SnsIdType(int value) { 22 | this.value = value; 23 | } 24 | 25 | /** 26 | * Get the integer value of this enum value, as defined in the Thrift IDL. 27 | */ 28 | public int getValue() { 29 | return value; 30 | } 31 | 32 | /** 33 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 34 | * @return null if the value is not found. 35 | */ 36 | public static SnsIdType findByValue(int value) { 37 | switch (value) { 38 | case 1: 39 | return FACEBOOK; 40 | case 2: 41 | return SINA; 42 | case 3: 43 | return RENREN; 44 | case 4: 45 | return FEIXIN; 46 | case 5: 47 | return BBM; 48 | default: 49 | return null; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/SpammerReason.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SpammerReason implements org.apache.thrift.TEnum { 13 | OTHER(0), 14 | ADVERTISING(1), 15 | GENDER_HARASSMENT(2), 16 | HARASSMENT(3); 17 | 18 | private final int value; 19 | 20 | private SpammerReason(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static SpammerReason findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return OTHER; 39 | case 1: 40 | return ADVERTISING; 41 | case 2: 42 | return GENDER_HARASSMENT; 43 | case 3: 44 | return HARASSMENT; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/SquareChatMembershipState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareChatMembershipState implements org.apache.thrift.TEnum { 13 | JOINED(1), 14 | LEFT(2); 15 | 16 | private final int value; 17 | 18 | private SquareChatMembershipState(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static SquareChatMembershipState findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return JOINED; 37 | case 2: 38 | return LEFT; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/SquareChatState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareChatState implements org.apache.thrift.TEnum { 13 | ALIVE(0), 14 | DELETED(1), 15 | SUSPENDED(2); 16 | 17 | private final int value; 18 | 19 | private SquareChatState(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static SquareChatState findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return ALIVE; 38 | case 1: 39 | return DELETED; 40 | case 2: 41 | return SUSPENDED; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/SquareChatType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareChatType implements org.apache.thrift.TEnum { 13 | OPEN(1), 14 | SECRET(2), 15 | ONE_ON_ONE(3), 16 | SQUARE_DEFAULT(4); 17 | 18 | private final int value; 19 | 20 | private SquareChatType(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static SquareChatType findByValue(int value) { 36 | switch (value) { 37 | case 1: 38 | return OPEN; 39 | case 2: 40 | return SECRET; 41 | case 3: 42 | return ONE_ON_ONE; 43 | case 4: 44 | return SQUARE_DEFAULT; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/SquareEventStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareEventStatus implements org.apache.thrift.TEnum { 13 | NORMAL(1), 14 | ALERT_DISABLED(2); 15 | 16 | private final int value; 17 | 18 | private SquareEventStatus(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static SquareEventStatus findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return NORMAL; 37 | case 2: 38 | return ALERT_DISABLED; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/SquareEventType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareEventType implements org.apache.thrift.TEnum { 13 | RECEIVE_MESSAGE(0), 14 | SEND_MESSAGE(1), 15 | NOTIFIED_JOIN_SQUARE_CHAT(2), 16 | NOTIFIED_INVITE_INTO_SQUARE_CHAT(3), 17 | NOTIFIED_LEAVE_SQUARE_CHAT(4), 18 | NOTIFIED_DESTROY_MESSAGE(5), 19 | NOTIFIED_MARK_AS_READ(6), 20 | NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE(7), 21 | NOTIFIED_KICKOUT_FROM_SQUARE(19), 22 | NOTIFIED_SHUTDOWN_SQUARE(18), 23 | NOTIFIED_DELETE_SQUARE_CHAT(20), 24 | NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME(30), 25 | NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE(31), 26 | NOTIFIED_UPDATE_SQUARE(8), 27 | NOTIFIED_UPDATE_SQUARE_STATUS(9), 28 | NOTIFIED_UPDATE_SQUARE_AUTHORITY(10), 29 | NOTIFIED_UPDATE_SQUARE_MEMBER(11), 30 | NOTIFIED_UPDATE_SQUARE_CHAT(12), 31 | NOTIFIED_UPDATE_SQUARE_CHAT_STATUS(13), 32 | NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER(14), 33 | NOTIFIED_CREATE_SQUARE_MEMBER(15), 34 | NOTIFIED_CREATE_SQUARE_CHAT_MEMBER(16), 35 | NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION(17), 36 | NOTIFIED_UPDATE_SQUARE_FEATURE_SET(32), 37 | NOTIFICATION_JOIN_REQUEST(21), 38 | NOTIFICATION_JOINED(22), 39 | NOTIFICATION_PROMOTED_COADMIN(23), 40 | NOTIFICATION_PROMOTED_ADMIN(24), 41 | NOTIFICATION_DEMOTED_MEMBER(25), 42 | NOTIFICATION_KICKED_OUT(26), 43 | NOTIFICATION_SQUARE_DELETE(27), 44 | NOTIFICATION_SQUARE_CHAT_DELETE(28), 45 | NOTIFICATION_MESSAGE(29); 46 | 47 | private final int value; 48 | 49 | private SquareEventType(int value) { 50 | this.value = value; 51 | } 52 | 53 | /** 54 | * Get the integer value of this enum value, as defined in the Thrift IDL. 55 | */ 56 | public int getValue() { 57 | return value; 58 | } 59 | 60 | /** 61 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 62 | * @return null if the value is not found. 63 | */ 64 | public static SquareEventType findByValue(int value) { 65 | switch (value) { 66 | case 0: 67 | return RECEIVE_MESSAGE; 68 | case 1: 69 | return SEND_MESSAGE; 70 | case 2: 71 | return NOTIFIED_JOIN_SQUARE_CHAT; 72 | case 3: 73 | return NOTIFIED_INVITE_INTO_SQUARE_CHAT; 74 | case 4: 75 | return NOTIFIED_LEAVE_SQUARE_CHAT; 76 | case 5: 77 | return NOTIFIED_DESTROY_MESSAGE; 78 | case 6: 79 | return NOTIFIED_MARK_AS_READ; 80 | case 7: 81 | return NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE; 82 | case 19: 83 | return NOTIFIED_KICKOUT_FROM_SQUARE; 84 | case 18: 85 | return NOTIFIED_SHUTDOWN_SQUARE; 86 | case 20: 87 | return NOTIFIED_DELETE_SQUARE_CHAT; 88 | case 30: 89 | return NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME; 90 | case 31: 91 | return NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE; 92 | case 8: 93 | return NOTIFIED_UPDATE_SQUARE; 94 | case 9: 95 | return NOTIFIED_UPDATE_SQUARE_STATUS; 96 | case 10: 97 | return NOTIFIED_UPDATE_SQUARE_AUTHORITY; 98 | case 11: 99 | return NOTIFIED_UPDATE_SQUARE_MEMBER; 100 | case 12: 101 | return NOTIFIED_UPDATE_SQUARE_CHAT; 102 | case 13: 103 | return NOTIFIED_UPDATE_SQUARE_CHAT_STATUS; 104 | case 14: 105 | return NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER; 106 | case 15: 107 | return NOTIFIED_CREATE_SQUARE_MEMBER; 108 | case 16: 109 | return NOTIFIED_CREATE_SQUARE_CHAT_MEMBER; 110 | case 17: 111 | return NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION; 112 | case 32: 113 | return NOTIFIED_UPDATE_SQUARE_FEATURE_SET; 114 | case 21: 115 | return NOTIFICATION_JOIN_REQUEST; 116 | case 22: 117 | return NOTIFICATION_JOINED; 118 | case 23: 119 | return NOTIFICATION_PROMOTED_COADMIN; 120 | case 24: 121 | return NOTIFICATION_PROMOTED_ADMIN; 122 | case 25: 123 | return NOTIFICATION_DEMOTED_MEMBER; 124 | case 26: 125 | return NOTIFICATION_KICKED_OUT; 126 | case 27: 127 | return NOTIFICATION_SQUARE_DELETE; 128 | case 28: 129 | return NOTIFICATION_SQUARE_CHAT_DELETE; 130 | case 29: 131 | return NOTIFICATION_MESSAGE; 132 | default: 133 | return null; 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /src/main/java/SquareFeatureControlState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareFeatureControlState implements org.apache.thrift.TEnum { 13 | DISABLED(1), 14 | ENABLED(2); 15 | 16 | private final int value; 17 | 18 | private SquareFeatureControlState(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static SquareFeatureControlState findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return DISABLED; 37 | case 2: 38 | return ENABLED; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/SquareMemberRelationState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareMemberRelationState implements org.apache.thrift.TEnum { 13 | NONE(1), 14 | BLOCKED(2); 15 | 16 | private final int value; 17 | 18 | private SquareMemberRelationState(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static SquareMemberRelationState findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return NONE; 37 | case 2: 38 | return BLOCKED; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/SquareMemberRole.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareMemberRole implements org.apache.thrift.TEnum { 13 | ADMIN(1), 14 | CO_ADMIN(2), 15 | MEMBER(10); 16 | 17 | private final int value; 18 | 19 | private SquareMemberRole(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static SquareMemberRole findByValue(int value) { 35 | switch (value) { 36 | case 1: 37 | return ADMIN; 38 | case 2: 39 | return CO_ADMIN; 40 | case 10: 41 | return MEMBER; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/SquareMembershipState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareMembershipState implements org.apache.thrift.TEnum { 13 | JOIN_REQUESTED(1), 14 | JOINED(2), 15 | REJECTED(3), 16 | LEFT(4), 17 | KICK_OUT(5), 18 | BANNED(6), 19 | DELETED(7); 20 | 21 | private final int value; 22 | 23 | private SquareMembershipState(int value) { 24 | this.value = value; 25 | } 26 | 27 | /** 28 | * Get the integer value of this enum value, as defined in the Thrift IDL. 29 | */ 30 | public int getValue() { 31 | return value; 32 | } 33 | 34 | /** 35 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 36 | * @return null if the value is not found. 37 | */ 38 | public static SquareMembershipState findByValue(int value) { 39 | switch (value) { 40 | case 1: 41 | return JOIN_REQUESTED; 42 | case 2: 43 | return JOINED; 44 | case 3: 45 | return REJECTED; 46 | case 4: 47 | return LEFT; 48 | case 5: 49 | return KICK_OUT; 50 | case 6: 51 | return BANNED; 52 | case 7: 53 | return DELETED; 54 | default: 55 | return null; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/SquareType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SquareType implements org.apache.thrift.TEnum { 13 | CLOSED(0), 14 | OPEN(1); 15 | 16 | private final int value; 17 | 18 | private SquareType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static SquareType findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return CLOSED; 37 | case 1: 38 | return OPEN; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/StickerResourceType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum StickerResourceType implements org.apache.thrift.TEnum { 13 | STATIC(1), 14 | ANIMATION(2), 15 | SOUND(3), 16 | ANIMATION_SOUND(4), 17 | POPUP(5), 18 | POPUP_SOUND(6); 19 | 20 | private final int value; 21 | 22 | private StickerResourceType(int value) { 23 | this.value = value; 24 | } 25 | 26 | /** 27 | * Get the integer value of this enum value, as defined in the Thrift IDL. 28 | */ 29 | public int getValue() { 30 | return value; 31 | } 32 | 33 | /** 34 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 35 | * @return null if the value is not found. 36 | */ 37 | public static StickerResourceType findByValue(int value) { 38 | switch (value) { 39 | case 1: 40 | return STATIC; 41 | case 2: 42 | return ANIMATION; 43 | case 3: 44 | return SOUND; 45 | case 4: 46 | return ANIMATION_SOUND; 47 | case 5: 48 | return POPUP; 49 | case 6: 50 | return POPUP_SOUND; 51 | default: 52 | return null; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/SyncActionType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SyncActionType implements org.apache.thrift.TEnum { 13 | SYNC(0), 14 | REPORT(1); 15 | 16 | private final int value; 17 | 18 | private SyncActionType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static SyncActionType findByValue(int value) { 34 | switch (value) { 35 | case 0: 36 | return SYNC; 37 | case 1: 38 | return REPORT; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/SyncCategory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SyncCategory implements org.apache.thrift.TEnum { 13 | PROFILE(0), 14 | SETTINGS(1), 15 | OPS(2), 16 | CONTACT(3), 17 | RECOMMEND(4), 18 | BLOCK(5), 19 | GROUP(6), 20 | ROOM(7), 21 | NOTIFICATION(8); 22 | 23 | private final int value; 24 | 25 | private SyncCategory(int value) { 26 | this.value = value; 27 | } 28 | 29 | /** 30 | * Get the integer value of this enum value, as defined in the Thrift IDL. 31 | */ 32 | public int getValue() { 33 | return value; 34 | } 35 | 36 | /** 37 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 38 | * @return null if the value is not found. 39 | */ 40 | public static SyncCategory findByValue(int value) { 41 | switch (value) { 42 | case 0: 43 | return PROFILE; 44 | case 1: 45 | return SETTINGS; 46 | case 2: 47 | return OPS; 48 | case 3: 49 | return CONTACT; 50 | case 4: 51 | return RECOMMEND; 52 | case 5: 53 | return BLOCK; 54 | case 6: 55 | return GROUP; 56 | case 7: 57 | return ROOM; 58 | case 8: 59 | return NOTIFICATION; 60 | default: 61 | return null; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/SyncTriggerReason.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum SyncTriggerReason implements org.apache.thrift.TEnum { 13 | OTHER(0), 14 | REVISION_GAP_TOO_LARGE(1), 15 | OPERATION_EXPIRED(2); 16 | 17 | private final int value; 18 | 19 | private SyncTriggerReason(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static SyncTriggerReason findByValue(int value) { 35 | switch (value) { 36 | case 0: 37 | return OTHER; 38 | case 1: 39 | return REVISION_GAP_TOO_LARGE; 40 | case 2: 41 | return OPERATION_EXPIRED; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/TMessageBoxStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum TMessageBoxStatus implements org.apache.thrift.TEnum { 13 | ACTIVATED(1), 14 | UNREAD(2); 15 | 16 | private final int value; 17 | 18 | private TMessageBoxStatus(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static TMessageBoxStatus findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return ACTIVATED; 37 | case 2: 38 | return UNREAD; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/UniversalNotificationServiceErrorCode.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum UniversalNotificationServiceErrorCode implements org.apache.thrift.TEnum { 13 | INTERNAL_ERROR(0), 14 | INVALID_KEY(1), 15 | ILLEGAL_ARGUMENT(2), 16 | TOO_MANY_REQUEST(3), 17 | AUTHENTICATION_FAILED(4), 18 | NO_WRITE_PERMISSION(5); 19 | 20 | private final int value; 21 | 22 | private UniversalNotificationServiceErrorCode(int value) { 23 | this.value = value; 24 | } 25 | 26 | /** 27 | * Get the integer value of this enum value, as defined in the Thrift IDL. 28 | */ 29 | public int getValue() { 30 | return value; 31 | } 32 | 33 | /** 34 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 35 | * @return null if the value is not found. 36 | */ 37 | public static UniversalNotificationServiceErrorCode findByValue(int value) { 38 | switch (value) { 39 | case 0: 40 | return INTERNAL_ERROR; 41 | case 1: 42 | return INVALID_KEY; 43 | case 2: 44 | return ILLEGAL_ARGUMENT; 45 | case 3: 46 | return TOO_MANY_REQUEST; 47 | case 4: 48 | return AUTHENTICATION_FAILED; 49 | case 5: 50 | return NO_WRITE_PERMISSION; 51 | default: 52 | return null; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/UnregistrationReason.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum UnregistrationReason implements org.apache.thrift.TEnum { 13 | UNREGISTRATION_REASON_UNREGISTER_USER(1), 14 | UNREGISTRATION_REASON_UNBIND_DEVICE(2); 15 | 16 | private final int value; 17 | 18 | private UnregistrationReason(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static UnregistrationReason findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return UNREGISTRATION_REASON_UNREGISTER_USER; 37 | case 2: 38 | return UNREGISTRATION_REASON_UNBIND_DEVICE; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/UserAgeType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum UserAgeType implements org.apache.thrift.TEnum { 13 | OVER(1), 14 | UNDER(2), 15 | UNDEFINED(3); 16 | 17 | private final int value; 18 | 19 | private UserAgeType(int value) { 20 | this.value = value; 21 | } 22 | 23 | /** 24 | * Get the integer value of this enum value, as defined in the Thrift IDL. 25 | */ 26 | public int getValue() { 27 | return value; 28 | } 29 | 30 | /** 31 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 32 | * @return null if the value is not found. 33 | */ 34 | public static UserAgeType findByValue(int value) { 35 | switch (value) { 36 | case 1: 37 | return OVER; 38 | case 2: 39 | return UNDER; 40 | case 3: 41 | return UNDEFINED; 42 | default: 43 | return null; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/VerificationMethod.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum VerificationMethod implements org.apache.thrift.TEnum { 13 | NO_AVAILABLE(0), 14 | PIN_VIA_SMS(1), 15 | CALLERID_INDIGO(2), 16 | PIN_VIA_TTS(4), 17 | SKIP(10); 18 | 19 | private final int value; 20 | 21 | private VerificationMethod(int value) { 22 | this.value = value; 23 | } 24 | 25 | /** 26 | * Get the integer value of this enum value, as defined in the Thrift IDL. 27 | */ 28 | public int getValue() { 29 | return value; 30 | } 31 | 32 | /** 33 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 34 | * @return null if the value is not found. 35 | */ 36 | public static VerificationMethod findByValue(int value) { 37 | switch (value) { 38 | case 0: 39 | return NO_AVAILABLE; 40 | case 1: 41 | return PIN_VIA_SMS; 42 | case 2: 43 | return CALLERID_INDIGO; 44 | case 4: 45 | return PIN_VIA_TTS; 46 | case 10: 47 | return SKIP; 48 | default: 49 | return null; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/VerificationResult.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum VerificationResult implements org.apache.thrift.TEnum { 13 | FAILED(0), 14 | OK_NOT_REGISTERED_YET(1), 15 | OK_REGISTERED_WITH_SAME_DEVICE(2), 16 | OK_REGISTERED_WITH_ANOTHER_DEVICE(3); 17 | 18 | private final int value; 19 | 20 | private VerificationResult(int value) { 21 | this.value = value; 22 | } 23 | 24 | /** 25 | * Get the integer value of this enum value, as defined in the Thrift IDL. 26 | */ 27 | public int getValue() { 28 | return value; 29 | } 30 | 31 | /** 32 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 33 | * @return null if the value is not found. 34 | */ 35 | public static VerificationResult findByValue(int value) { 36 | switch (value) { 37 | case 0: 38 | return FAILED; 39 | case 1: 40 | return OK_NOT_REGISTERED_YET; 41 | case 2: 42 | return OK_REGISTERED_WITH_SAME_DEVICE; 43 | case 3: 44 | return OK_REGISTERED_WITH_ANOTHER_DEVICE; 45 | default: 46 | return null; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/WapInvitationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Autogenerated by Thrift Compiler (0.9.1) 3 | * 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5 | * @generated 6 | */ 7 | 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import org.apache.thrift.TEnum; 11 | 12 | public enum WapInvitationType implements org.apache.thrift.TEnum { 13 | REGISTRATION(1), 14 | CHAT(2); 15 | 16 | private final int value; 17 | 18 | private WapInvitationType(int value) { 19 | this.value = value; 20 | } 21 | 22 | /** 23 | * Get the integer value of this enum value, as defined in the Thrift IDL. 24 | */ 25 | public int getValue() { 26 | return value; 27 | } 28 | 29 | /** 30 | * Find a the enum type by its integer value, as defined in the Thrift IDL. 31 | * @return null if the value is not found. 32 | */ 33 | public static WapInvitationType findByValue(int value) { 34 | switch (value) { 35 | case 1: 36 | return REGISTRATION; 37 | case 2: 38 | return CHAT; 39 | default: 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/org/json/.gitignore: -------------------------------------------------------------------------------- 1 | # ignore eclipse project files 2 | .project 3 | .classpath 4 | -------------------------------------------------------------------------------- /src/main/java/org/json/Cookie.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /* 4 | Copyright (c) 2002 JSON.org 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | The Software shall be used for Good, not Evil. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | /** 28 | * Convert a web browser cookie specification to a JSONObject and back. 29 | * JSON and Cookies are both notations for name/value pairs. 30 | * @author JSON.org 31 | * @version 2015-12-09 32 | */ 33 | public class Cookie { 34 | 35 | /** 36 | * Produce a copy of a string in which the characters '+', '%', '=', ';' 37 | * and control characters are replaced with "%hh". This is a gentle form 38 | * of URL encoding, attempting to cause as little distortion to the 39 | * string as possible. The characters '=' and ';' are meta characters in 40 | * cookies. By convention, they are escaped using the URL-encoding. This is 41 | * only a convention, not a standard. Often, cookies are expected to have 42 | * encoded values. We encode '=' and ';' because we must. We encode '%' and 43 | * '+' because they are meta characters in URL encoding. 44 | * @param string The source string. 45 | * @return The escaped result. 46 | */ 47 | public static String escape(String string) { 48 | char c; 49 | String s = string.trim(); 50 | int length = s.length(); 51 | StringBuilder sb = new StringBuilder(length); 52 | for (int i = 0; i < length; i += 1) { 53 | c = s.charAt(i); 54 | if (c < ' ' || c == '+' || c == '%' || c == '=' || c == ';') { 55 | sb.append('%'); 56 | sb.append(Character.forDigit((char)((c >>> 4) & 0x0f), 16)); 57 | sb.append(Character.forDigit((char)(c & 0x0f), 16)); 58 | } else { 59 | sb.append(c); 60 | } 61 | } 62 | return sb.toString(); 63 | } 64 | 65 | 66 | /** 67 | * Convert a cookie specification string into a JSONObject. The string 68 | * will contain a name value pair separated by '='. The name and the value 69 | * will be unescaped, possibly converting '+' and '%' sequences. The 70 | * cookie properties may follow, separated by ';', also represented as 71 | * name=value (except the secure property, which does not have a value). 72 | * The name will be stored under the key "name", and the value will be 73 | * stored under the key "value". This method does not do checking or 74 | * validation of the parameters. It only converts the cookie string into 75 | * a JSONObject. 76 | * @param string The cookie specification string. 77 | * @return A JSONObject containing "name", "value", and possibly other 78 | * members. 79 | * @throws JSONException 80 | */ 81 | public static JSONObject toJSONObject(String string) throws JSONException { 82 | String name; 83 | JSONObject jo = new JSONObject(); 84 | Object value; 85 | JSONTokener x = new JSONTokener(string); 86 | jo.put("name", x.nextTo('=')); 87 | x.next('='); 88 | jo.put("value", x.nextTo(';')); 89 | x.next(); 90 | while (x.more()) { 91 | name = unescape(x.nextTo("=;")); 92 | if (x.next() != '=') { 93 | if (name.equals("secure")) { 94 | value = Boolean.TRUE; 95 | } else { 96 | throw x.syntaxError("Missing '=' in cookie parameter."); 97 | } 98 | } else { 99 | value = unescape(x.nextTo(';')); 100 | x.next(); 101 | } 102 | jo.put(name, value); 103 | } 104 | return jo; 105 | } 106 | 107 | 108 | /** 109 | * Convert a JSONObject into a cookie specification string. The JSONObject 110 | * must contain "name" and "value" members. 111 | * If the JSONObject contains "expires", "domain", "path", or "secure" 112 | * members, they will be appended to the cookie specification string. 113 | * All other members are ignored. 114 | * @param jo A JSONObject 115 | * @return A cookie specification string 116 | * @throws JSONException 117 | */ 118 | public static String toString(JSONObject jo) throws JSONException { 119 | StringBuilder sb = new StringBuilder(); 120 | 121 | sb.append(escape(jo.getString("name"))); 122 | sb.append("="); 123 | sb.append(escape(jo.getString("value"))); 124 | if (jo.has("expires")) { 125 | sb.append(";expires="); 126 | sb.append(jo.getString("expires")); 127 | } 128 | if (jo.has("domain")) { 129 | sb.append(";domain="); 130 | sb.append(escape(jo.getString("domain"))); 131 | } 132 | if (jo.has("path")) { 133 | sb.append(";path="); 134 | sb.append(escape(jo.getString("path"))); 135 | } 136 | if (jo.optBoolean("secure")) { 137 | sb.append(";secure"); 138 | } 139 | return sb.toString(); 140 | } 141 | 142 | /** 143 | * Convert %hh sequences to single characters, and 144 | * convert plus to space. 145 | * @param string A string that may contain 146 | * + (plus) and 147 | * %hh sequences. 148 | * @return The unescaped string. 149 | */ 150 | public static String unescape(String string) { 151 | int length = string.length(); 152 | StringBuilder sb = new StringBuilder(length); 153 | for (int i = 0; i < length; ++i) { 154 | char c = string.charAt(i); 155 | if (c == '+') { 156 | c = ' '; 157 | } else if (c == '%' && i + 2 < length) { 158 | int d = JSONTokener.dehexchar(string.charAt(i + 1)); 159 | int e = JSONTokener.dehexchar(string.charAt(i + 2)); 160 | if (d >= 0 && e >= 0) { 161 | c = (char)(d * 16 + e); 162 | i += 2; 163 | } 164 | } 165 | sb.append(c); 166 | } 167 | return sb.toString(); 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /src/main/java/org/json/CookieList.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /* 4 | Copyright (c) 2002 JSON.org 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | The Software shall be used for Good, not Evil. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | /** 28 | * Convert a web browser cookie list string to a JSONObject and back. 29 | * @author JSON.org 30 | * @version 2015-12-09 31 | */ 32 | public class CookieList { 33 | 34 | /** 35 | * Convert a cookie list into a JSONObject. A cookie list is a sequence 36 | * of name/value pairs. The names are separated from the values by '='. 37 | * The pairs are separated by ';'. The names and the values 38 | * will be unescaped, possibly converting '+' and '%' sequences. 39 | * 40 | * To add a cookie to a cookie list, 41 | * cookielistJSONObject.put(cookieJSONObject.getString("name"), 42 | * cookieJSONObject.getString("value")); 43 | * @param string A cookie list string 44 | * @return A JSONObject 45 | * @throws JSONException 46 | */ 47 | public static JSONObject toJSONObject(String string) throws JSONException { 48 | JSONObject jo = new JSONObject(); 49 | JSONTokener x = new JSONTokener(string); 50 | while (x.more()) { 51 | String name = Cookie.unescape(x.nextTo('=')); 52 | x.next('='); 53 | jo.put(name, Cookie.unescape(x.nextTo(';'))); 54 | x.next(); 55 | } 56 | return jo; 57 | } 58 | 59 | /** 60 | * Convert a JSONObject into a cookie list. A cookie list is a sequence 61 | * of name/value pairs. The names are separated from the values by '='. 62 | * The pairs are separated by ';'. The characters '%', '+', '=', and ';' 63 | * in the names and values are replaced by "%hh". 64 | * @param jo A JSONObject 65 | * @return A cookie list string 66 | * @throws JSONException 67 | */ 68 | public static String toString(JSONObject jo) throws JSONException { 69 | boolean b = false; 70 | final StringBuilder sb = new StringBuilder(); 71 | // Don't use the new entrySet API to maintain Android support 72 | for (final String key : jo.keySet()) { 73 | final Object value = jo.opt(key); 74 | if (!JSONObject.NULL.equals(value)) { 75 | if (b) { 76 | sb.append(';'); 77 | } 78 | sb.append(Cookie.escape(key)); 79 | sb.append("="); 80 | sb.append(Cookie.escape(value.toString())); 81 | b = true; 82 | } 83 | } 84 | return sb.toString(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/org/json/HTTP.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /* 4 | Copyright (c) 2002 JSON.org 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | The Software shall be used for Good, not Evil. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | import java.util.Locale; 28 | 29 | /** 30 | * Convert an HTTP header to a JSONObject and back. 31 | * @author JSON.org 32 | * @version 2015-12-09 33 | */ 34 | public class HTTP { 35 | 36 | /** Carriage return/line feed. */ 37 | public static final String CRLF = "\r\n"; 38 | 39 | /** 40 | * Convert an HTTP header string into a JSONObject. It can be a request 41 | * header or a response header. A request header will contain 42 | *
{
 43 |      *    Method: "POST" (for example),
 44 |      *    "Request-URI": "/" (for example),
 45 |      *    "HTTP-Version": "HTTP/1.1" (for example)
 46 |      * }
47 | * A response header will contain 48 | *
{
 49 |      *    "HTTP-Version": "HTTP/1.1" (for example),
 50 |      *    "Status-Code": "200" (for example),
 51 |      *    "Reason-Phrase": "OK" (for example)
 52 |      * }
53 | * In addition, the other parameters in the header will be captured, using 54 | * the HTTP field names as JSON names, so that
 55 |      *    Date: Sun, 26 May 2002 18:06:04 GMT
 56 |      *    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
 57 |      *    Cache-Control: no-cache
58 | * become 59 | *
{...
 60 |      *    Date: "Sun, 26 May 2002 18:06:04 GMT",
 61 |      *    Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
 62 |      *    "Cache-Control": "no-cache",
 63 |      * ...}
64 | * It does no further checking or conversion. It does not parse dates. 65 | * It does not do '%' transforms on URLs. 66 | * @param string An HTTP header string. 67 | * @return A JSONObject containing the elements and attributes 68 | * of the XML string. 69 | * @throws JSONException 70 | */ 71 | public static JSONObject toJSONObject(String string) throws JSONException { 72 | JSONObject jo = new JSONObject(); 73 | HTTPTokener x = new HTTPTokener(string); 74 | String token; 75 | 76 | token = x.nextToken(); 77 | if (token.toUpperCase(Locale.ROOT).startsWith("HTTP")) { 78 | 79 | // Response 80 | 81 | jo.put("HTTP-Version", token); 82 | jo.put("Status-Code", x.nextToken()); 83 | jo.put("Reason-Phrase", x.nextTo('\0')); 84 | x.next(); 85 | 86 | } else { 87 | 88 | // Request 89 | 90 | jo.put("Method", token); 91 | jo.put("Request-URI", x.nextToken()); 92 | jo.put("HTTP-Version", x.nextToken()); 93 | } 94 | 95 | // Fields 96 | 97 | while (x.more()) { 98 | String name = x.nextTo(':'); 99 | x.next(':'); 100 | jo.put(name, x.nextTo('\0')); 101 | x.next(); 102 | } 103 | return jo; 104 | } 105 | 106 | 107 | /** 108 | * Convert a JSONObject into an HTTP header. A request header must contain 109 | *
{
110 |      *    Method: "POST" (for example),
111 |      *    "Request-URI": "/" (for example),
112 |      *    "HTTP-Version": "HTTP/1.1" (for example)
113 |      * }
114 | * A response header must contain 115 | *
{
116 |      *    "HTTP-Version": "HTTP/1.1" (for example),
117 |      *    "Status-Code": "200" (for example),
118 |      *    "Reason-Phrase": "OK" (for example)
119 |      * }
120 | * Any other members of the JSONObject will be output as HTTP fields. 121 | * The result will end with two CRLF pairs. 122 | * @param jo A JSONObject 123 | * @return An HTTP header string. 124 | * @throws JSONException if the object does not contain enough 125 | * information. 126 | */ 127 | public static String toString(JSONObject jo) throws JSONException { 128 | StringBuilder sb = new StringBuilder(); 129 | if (jo.has("Status-Code") && jo.has("Reason-Phrase")) { 130 | sb.append(jo.getString("HTTP-Version")); 131 | sb.append(' '); 132 | sb.append(jo.getString("Status-Code")); 133 | sb.append(' '); 134 | sb.append(jo.getString("Reason-Phrase")); 135 | } else if (jo.has("Method") && jo.has("Request-URI")) { 136 | sb.append(jo.getString("Method")); 137 | sb.append(' '); 138 | sb.append('"'); 139 | sb.append(jo.getString("Request-URI")); 140 | sb.append('"'); 141 | sb.append(' '); 142 | sb.append(jo.getString("HTTP-Version")); 143 | } else { 144 | throw new JSONException("Not enough material for an HTTP header."); 145 | } 146 | sb.append(CRLF); 147 | // Don't use the new entrySet API to maintain Android support 148 | for (final String key : jo.keySet()) { 149 | String value = jo.optString(key); 150 | if (!"HTTP-Version".equals(key) && !"Status-Code".equals(key) && 151 | !"Reason-Phrase".equals(key) && !"Method".equals(key) && 152 | !"Request-URI".equals(key) && !JSONObject.NULL.equals(value)) { 153 | sb.append(key); 154 | sb.append(": "); 155 | sb.append(jo.optString(key)); 156 | sb.append(CRLF); 157 | } 158 | } 159 | sb.append(CRLF); 160 | return sb.toString(); 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /src/main/java/org/json/HTTPTokener.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /* 4 | Copyright (c) 2002 JSON.org 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | The Software shall be used for Good, not Evil. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | /** 28 | * The HTTPTokener extends the JSONTokener to provide additional methods 29 | * for the parsing of HTTP headers. 30 | * @author JSON.org 31 | * @version 2015-12-09 32 | */ 33 | public class HTTPTokener extends JSONTokener { 34 | 35 | /** 36 | * Construct an HTTPTokener from a string. 37 | * @param string A source string. 38 | */ 39 | public HTTPTokener(String string) { 40 | super(string); 41 | } 42 | 43 | 44 | /** 45 | * Get the next token or string. This is used in parsing HTTP headers. 46 | * @throws JSONException 47 | * @return A String. 48 | */ 49 | public String nextToken() throws JSONException { 50 | char c; 51 | char q; 52 | StringBuilder sb = new StringBuilder(); 53 | do { 54 | c = next(); 55 | } while (Character.isWhitespace(c)); 56 | if (c == '"' || c == '\'') { 57 | q = c; 58 | for (;;) { 59 | c = next(); 60 | if (c < ' ') { 61 | throw syntaxError("Unterminated string."); 62 | } 63 | if (c == q) { 64 | return sb.toString(); 65 | } 66 | sb.append(c); 67 | } 68 | } 69 | for (;;) { 70 | if (c == 0 || Character.isWhitespace(c)) { 71 | return sb.toString(); 72 | } 73 | sb.append(c); 74 | c = next(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/org/json/JSONException.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /** 4 | * The JSONException is thrown by the JSON.org classes when things are amiss. 5 | * 6 | * @author JSON.org 7 | * @version 2015-12-09 8 | */ 9 | public class JSONException extends RuntimeException { 10 | /** Serialization ID */ 11 | private static final long serialVersionUID = 0; 12 | 13 | /** 14 | * Constructs a JSONException with an explanatory message. 15 | * 16 | * @param message 17 | * Detail about the reason for the exception. 18 | */ 19 | public JSONException(final String message) { 20 | super(message); 21 | } 22 | 23 | /** 24 | * Constructs a JSONException with an explanatory message and cause. 25 | * 26 | * @param message 27 | * Detail about the reason for the exception. 28 | * @param cause 29 | * The cause. 30 | */ 31 | public JSONException(final String message, final Throwable cause) { 32 | super(message, cause); 33 | } 34 | 35 | /** 36 | * Constructs a new JSONException with the specified cause. 37 | * 38 | * @param cause 39 | * The cause. 40 | */ 41 | public JSONException(final Throwable cause) { 42 | super(cause.getMessage(), cause); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/json/JSONPointerException.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /* 4 | Copyright (c) 2002 JSON.org 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | The Software shall be used for Good, not Evil. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | /** 28 | * The JSONPointerException is thrown by {@link JSONPointer} if an error occurs 29 | * during evaluating a pointer. 30 | * 31 | * @author JSON.org 32 | * @version 2016-05-13 33 | */ 34 | public class JSONPointerException extends JSONException { 35 | private static final long serialVersionUID = 8872944667561856751L; 36 | 37 | public JSONPointerException(String message) { 38 | super(message); 39 | } 40 | 41 | public JSONPointerException(String message, Throwable cause) { 42 | super(message, cause); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/org/json/JSONString.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | /** 3 | * The JSONString interface allows a toJSONString() 4 | * method so that a class can change the behavior of 5 | * JSONObject.toString(), JSONArray.toString(), 6 | * and JSONWriter.value(Object). The 7 | * toJSONString method will be used instead of the default behavior 8 | * of using the Object's toString() method and quoting the result. 9 | */ 10 | public interface JSONString { 11 | /** 12 | * The toJSONString method allows a class to produce its own JSON 13 | * serialization. 14 | * 15 | * @return A strictly syntactically correct JSON text. 16 | */ 17 | public String toJSONString(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/json/JSONStringer.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /* 4 | Copyright (c) 2006 JSON.org 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | The Software shall be used for Good, not Evil. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | import java.io.StringWriter; 28 | 29 | /** 30 | * JSONStringer provides a quick and convenient way of producing JSON text. 31 | * The texts produced strictly conform to JSON syntax rules. No whitespace is 32 | * added, so the results are ready for transmission or storage. Each instance of 33 | * JSONStringer can produce one JSON text. 34 | *

35 | * A JSONStringer instance provides a value method for appending 36 | * values to the 37 | * text, and a key 38 | * method for adding keys before values in objects. There are array 39 | * and endArray methods that make and bound array values, and 40 | * object and endObject methods which make and bound 41 | * object values. All of these methods return the JSONWriter instance, 42 | * permitting cascade style. For example,

43 |  * myString = new JSONStringer()
44 |  *     .object()
45 |  *         .key("JSON")
46 |  *         .value("Hello, World!")
47 |  *     .endObject()
48 |  *     .toString();
which produces the string
49 |  * {"JSON":"Hello, World!"}
50 | *

51 | * The first method called must be array or object. 52 | * There are no methods for adding commas or colons. JSONStringer adds them for 53 | * you. Objects and arrays can be nested up to 20 levels deep. 54 | *

55 | * This can sometimes be easier than using a JSONObject to build a string. 56 | * @author JSON.org 57 | * @version 2015-12-09 58 | */ 59 | public class JSONStringer extends JSONWriter { 60 | /** 61 | * Make a fresh JSONStringer. It can be used to build one JSON text. 62 | */ 63 | public JSONStringer() { 64 | super(new StringWriter()); 65 | } 66 | 67 | /** 68 | * Return the JSON text. This method is used to obtain the product of the 69 | * JSONStringer instance. It will return null if there was a 70 | * problem in the construction of the JSON text (such as the calls to 71 | * array were not properly balanced with calls to 72 | * endArray). 73 | * @return The JSON text. 74 | */ 75 | @Override 76 | public String toString() { 77 | return this.mode == 'd' ? this.writer.toString() : null; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/org/json/LICENSE: -------------------------------------------------------------------------------- 1 | ============================================================================ 2 | 3 | Copyright (c) 2002 JSON.org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | The Software shall be used for Good, not Evil. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /src/main/java/org/json/Property.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /* 4 | Copyright (c) 2002 JSON.org 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | The Software shall be used for Good, not Evil. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | */ 26 | 27 | import java.util.Enumeration; 28 | import java.util.Properties; 29 | 30 | /** 31 | * Converts a Property file data into JSONObject and back. 32 | * @author JSON.org 33 | * @version 2015-05-05 34 | */ 35 | public class Property { 36 | /** 37 | * Converts a property file object into a JSONObject. The property file object is a table of name value pairs. 38 | * @param properties java.util.Properties 39 | * @return JSONObject 40 | * @throws JSONException 41 | */ 42 | public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException { 43 | // can't use the new constructor for Android support 44 | // JSONObject jo = new JSONObject(properties == null ? 0 : properties.size()); 45 | JSONObject jo = new JSONObject(); 46 | if (properties != null && !properties.isEmpty()) { 47 | Enumeration enumProperties = properties.propertyNames(); 48 | while(enumProperties.hasMoreElements()) { 49 | String name = (String)enumProperties.nextElement(); 50 | jo.put(name, properties.getProperty(name)); 51 | } 52 | } 53 | return jo; 54 | } 55 | 56 | /** 57 | * Converts the JSONObject into a property file object. 58 | * @param jo JSONObject 59 | * @return java.util.Properties 60 | * @throws JSONException 61 | */ 62 | public static Properties toProperties(JSONObject jo) throws JSONException { 63 | Properties properties = new Properties(); 64 | if (jo != null) { 65 | // Don't use the new entrySet API to maintain Android support 66 | for (final String key : jo.keySet()) { 67 | Object value = jo.opt(key); 68 | if (!JSONObject.NULL.equals(value)) { 69 | properties.put(key, value.toString()); 70 | } 71 | } 72 | } 73 | return properties; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/org/json/README: -------------------------------------------------------------------------------- 1 | JSON in Java [package org.json] 2 | 3 | JSON is a light-weight, language independent, data interchange format. 4 | See http://www.JSON.org/ 5 | 6 | The files in this package implement JSON encoders/decoders in Java. 7 | It also includes the capability to convert between JSON and XML, HTTP 8 | headers, Cookies, and CDL. 9 | 10 | This is a reference implementation. There is a large number of JSON packages 11 | in Java. Perhaps someday the Java community will standardize on one. Until 12 | then, choose carefully. 13 | 14 | The license includes this restriction: "The software shall be used for good, 15 | not evil." If your conscience cannot live with that, then choose a different 16 | package. 17 | 18 | The package compiles on Java 1.6-1.8. 19 | 20 | 21 | JSONObject.java: The JSONObject can parse text from a String or a JSONTokener 22 | to produce a map-like object. The object provides methods for manipulating its 23 | contents, and for producing a JSON compliant object serialization. 24 | 25 | JSONArray.java: The JSONArray can parse text from a String or a JSONTokener 26 | to produce a vector-like object. The object provides methods for manipulating 27 | its contents, and for producing a JSON compliant array serialization. 28 | 29 | JSONTokener.java: The JSONTokener breaks a text into a sequence of individual 30 | tokens. It can be constructed from a String, Reader, or InputStream. 31 | 32 | JSONException.java: The JSONException is the standard exception type thrown 33 | by this package. 34 | 35 | JSONPointer.java: Implementation of 36 | [JSON Pointer (RFC 6901)](https://tools.ietf.org/html/rfc6901). Supports 37 | JSON Pointers both in the form of string representation and URI fragment 38 | representation. 39 | 40 | JSONString.java: The JSONString interface requires a toJSONString method, 41 | allowing an object to provide its own serialization. 42 | 43 | JSONStringer.java: The JSONStringer provides a convenient facility for 44 | building JSON strings. 45 | 46 | JSONWriter.java: The JSONWriter provides a convenient facility for building 47 | JSON text through a writer. 48 | 49 | 50 | CDL.java: CDL provides support for converting between JSON and comma 51 | delimited lists. 52 | 53 | Cookie.java: Cookie provides support for converting between JSON and cookies. 54 | 55 | CookieList.java: CookieList provides support for converting between JSON and 56 | cookie lists. 57 | 58 | HTTP.java: HTTP provides support for converting between JSON and HTTP headers. 59 | 60 | HTTPTokener.java: HTTPTokener extends JSONTokener for parsing HTTP headers. 61 | 62 | XML.java: XML provides support for converting between JSON and XML. 63 | 64 | JSONML.java: JSONML provides support for converting between JSONML and XML. 65 | 66 | XMLTokener.java: XMLTokener extends JSONTokener for parsing XML text. 67 | 68 | Unit tests are maintained in a separate project. Contributing developers can test 69 | JSON-java pull requests with the code in this project: 70 | https://github.com/stleary/JSON-Java-unit-test 71 | 72 | Numeric types in this package comply with ECMA-404: The JSON Data Interchange Format 73 | (http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) and 74 | RFC 7159: The JavaScript Object Notation (JSON) Data Interchange Format 75 | (https://tools.ietf.org/html/rfc7159#section-6). 76 | This package fully supports Integer, Long, and Double Java types. Partial support 77 | for BigInteger and BigDecimal values in JSONObject and JSONArray objects is provided 78 | in the form of get(), opt(), and put() API methods. 79 | 80 | Although 1.6 compatibility is currently supported, it is not a project goal and may be 81 | removed in some future release. 82 | 83 | In compliance with RFC7159 page 10 section 9, the parser is more lax with what is valid 84 | JSON than the Generator. For Example, the tab character (U+0009) is allowed when reading 85 | JSON Text strings, but when output by the Generator, tab is properly converted to \t in 86 | the string. Other instances may occur where reading invalid JSON text does not cause an 87 | error to be generated. Malformed JSON Texts such as missing end " (quote) on strings or 88 | invalid number formats (1.2e6.3) will cause errors as such documents can not be read 89 | reliably. 90 | 91 | Release history: 92 | 20171018 Checkpoint for recent commits. 93 | 94 | 20170516 Roll up recent commits. 95 | 96 | 20160810 Revert code that was breaking opt*() methods. 97 | 98 | 20160807 This release contains a bug in the JSONObject.opt*() and JSONArray.opt*() methods, 99 | it is not recommended for use. 100 | Java 1.6 compatability fixed, JSONArray.toList() and JSONObject.toMap(), 101 | RFC4180 compatibility, JSONPointer, some exception fixes, optional XML type conversion. 102 | Contains the latest code as of 7 Aug, 2016 103 | 104 | 20160212 Java 1.6 compatibility, OSGi bundle. Contains the latest code as of 12 Feb, 2016. 105 | 106 | 20151123 JSONObject and JSONArray initialization with generics. Contains the 107 | latest code as of 23 Nov, 2015. 108 | 109 | 20150729 Checkpoint for Maven central repository release. Contains the latest code 110 | as of 29 July, 2015. 111 | 112 | JSON-java releases can be found by searching the Maven repository for groupId "org.json" 113 | and artifactId "json". For example: 114 | https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.json%22%20AND%20a%3A%22json%22 115 | -------------------------------------------------------------------------------- /src/main/resources/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "after-this-add-authtoken-arg":"Please add authtoken to the argument at the time of execution from now", 3 | "add-arg-sample":"Example:java -jar line.jar authtoken", 4 | "launched":"Launched!", 5 | "thanks_for_adding":"%s, thanks for adding!!\nWhen you invite me to a group,I will join it automatic.\nInvite me to many groups!!", 6 | "thanks_for_inviting":"(*´ヮ`)<Thanks for inviteing.\nI joined.\nI'm read bot.!\nPlease check commands by saying \"help\".", 7 | "welcome_this_group":"%s,Welcome to%g!\nI'm Yuzu", 8 | "cant_use_in_room":"Can't use in room.\n%s,I'm sorry!", 9 | "changed_group_name":"%s changed group name.", 10 | "changed_group_image":"%s changed group image.", 11 | "blocked_invitng_by_url":"%s blocked inviting by URL.", 12 | "allowed_invitng_by_url":"%s allowed inviting by URL.", 13 | "changed_notification_setting":"%s changed notification setting.", 14 | "help_message":"I tell you all commands!\n\n[help]\nsend help\n[whoread]\nwho read?(First time, result might not be true.)\n[reset]\nreset readers list\n[mid]\nsend your mid\n[gid]\nsend gid\n[ginfo]\nget group infomations\n[geturl]\nreissue group url\n[new group name into gname]\nchange group name\n(Also, You can use new group name > gname)\n[howinv]\nHow many users are invited?\n[stkinfo]\nsend sticker infomations\n[speed]\nKnow bot's speed\n[sencon:mid]\nsend a contact you selected(replace mid with yours)\n[leave here]\nLeave this group\n\n[other futures]\nsend conatct infomations\nsend infomation when you shared timeline post\nsend a message when group call started/ended\nWhen you posted groupboard,send that infomations\n\nlastupdate:%d\nBuild:%b %t\n・Contact us\n%supporturl", 15 | "bath":"bath", 16 | "good_for_working":"(*´◇`)<Thank you very much for your hard work.\nToday, there is a refreshing scented yuzu bath❤\n…Oh, I'm not in that!\nOhhhh;", 17 | "imhungry":"hungry", 18 | "prepaired_dinner":"(*´◇`)<The meal was ready♡\nToday is a kaiseki♡", 19 | "good_morning":"good morning", 20 | "good_morning_msg":"(*´v`)<Good Morning。\nI'm stil sllepy,but I will work good!", 21 | "job":"job", 22 | "tired":"fatigue", 23 | "bath_cleaning":"(*´◇`)<Bath cleaning~~♪Goshigoshi。\nI have a warm bath~\nPlease come back soon.♪", 24 | "speed_result":"(*´ヮ`)<this is the result!\ndiff : %sms", 25 | "does_not_exists_gid":"(*´ヮ`)<here is not group, so gid does not exist", 26 | "reset_readers_list":"(*´ヮ`)<I reset readers list", 27 | "this_command_does_not_supported":"(*´ヮ`)<This command supports in only groups.", 28 | "ginfo_1":"[GroupInfo]\n\nGroupName:%s\n\nGroupId:%t\n\nGroupAuthor(does not exist now):%u\n\nThe oldest people:%v\n\nGroupPicture:https://obs-sg.line-apps.com/%w\n\nURLInviting:Allows", 29 | "ginfo_2":"[GroupInfo]\n\nGroupName:%s\n\nGroupId:%t\n\nGroupAuthor:%u\n\nGroupPicture:https://obs-sg.line-apps.com/%v\n\nURLInviting:Allows", 30 | "ginfo_3":"[GroupInfo]\n\nGroupName:%s\n\nGroupId:%t\n\nGroupAuthor(does not exist now):%u\n\nThe oldest people:%v\n\nGroupPicture:https://obs-sg.line-apps.com/%w\n\nURLInviting:Denys", 31 | "ginfo_4":"[GroupInfo]\n\nGroupName:%s\n\nGroupId:%t\n\nGroupAuthor:%u\n\nGroupPicture:https://obs-sg.line-apps.com/%v\n\nURLInviting:Denys", 32 | "no_bady_invited":"(*´ヮ`)<No bady was invited", 33 | "invited_users":"(*´ヮ`)<%s users were(was) invited", 34 | "no_bady_read":"(*´ヮ`)<No bady read。", 35 | "name":"%s,\n", 36 | "read_users":"Readers are,\n%s.", 37 | "use_other_name":"(*´ヮ`)<Please name it different now.", 38 | "i_changed_group_name":"(*´ヮ`)<I changed group name.", 39 | "i_reissued_glink":"(*´ヮ`)<I reissued group url\n(URL will be Disabled when you kicked me,reissued group url)\nline://ti/g/%s", 40 | "send_stk":"send a sticker you want to know more", 41 | "good_for_meeting_you":"(*´ヮ`)<I leave from this group\nIt was really nice meeting you", 42 | "user_does_not_exist":"(*´ヮ`)<The user does not exist.", 43 | "started_group_call":"%s started Group Call.", 44 | "started_group_video_call":"%s started Group Video Call.", 45 | "ended_group_call":"Group Call was ended.\nCalling time:%sms", 46 | "ended_group_video_call":"Group VIdeo Call was ended.\nCalling time:%sms", 47 | "lang":"English", 48 | "country":"us", 49 | "authorName":"authorName:%s", 50 | "copyright":"copyright:%s", 51 | "descriptionText":"descriptionText:%s", 52 | "shared_timeline":"%s shared %t's timeline post.", 53 | "posted_group_note":"%s posted group note.", 54 | "click_this_link_in_two_minutes":"(*´ヮ`)<Please click this link in 2 minutes!" 55 | } -------------------------------------------------------------------------------- /src/main/resources/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "after-this-add-authtoken-arg":"これからauthtokenを実行時の引数に追加してください", 3 | "add-arg-sample":"例:java -jar line.jar authtoken", 4 | "launched":"起動完了", 5 | "thanks_for_adding":"%sさん、追加ありがとう!!\nグルに招待すると自動で参加します\nいろいろなグループに招待してね!!", 6 | "thanks_for_inviting":"(*´ヮ`)<招待ありがとうございます\n参加させていただきました\n既読ボットです!\nまずはhelpでコマンド一覧をチェックしてね", 7 | "welcome_this_group":"%sさん、%gへようこそ!\n柚です、よろしくね!", 8 | "cant_use_in_room":"Roomでは使用できません\n%sさん、申し訳ありません!", 9 | "changed_group_name":"%sさんがグループ名を変更しました", 10 | "changed_group_image":"%sさんがグループ画像を変更しました", 11 | "blocked_invitng_by_url":"%sさんがURL招待をブロックしました", 12 | "allowed_invitng_by_url":"%sさんがURL招待を許可しました", 13 | "changed_notification_setting":"%sさんが通知設定を変更しました", 14 | "help_message":"このボットのコマンドを教えるね!\n\n[help]\nヘルプを送信\n[whoread]\n誰が既読したか(初回時は正しい結果が出ないことがあります)\n[reset]\n既読地点を更新します\n[mid]\n自分のmidを送信します\n[gid]\ngid(midの一種)を送信します\n[ginfo]\nグループ情報を取得します\n[geturl]\nグルのURLを発行します\n[グル名 into gname]\nグループ名を変更します\n(グル名 > gnameでも可能です)\n[howinv]\nグループに何人招待されているかを取得します\n[stkinfo]\n送信されたスタンプの詳細情報を取得します\n[speed]\nBotの反応時間を取得します\n[sencon:mid]\n指定されたmidの連絡先を送信します(midは任意のものに置き換えてください)\n[leave here]\nグループを退出します\n\n[その他の機能]\n連絡先の詳細を送信\nTL共有時に情報の送信\n通話の開始と終了をお知らせ\nグループボード作成時に情報の送信\n\n・注意--コマンドの実行間隔は3秒以上開けてください\nまれに夜、メンテナンスしていることがあります。ご了承ください。\n\n最終更新:%d\nビルド:%b %t\n・質問やサポートはこちらから\n%supporturl", 15 | "bath":"風呂", 16 | "good_for_working":"(*´◇`)<おつとめご苦労さまでした。\n本日は、爽やかな香りの柚子風呂がございますよ❤\n…あ、わたくしが入っているわけではなく!\nぁゎゎ;", 17 | "imhungry":"ハラ減った", 18 | "prepaired_dinner":"(*´◇`)<お食事のご用意ができましたぁ♡\n本日は、懐石です♡", 19 | "good_morning":"おはよう", 20 | "good_morning_msg":"(*´v`)<おはようございます。\nまだちょっとねむねむですが、がんばりますっ!", 21 | "job":"仕事", 22 | "tired":"疲れ", 23 | "bath_cleaning":"(*´◇`)<お風呂掃除~~♪ゴシゴシ。\nあったかお風呂をご用意してます~\n早く帰ってきてく~ださい♪", 24 | "speed_result":"(*´ヮ`)<お客様、測定結果です!\ndiff : %sミリ秒", 25 | "does_not_exists_gid":"(*´ヮ`)<ここはグループじゃないのでgidは存在しません", 26 | "reset_readers_list":"(*´ヮ`)<既読一覧をリセットしました", 27 | "this_command_does_not_supported":"(*´ヮ`)<このコマンドはグループ以外でサポートされません", 28 | "ginfo_1":"[グループ情報]\n\nグル名:%s\n\nGroupId:%t\n\nグルの作成者(現在はおられません):%u\n\n最も古くから参加してた人:%v\n\nグル画:https://obs-sg.line-apps.com/%w\n\nURL招待:許可中", 29 | "ginfo_2":"[グループ情報]\n\nグル名:%s\n\nGroupId:%t\n\nグルの作成者:%u\n\nグル画:https://obs-sg.line-apps.com/%v\n\nURL招待:許可中", 30 | "ginfo_3":"[グループ情報]\n\nグル名:%s\n\nGroupId:%t\n\nグルの作成者(現在はおられません):%u\n\n最も古くから参加してた人:%v\n\nグル画:https://obs-sg.line-apps.com/%w\n\nURL招待:拒否中", 31 | "ginfo_4":"[グループ情報]\n\nグル名:%s\n\nGroupId:%t\n\nグルの作成者:%u\n\nグル画:https://obs-sg.line-apps.com/%v\n\nURL招待:拒否中", 32 | "no_bady_invited":"(*´ヮ`)<誰も招待されていません", 33 | "invited_users":"(*´ヮ`)<%s人が招待中です\n(誤差があることがあります)", 34 | "no_bady_read":"(*´ヮ`)<誰も既読していません。", 35 | "name":"%sさん、\n", 36 | "read_users":"既読したのは、\n%sです", 37 | "use_other_name":"(*´ヮ`)<今とは違う名前にしてください", 38 | "i_changed_group_name":"(*´ヮ`)<柚がグループ名を変更しました", 39 | "i_reissued_glink":"(*´ヮ`)<グルのリンクを発行しました\n(URLを再形成したりこのBotを蹴ったりするとリンクは無効になります)\nline://ti/g/%s", 40 | "send_stk":"詳細を見たいスタンプを送信してください", 41 | "good_for_meeting_you":"(*´ヮ`)<グループを退出します\nあなたと出会えて本当に良かったです", 42 | "user_does_not_exist":"(*´ヮ`)<指定されたユーザーは存在しません", 43 | "started_group_call":"%sさんが音声通話を開始しました", 44 | "started_group_video_call":"%sさんがビデオ通話を開始しました", 45 | "ended_group_call":"音声通話が終了しました\n通話時間:%sミリ秒", 46 | "ended_group_video_call":"ビデオ通話が終了しました\n通話時間:%sミリ秒", 47 | "lang":"日本語", 48 | "country":"jp", 49 | "authorName":"作者:%s", 50 | "copyright":"著作権情報:%s", 51 | "descriptionText":"説明:%s", 52 | "shared_timeline":"%sさんが%tさんのTLを共有したよ", 53 | "posted_group_note":"%sさんがグループノートに投稿したよ", 54 | "click_this_link_in_two_minutes":"(*´ヮ`)<二分以内にこのリンクを踏んでくださいね!" 55 | } --------------------------------------------------------------------------------