Skip to content

Commit

Permalink
models updates, annotations removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
syslogic committed Mar 24, 2024
1 parent b68b142 commit 1a9c726
Show file tree
Hide file tree
Showing 33 changed files with 78 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class EndpointUrl {
/** Link to AppGallery Connect Console */
public static final String AG_CONNECT_APP_INFO = "https://developer.huawei.com/consumer/en/service/josp/agc/index.html#/myApp/{appId}/97458334310914199";

/** Link to AppGallery Connect Console */
public static final String AG_CONNECT_INTEGRATION = "https://developer.huawei.com/consumer/en/service/josp/agc/index.html#/myProject/99536292102543196/97458334310914194?appId={appId}";

/** Link to AppGallery Connect Console */
public static final String AG_CONNECT_API_CLIENT = "https://developer.huawei.com/consumer/en/service/josp/agc/index.html#/ups/9249519184595983326";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.syslogic.agconnect.constants;

public class ErrorMessage {

public static final String APP_SIGNING_NOT_ENABLED = "[cds]add apk failed, additional msg is [app bundle must do app signature.]";
public static final String ONGOING_INTEGRATION_CHECK = "[cds]update service failed, additional msg is [The new service has can't be edited service,which can't be updated!]";
}
3 changes: 3 additions & 0 deletions src/main/java/io/syslogic/agconnect/constants/ResultCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class ResultCode {
/** API result code. */

public static final int FAILED_TO_UPLOAD_PACKAGE = 204144646;

public static final int FAILED_TO_UPDATE_PACKAGE = 204144647;

/** API result code. */
public static final int ADD_APK_HAS_FAILED = 204144662;
}
2 changes: 0 additions & 2 deletions src/main/java/io/syslogic/agconnect/model/ApiConfigFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

/**
* Abstract Model: ApiConfig
*
* This is file distribution/agc-apiclient.json.
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class ApiConfigFile {

@SerializedName("configuration_version")
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/io/syslogic/agconnect/model/AppConfigFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;

/**
* Abstract Model: AppConfig
*
* This is file agconnect-services.json, where only appInfo.appId is of interest.
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppConfigFile {

@SerializedName("configuration_version")
private String configVersion;

@SerializedName("app_info")
private AppConfigInfo appInfo;
@SerializedName("appInfos")
private ArrayList<AppConfigInfo> appInfos;

/** @return the configVersion. */
public String getConfigVersion() {
return this.configVersion;
}

/** @return the AppConfigInfo. */
public AppConfigInfo getAppInfo() {
return this.appInfo;
public ArrayList<AppConfigInfo> getAppInfos() {
return this.appInfos;
}
}
10 changes: 4 additions & 6 deletions src/main/java/io/syslogic/agconnect/model/AppConfigInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@

/**
* Abstract Model: AppConfigInfo
*
* This is file agconnect-services.json, where only appId is of interest.
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppConfigInfo {

@SerializedName("app_id")
private Long appId;

@SerializedName("package_name")
private String packageName;

@SerializedName("app_info")
private AppInfoSimple appInfo;

/** @return the appId. */
public Long getAppId() {
return this.appId;
return this.appInfo.getAppId();
}

/** @return the packageName. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppIdListResponse {

@SerializedName("ret")
Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/syslogic/agconnect/model/AppInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppInfo {

@SerializedName("releaseState")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppInfoAppId {

@SerializedName("key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppInfoDeviceMaterial {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppInfoDeviceType {

@SerializedName("deviceType")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppInfoLanguage {

@SerializedName("lang")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppInfoLocalization {

@SerializedName("lang")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AppInfoResponse {

@SerializedName("ret")
Expand Down
32 changes: 32 additions & 0 deletions src/main/java/io/syslogic/agconnect/model/AppInfoSimple.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package io.syslogic.agconnect.model;

import com.google.gson.annotations.SerializedName;

/**
* Abstract Model: AppInfo Simple
*
* @author Martin Zeitler
*/
public class AppInfoSimple {

@SerializedName("app_id")
private Long appId;

@SerializedName("package_name")
private String packageName;

public Long getAppId() {
return this.appId;
}
public String getPackageName() {
return this.packageName;
}

@Override
public String toString() {
return "AppInfoSimple {" +
"appId: \"" + this.getAppId() + "\", " +
"packageName: \"" + this.getPackageName() + "\" " +
"}";
}
}
19 changes: 19 additions & 0 deletions src/main/java/io/syslogic/agconnect/model/AppSubmitResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.syslogic.agconnect.model;

import com.google.gson.annotations.SerializedName;

/**
* Abstract Model: AppSubmitResponse
*
* @author Martin Zeitler
*/
public class AppSubmitResponse {

@SerializedName("ret")
private ResponseStatus ret;

/** @return response status. */
public ResponseStatus getRet() {
return this.ret;
}
}
1 change: 0 additions & 1 deletion src/main/java/io/syslogic/agconnect/model/AuditInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class AuditInfo {

/** Overall review comments of an app. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class CompileStateResponse {

@SerializedName("ret")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings({"unused", "FieldMayBeFinal"})
@SuppressWarnings({"FieldMayBeFinal"})
public class FileInfoUpdateRequest {

@SerializedName("lang")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class FileInfoUpdateResponse {

@SerializedName("ret")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings({"unused", "FieldMayBeFinal"})
@SuppressWarnings({"FieldMayBeFinal"})
public class FileUploadInfo {

@SerializedName("fileName")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class PhasedReleaseInfo {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class ResponseStatus {

@SerializedName(value="errorCode", alternate={"code"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings({"unused", "FieldMayBeFinal"})
@SuppressWarnings({"FieldMayBeFinal"})
public class TokenRequest {

@SerializedName("grant_type")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class TokenResponse {

@SerializedName("access_token")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class UploadChunkedRequest {

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class UploadChunkedResponse {

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class UploadFileItem {

@SerializedName("fileDestUlr")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class UploadFileResponse {

@SerializedName("ifSuccess")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class UploadResponse {

@SerializedName("resultCode")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class UploadResponseWrap {

@SerializedName("resultCode")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings({"unused", "FieldMayBeFinal"})
@SuppressWarnings({"FieldMayBeFinal"})
public class UploadUrlRequest {

@SerializedName("appId")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @author Martin Zeitler
*/
@SuppressWarnings("unused")
public class UploadUrlResponse {

@SerializedName("ret")
Expand Down

0 comments on commit 1a9c726

Please sign in to comment.