Merge pull request #2047 from nextcloud/chore/parcelerMigration1

Parceler migration
This commit is contained in:
Andy Scherzinger 2022-05-16 14:58:10 +02:00 committed by GitHub
commit 19186feb5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 568 additions and 1024 deletions

View File

@ -224,7 +224,7 @@ class ServerSelectionController :
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ status: Status ->
val productName = resources!!.getString(R.string.nc_server_product_name)
val versionString: String = status.getVersion().substring(0, status.getVersion().indexOf("."))
val versionString: String = status.version!!.substring(0, status.version!!.indexOf("."))
val version: Int = versionString.toInt()
if (isServerStatusQueryable(status) && version >= MIN_SERVER_MAJOR_VERSION) {
router.pushController(
@ -237,27 +237,27 @@ class ServerSelectionController :
.pushChangeHandler(HorizontalChangeHandler())
.popChangeHandler(HorizontalChangeHandler())
)
} else if (!status.isInstalled) {
} else if (!status.installed) {
setErrorText(
String.format(
resources!!.getString(R.string.nc_server_not_installed), productName
)
)
} else if (status.isNeedsUpgrade) {
} else if (status.needsUpgrade) {
setErrorText(
String.format(
resources!!.getString(R.string.nc_server_db_upgrade_needed),
productName
)
)
} else if (status.isMaintenance) {
} else if (status.maintenance) {
setErrorText(
String.format(
resources!!.getString(R.string.nc_server_maintenance),
productName
)
)
} else if (!status.getVersion().startsWith("13.")) {
} else if (!status.version!!.startsWith("13.")) {
setErrorText(
String.format(
resources!!.getString(R.string.nc_server_version),
@ -297,7 +297,7 @@ class ServerSelectionController :
}
private fun isServerStatusQueryable(status: Status): Boolean {
return status.isInstalled && !status.isMaintenance && !status.isNeedsUpgrade
return status.installed && !status.maintenance && !status.needsUpgrade
}
private fun setErrorText(text: String) {

View File

@ -968,7 +968,7 @@ public class SettingsController extends BaseController {
@Override
public void onNext(@io.reactivex.annotations.NonNull GenericOverall genericOverall) {
int statusCode = genericOverall.ocs.meta.statusCode;
int statusCode = Objects.requireNonNull(genericOverall.getMeta()).getStatusCode();
if (statusCode == 200) {
dialog.dismiss();
Toast.makeText(context, context.getResources().getString(

View File

@ -55,6 +55,7 @@ import javax.inject.Inject;
import java.io.IOException;
import java.net.CookieManager;
import java.util.HashMap;
import java.util.Objects;
import java.util.zip.CRC32;
@AutoInjector(NextcloudTalkApplication.class)
@ -104,13 +105,13 @@ public class AccountRemovalWorker extends Worker {
.blockingSubscribe(new Observer<GenericOverall>() {
@Override
public void onSubscribe(@NotNull Disposable d) {
// unused atm
}
@Override
public void onNext(@NotNull GenericOverall genericOverall) {
if (genericOverall.getOcs().getMeta().getStatusCode() == 200
|| genericOverall.getOcs().getMeta().getStatusCode() == 202) {
if (Objects.requireNonNull(genericOverall.getMeta()).getStatusCode() == 200 ||
genericOverall.getMeta().getStatusCode() == 202) {
HashMap<String, String> queryMap = new HashMap<>();
queryMap.put("deviceIdentifier",
finalPushConfigurationState.getDeviceIdentifier());
@ -128,7 +129,7 @@ public class AccountRemovalWorker extends Worker {
@Override
public void onComplete() {
// unused atm
}
});
} else {

View File

@ -3,6 +3,8 @@
*
* @author Mario Danic
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
*
@ -24,15 +26,17 @@ package com.nextcloud.talk.models.json.autocomplete
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class AutocompleteOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: List<AutocompleteUser>?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -3,6 +3,8 @@
*
* @author Mario Danic
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
*
@ -24,15 +26,17 @@ package com.nextcloud.talk.models.json.capabilities
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class CapabilitiesOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: CapabilitiesList?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -1,107 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.generic;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject(serializeNullObjects = true)
public class GenericMeta {
@JsonField(name = "status")
public String status;
@JsonField(name = "statuscode")
public int statusCode;
@JsonField(name = "message")
public String message;
public String getStatus() {
return this.status;
}
public int getStatusCode() {
return this.statusCode;
}
public String getMessage() {
return this.message;
}
public void setStatus(String status) {
this.status = status;
}
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
public void setMessage(String message) {
this.message = message;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenericMeta)) {
return false;
}
final GenericMeta other = (GenericMeta) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$status = this.getStatus();
final Object other$status = other.getStatus();
if (this$status == null ? other$status != null : !this$status.equals(other$status)) {
return false;
}
if (this.getStatusCode() != other.getStatusCode()) {
return false;
}
final Object this$message = this.getMessage();
final Object other$message = other.getMessage();
return this$message == null ? other$message == null : this$message.equals(other$message);
}
protected boolean canEqual(final Object other) {
return other instanceof GenericMeta;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $status = this.getStatus();
result = result * PRIME + ($status == null ? 43 : $status.hashCode());
result = result * PRIME + this.getStatusCode();
final Object $message = this.getMessage();
result = result * PRIME + ($message == null ? 43 : $message.hashCode());
return result;
}
public String toString() {
return "GenericMeta(status=" + this.getStatus() + ", statusCode=" + this.getStatusCode() + ", message=" + this.getMessage() + ")";
}
}

View File

@ -0,0 +1,41 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.generic
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject(serializeNullObjects = true)
data class GenericMeta(
@JsonField(name = ["status"])
var status: String? = null,
@JsonField(name = ["statuscode"])
var statusCode: Int = 0,
@JsonField(name = ["message"])
var message: String? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, 0, null)
}

View File

@ -25,50 +25,14 @@ import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
/**
* Legacy class for the remaining java parceler classes
* that haven't yet been migrated to kotlin data classes
*/
@Parcel
@JsonObject
@Deprecated
public class GenericOCS {
@JsonField(name = "meta")
public GenericMeta meta;
public GenericMeta getMeta() {
return this.meta;
}
public void setMeta(GenericMeta meta) {
this.meta = meta;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenericOCS)) {
return false;
}
final GenericOCS other = (GenericOCS) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$meta = this.getMeta();
final Object other$meta = other.getMeta();
return this$meta == null ? other$meta == null : this$meta.equals(other$meta);
}
protected boolean canEqual(final Object other) {
return other instanceof GenericOCS;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $meta = this.getMeta();
result = result * PRIME + ($meta == null ? 43 : $meta.hashCode());
return result;
}
public String toString() {
return "GenericOCS(meta=" + this.getMeta() + ")";
}
}

View File

@ -1,74 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.generic;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class GenericOverall {
@JsonField(name = "ocs")
public GenericOCS ocs;
public GenericOCS getOcs() {
return this.ocs;
}
public void setOcs(GenericOCS ocs) {
this.ocs = ocs;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GenericOverall)) {
return false;
}
final GenericOverall other = (GenericOverall) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$ocs = this.getOcs();
final Object other$ocs = other.getOcs();
return this$ocs == null ? other$ocs == null : this$ocs.equals(other$ocs);
}
protected boolean canEqual(final Object other) {
return other instanceof GenericOverall;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $ocs = this.getOcs();
result = result * PRIME + ($ocs == null ? 43 : $ocs.hashCode());
return result;
}
public String toString() {
return "GenericOverall(ocs=" + this.getOcs() + ")";
}
}

View File

@ -0,0 +1,40 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.generic
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class GenericOverall(
@JsonField(name = ["meta"])
var meta: GenericMeta? = null
) : IGenericOCS, Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
override fun getGenericMeta(): GenericMeta? {
return meta
}
}

View File

@ -0,0 +1,24 @@
/*
* Nextcloud Talk application
*
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.generic
interface IGenericOCS {
fun getGenericMeta(): GenericMeta?
}

View File

@ -1,173 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.generic;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class Status {
@JsonField(name = "installed")
public boolean installed;
@JsonField(name = "maintenance")
public boolean maintenance;
@JsonField(name = "upgrade")
public boolean needsUpgrade;
@JsonField(name = "version")
public String version;
@JsonField(name = "versionstring")
public String versionString;
@JsonField(name = "edition")
public String edition;
@JsonField(name = "productname")
public String productName;
public boolean isInstalled() {
return this.installed;
}
public boolean isMaintenance() {
return this.maintenance;
}
public boolean isNeedsUpgrade() {
return this.needsUpgrade;
}
public String getVersion() {
return this.version;
}
public String getVersionString() {
return this.versionString;
}
public String getEdition() {
return this.edition;
}
public String getProductName() {
return this.productName;
}
public void setInstalled(boolean installed) {
this.installed = installed;
}
public void setMaintenance(boolean maintenance) {
this.maintenance = maintenance;
}
public void setNeedsUpgrade(boolean needsUpgrade) {
this.needsUpgrade = needsUpgrade;
}
public void setVersion(String version) {
this.version = version;
}
public void setVersionString(String versionString) {
this.versionString = versionString;
}
public void setEdition(String edition) {
this.edition = edition;
}
public void setProductName(String productName) {
this.productName = productName;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof Status)) {
return false;
}
final Status other = (Status) o;
if (!other.canEqual((Object) this)) {
return false;
}
if (this.isInstalled() != other.isInstalled()) {
return false;
}
if (this.isMaintenance() != other.isMaintenance()) {
return false;
}
if (this.isNeedsUpgrade() != other.isNeedsUpgrade()) {
return false;
}
final Object this$version = this.getVersion();
final Object other$version = other.getVersion();
if (this$version == null ? other$version != null : !this$version.equals(other$version)) {
return false;
}
final Object this$versionString = this.getVersionString();
final Object other$versionString = other.getVersionString();
if (this$versionString == null ? other$versionString != null : !this$versionString.equals(other$versionString)) {
return false;
}
final Object this$edition = this.getEdition();
final Object other$edition = other.getEdition();
if (this$edition == null ? other$edition != null : !this$edition.equals(other$edition)) {
return false;
}
final Object this$productName = this.getProductName();
final Object other$productName = other.getProductName();
return this$productName == null ? other$productName == null : this$productName.equals(other$productName);
}
protected boolean canEqual(final Object other) {
return other instanceof Status;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + (this.isInstalled() ? 79 : 97);
result = result * PRIME + (this.isMaintenance() ? 79 : 97);
result = result * PRIME + (this.isNeedsUpgrade() ? 79 : 97);
final Object $version = this.getVersion();
result = result * PRIME + ($version == null ? 43 : $version.hashCode());
final Object $versionString = this.getVersionString();
result = result * PRIME + ($versionString == null ? 43 : $versionString.hashCode());
final Object $edition = this.getEdition();
result = result * PRIME + ($edition == null ? 43 : $edition.hashCode());
final Object $productName = this.getProductName();
result = result * PRIME + ($productName == null ? 43 : $productName.hashCode());
return result;
}
public String toString() {
return "Status(installed=" + this.isInstalled() + ", maintenance=" + this.isMaintenance() + ", needsUpgrade=" + this.isNeedsUpgrade() + ", version=" + this.getVersion() + ", versionString=" + this.getVersionString() + ", edition=" + this.getEdition() + ", productName=" + this.getProductName() + ")";
}
}

View File

@ -0,0 +1,55 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.generic
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class Status(
@JsonField(name = ["installed"])
var installed: Boolean = false,
@JsonField(name = ["maintenance"])
var maintenance: Boolean = false,
@JsonField(name = ["upgrade"])
var needsUpgrade: Boolean = false,
@JsonField(name = ["version"])
var version: String? = null,
@JsonField(name = ["versionstring"])
var versionString: String? = null,
@JsonField(name = ["edition"])
var edition: String? = null,
@JsonField(name = ["productname"])
var productName: String? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(false, false, false, null, null, null, null)
}

View File

@ -1,34 +1,41 @@
/*
*
* Nextcloud Talk application
* Nextcloud Talk application
*
* @author Tim Krüger
* Copyright (C) 2021-2022 Tim Krüger <t@timkrueger.me>
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2021-2022 Tim Krüger <t@timkrueger.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.hovercard
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class HoverCardOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: HoverCard?
) : GenericOCS() {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -3,6 +3,8 @@
*
* @author Mario Danic
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
*
@ -24,15 +26,17 @@ package com.nextcloud.talk.models.json.mention
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class MentionOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: List<Mention>?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -24,15 +24,17 @@ package com.nextcloud.talk.models.json.notifications
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class NotificationOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var notification: Notification?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -3,6 +3,8 @@
*
* @author Mario Danic
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
*
@ -24,15 +26,17 @@ package com.nextcloud.talk.models.json.notifications
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
class NotificationsOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var notificationsList: List<Notification>?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -24,15 +24,17 @@ package com.nextcloud.talk.models.json.push
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class PushRegistrationOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: PushRegistration?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -1,37 +1,41 @@
/*
* Nextcloud Talk application
* Nextcloud Talk application
*
* @author Marcel Hibbe
* Copyright (C) 2022 Marcel Hibbe <dev@mhibbe.de>
* @author Marcel Hibbe
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2022 Marcel Hibbe <dev@mhibbe.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.reactions
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
import java.util.HashMap
@Parcelize
@JsonObject
data class ReactionsOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: HashMap<String, List<ReactionVoter>>?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(HashMap())
constructor() : this(null, HashMap())
}

View File

@ -22,18 +22,20 @@
package com.nextcloud.talk.models.json.search
import android.os.Parcelable
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericMeta
import java.util.HashMap
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class ContactsByNumberOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var map: Map<String, String> = HashMap()
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(HashMap())
constructor() : this(null, HashMap())
}

View File

@ -1,76 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
import java.util.List;
@Parcel
@JsonObject
public class ExactSharees {
@JsonField(name = "users")
List<Sharee> exactSharees;
public List<Sharee> getExactSharees() {
return this.exactSharees;
}
public void setExactSharees(List<Sharee> exactSharees) {
this.exactSharees = exactSharees;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ExactSharees)) {
return false;
}
final ExactSharees other = (ExactSharees) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$exactSharees = this.getExactSharees();
final Object other$exactSharees = other.getExactSharees();
return this$exactSharees == null ? other$exactSharees == null : this$exactSharees.equals(other$exactSharees);
}
protected boolean canEqual(final Object other) {
return other instanceof ExactSharees;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $exactSharees = this.getExactSharees();
result = result * PRIME + ($exactSharees == null ? 43 : $exactSharees.hashCode());
return result;
}
public String toString() {
return "ExactSharees(exactSharees=" + this.getExactSharees() + ")";
}
}

View File

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class ExactSharees(
@JsonField(name = ["users"])
var exactSharees: List<Sharee>? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View File

@ -1,110 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class Sharee {
@JsonField(name = "id")
String id;
@JsonField(name = "value")
Value value;
@JsonField(name = "label")
String label;
public String getId() {
return this.id;
}
public Value getValue() {
return this.value;
}
public String getLabel() {
return this.label;
}
public void setId(String id) {
this.id = id;
}
public void setValue(Value value) {
this.value = value;
}
public void setLabel(String label) {
this.label = label;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof Sharee)) {
return false;
}
final Sharee other = (Sharee) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$id = this.getId();
final Object other$id = other.getId();
if (this$id == null ? other$id != null : !this$id.equals(other$id)) {
return false;
}
final Object this$value = this.getValue();
final Object other$value = other.getValue();
if (this$value == null ? other$value != null : !this$value.equals(other$value)) {
return false;
}
final Object this$label = this.getLabel();
final Object other$label = other.getLabel();
return this$label == null ? other$label == null : this$label.equals(other$label);
}
protected boolean canEqual(final Object other) {
return other instanceof Sharee;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $id = this.getId();
result = result * PRIME + ($id == null ? 43 : $id.hashCode());
final Object $value = this.getValue();
result = result * PRIME + ($value == null ? 43 : $value.hashCode());
final Object $label = this.getLabel();
result = result * PRIME + ($label == null ? 43 : $label.hashCode());
return result;
}
public String toString() {
return "Sharee(id=" + this.getId() + ", value=" + this.getValue() + ", label=" + this.getLabel() + ")";
}
}

View File

@ -0,0 +1,41 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class Sharee(
@JsonField(name = ["id"])
var id: String? = null,
@JsonField(name = ["value"])
var value: Value? = null,
@JsonField(name = ["label"])
var label: String? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null)
}

View File

@ -1,75 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import com.nextcloud.talk.models.json.generic.GenericOCS;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class ShareesOCS extends GenericOCS {
@JsonField(name = "data")
SharesData data;
public SharesData getData() {
return this.data;
}
public void setData(SharesData data) {
this.data = data;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ShareesOCS)) {
return false;
}
final ShareesOCS other = (ShareesOCS) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$data = this.getData();
final Object other$data = other.getData();
return this$data == null ? other$data == null : this$data.equals(other$data);
}
protected boolean canEqual(final Object other) {
return other instanceof ShareesOCS;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $data = this.getData();
result = result * PRIME + ($data == null ? 43 : $data.hashCode());
return result;
}
public String toString() {
return "ShareesOCS(data=" + this.getData() + ")";
}
}

View File

@ -0,0 +1,40 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class ShareesOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: SharesData? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null)
}

View File

@ -1,74 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class ShareesOverall {
@JsonField(name = "ocs")
ShareesOCS ocs;
public ShareesOCS getOcs() {
return this.ocs;
}
public void setOcs(ShareesOCS ocs) {
this.ocs = ocs;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ShareesOverall)) {
return false;
}
final ShareesOverall other = (ShareesOverall) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$ocs = this.getOcs();
final Object other$ocs = other.getOcs();
return this$ocs == null ? other$ocs == null : this$ocs.equals(other$ocs);
}
protected boolean canEqual(final Object other) {
return other instanceof ShareesOverall;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $ocs = this.getOcs();
result = result * PRIME + ($ocs == null ? 43 : $ocs.hashCode());
return result;
}
public String toString() {
return "ShareesOverall(ocs=" + this.getOcs() + ")";
}
}

View File

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class ShareesOverall(
@JsonField(name = ["ocs"])
var ocs: ShareesOCS? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View File

@ -1,94 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
import java.util.List;
@Parcel
@JsonObject
public class SharesData {
@JsonField(name = "users")
List<Sharee> users;
@JsonField(name = "exact")
ExactSharees exactUsers;
public List<Sharee> getUsers() {
return this.users;
}
public ExactSharees getExactUsers() {
return this.exactUsers;
}
public void setUsers(List<Sharee> users) {
this.users = users;
}
public void setExactUsers(ExactSharees exactUsers) {
this.exactUsers = exactUsers;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SharesData)) {
return false;
}
final SharesData other = (SharesData) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$users = this.getUsers();
final Object other$users = other.getUsers();
if (this$users == null ? other$users != null : !this$users.equals(other$users)) {
return false;
}
final Object this$exactUsers = this.getExactUsers();
final Object other$exactUsers = other.getExactUsers();
return this$exactUsers == null ? other$exactUsers == null : this$exactUsers.equals(other$exactUsers);
}
protected boolean canEqual(final Object other) {
return other instanceof SharesData;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $users = this.getUsers();
result = result * PRIME + ($users == null ? 43 : $users.hashCode());
final Object $exactUsers = this.getExactUsers();
result = result * PRIME + ($exactUsers == null ? 43 : $exactUsers.hashCode());
return result;
}
public String toString() {
return "SharesData(users=" + this.getUsers() + ", exactUsers=" + this.getExactUsers() + ")";
}
}

View File

@ -0,0 +1,39 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class SharesData(
@JsonField(name = ["users"])
var users: List<Sharee>? = null,
@JsonField(name = ["exact"])
var exactUsers: ExactSharees? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null)
}

View File

@ -1,74 +0,0 @@
/*
*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class Value {
@JsonField(name = "shareWith")
String shareWith;
public String getShareWith() {
return this.shareWith;
}
public void setShareWith(String shareWith) {
this.shareWith = shareWith;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof Value)) {
return false;
}
final Value other = (Value) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$shareWith = this.getShareWith();
final Object other$shareWith = other.getShareWith();
return this$shareWith == null ? other$shareWith == null : this$shareWith.equals(other$shareWith);
}
protected boolean canEqual(final Object other) {
return other instanceof Value;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $shareWith = this.getShareWith();
result = result * PRIME + ($shareWith == null ? 43 : $shareWith.hashCode());
return result;
}
public String toString() {
return "Value(shareWith=" + this.getShareWith() + ")";
}
}

View File

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.sharees
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class Value(
@JsonField(name = ["shareWith"])
var shareWith: String? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View File

@ -1,38 +1,40 @@
/*
* Nextcloud Talk application
* Nextcloud Talk application
*
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2021 Tim Krüger <t@timkrueger.me>
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2021 Tim Krüger <t@timkrueger.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.status
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class StatusOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: Status?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -2,6 +2,8 @@
* Nextcloud Talk application
*
* @author Marcel Hibbe
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2022 Marcel Hibbe (dev@mhibbe.de)
*
* This program is free software: you can redistribute it and/or modify
@ -23,15 +25,17 @@ package com.nextcloud.talk.models.json.status.predefined
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class PredefinedStatusOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: List<PredefinedStatus>?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -1,39 +1,41 @@
/*
* Nextcloud Talk application
* Nextcloud Talk application
*
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2021 Tim Krüger <t@timkrueger.me>
* @author Tim Krüger
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2021 Tim Krüger <t@timkrueger.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.statuses
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import com.nextcloud.talk.models.json.status.Status
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class StatusesOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: List<Status>?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -24,16 +24,18 @@ package com.nextcloud.talk.models.json.userprofile
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
import java.util.ArrayList
@Parcelize
@JsonObject
data class UserProfileFieldsOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: ArrayList<String>? = null
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -1,38 +1,40 @@
/*
* Nextcloud Talk application
* Nextcloud Talk application
*
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
* @author Mario Danic
* @author Andy Scherzinger
* Copyright (C) 2022 Andy Scherzinger <info@andy-scherzinger.de>
* Copyright (C) 2017 Mario Danic (mario@lovelyhq.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.nextcloud.talk.models.json.userprofile
import android.os.Parcelable
import com.bluelinelabs.logansquare.annotation.JsonField
import com.bluelinelabs.logansquare.annotation.JsonObject
import com.nextcloud.talk.models.json.generic.GenericOCS
import com.nextcloud.talk.models.json.generic.GenericMeta
import kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class UserProfileOCS(
@JsonField(name = ["meta"])
var meta: GenericMeta?,
@JsonField(name = ["data"])
var data: UserProfileData?
) : GenericOCS(), Parcelable {
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
constructor() : this(null, null)
}

View File

@ -318,7 +318,7 @@ class MessageActionsDialog(
}
override fun onNext(@NonNull genericOverall: GenericOverall) {
val statusCode = genericOverall.ocs.meta.statusCode
val statusCode = genericOverall.meta?.statusCode
if (statusCode == HTTP_CREATED) {
chatController.updateAdapterAfterSendReaction(message, emoji)
}

View File

@ -1 +1 @@
395
364