Remove Parceler from model capabilities

Resolves: #1548

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-02-17 11:20:53 +01:00 committed by Andy Scherzinger
parent dcc0a0fdd0
commit e49d014ec9
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
16 changed files with 325 additions and 845 deletions

View file

@ -1,149 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017-2018 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.capabilities;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
import java.util.HashMap;
import java.util.List;
@Parcel
@JsonObject
public class Capabilities {
@JsonField(name = "spreed")
SpreedCapability spreedCapability;
@JsonField(name = "notifications")
NotificationsCapability notificationsCapability;
@JsonField(name = "theming")
ThemingCapability themingCapability;
@JsonField(name = "external")
HashMap<String, List<String>> externalCapability;
@JsonField(name = "provisioning_api")
ProvisioningCapability provisioningCapability;
public SpreedCapability getSpreedCapability() {
return this.spreedCapability;
}
public NotificationsCapability getNotificationsCapability() {
return this.notificationsCapability;
}
public ThemingCapability getThemingCapability() {
return this.themingCapability;
}
public HashMap<String, List<String>> getExternalCapability() {
return this.externalCapability;
}
public ProvisioningCapability getProvisioningCapability() {
return this.provisioningCapability;
}
public void setSpreedCapability(SpreedCapability spreedCapability) {
this.spreedCapability = spreedCapability;
}
public void setNotificationsCapability(NotificationsCapability notificationsCapability) {
this.notificationsCapability = notificationsCapability;
}
public void setThemingCapability(ThemingCapability themingCapability) {
this.themingCapability = themingCapability;
}
public void setExternalCapability(HashMap<String, List<String>> externalCapability) {
this.externalCapability = externalCapability;
}
public void setProvisioningCapability(ProvisioningCapability provisioningCapability) {
this.provisioningCapability = provisioningCapability;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof Capabilities)) {
return false;
}
final Capabilities other = (Capabilities) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$spreedCapability = this.getSpreedCapability();
final Object other$spreedCapability = other.getSpreedCapability();
if (this$spreedCapability == null ? other$spreedCapability != null : !this$spreedCapability.equals(other$spreedCapability)) {
return false;
}
final Object this$notificationsCapability = this.getNotificationsCapability();
final Object other$notificationsCapability = other.getNotificationsCapability();
if (this$notificationsCapability == null ? other$notificationsCapability != null : !this$notificationsCapability.equals(other$notificationsCapability)) {
return false;
}
final Object this$themingCapability = this.getThemingCapability();
final Object other$themingCapability = other.getThemingCapability();
if (this$themingCapability == null ? other$themingCapability != null : !this$themingCapability.equals(other$themingCapability)) {
return false;
}
final Object this$externalCapability = this.getExternalCapability();
final Object other$externalCapability = other.getExternalCapability();
if (this$externalCapability == null ? other$externalCapability != null : !this$externalCapability.equals(other$externalCapability)) {
return false;
}
final Object this$provisioningCapability = this.getProvisioningCapability();
final Object other$provisioningCapability = other.getProvisioningCapability();
return this$provisioningCapability == null ? other$provisioningCapability == null : this$provisioningCapability.equals(other$provisioningCapability);
}
protected boolean canEqual(final Object other) {
return other instanceof Capabilities;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $spreedCapability = this.getSpreedCapability();
result = result * PRIME + ($spreedCapability == null ? 43 : $spreedCapability.hashCode());
final Object $notificationsCapability = this.getNotificationsCapability();
result = result * PRIME + ($notificationsCapability == null ? 43 : $notificationsCapability.hashCode());
final Object $themingCapability = this.getThemingCapability();
result = result * PRIME + ($themingCapability == null ? 43 : $themingCapability.hashCode());
final Object $externalCapability = this.getExternalCapability();
result = result * PRIME + ($externalCapability == null ? 43 : $externalCapability.hashCode());
final Object $provisioningCapability = this.getProvisioningCapability();
result = result * PRIME + ($provisioningCapability == null ? 43 : $provisioningCapability.hashCode());
return result;
}
public String toString() {
return "Capabilities(spreedCapability=" + this.getSpreedCapability() + ", notificationsCapability=" + this.getNotificationsCapability() + ", themingCapability=" + this.getThemingCapability() + ", externalCapability=" + this.getExternalCapability() + ", provisioningCapability=" + this.getProvisioningCapability() + ")";
}
}

View file

@ -0,0 +1,45 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 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.capabilities
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 Capabilities(
@JsonField(name = ["spreed"])
var spreedCapability: SpreedCapability?,
@JsonField(name = ["notifications"])
var notificationsCapability: NotificationsCapability?,
@JsonField(name = ["theming"])
var themingCapability: ThemingCapability?,
@JsonField(name = ["external"])
var externalCapability: HashMap<String, List<String>>?,
@JsonField(name = ["provisioning_api"])
var provisioningCapability: ProvisioningCapability?
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null, null, null, null)
}

View file

@ -1,74 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017-2018 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.capabilities;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class CapabilitiesList {
@JsonField(name = "capabilities")
Capabilities capabilities;
public Capabilities getCapabilities() {
return this.capabilities;
}
public void setCapabilities(Capabilities capabilities) {
this.capabilities = capabilities;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof CapabilitiesList)) {
return false;
}
final CapabilitiesList other = (CapabilitiesList) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$capabilities = this.getCapabilities();
final Object other$capabilities = other.getCapabilities();
return this$capabilities == null ? other$capabilities == null : this$capabilities.equals(other$capabilities);
}
protected boolean canEqual(final Object other) {
return other instanceof CapabilitiesList;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $capabilities = this.getCapabilities();
result = result * PRIME + ($capabilities == null ? 43 : $capabilities.hashCode());
return result;
}
public String toString() {
return "CapabilitiesList(capabilities=" + this.getCapabilities() + ")";
}
}

View file

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 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.capabilities
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 CapabilitiesList(
@JsonField(name = ["capabilities"])
var capabilities: Capabilities?
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View file

@ -1,74 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017-2018 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.capabilities;
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 CapabilitiesOCS extends GenericOCS {
@JsonField(name = "data")
CapabilitiesList data;
public CapabilitiesList getData() {
return this.data;
}
public void setData(CapabilitiesList data) {
this.data = data;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof CapabilitiesOCS)) {
return false;
}
final CapabilitiesOCS other = (CapabilitiesOCS) 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 CapabilitiesOCS;
}
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 "CapabilitiesOCS(data=" + this.getData() + ")";
}
}

View file

@ -0,0 +1,38 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 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.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 kotlinx.android.parcel.Parcelize
@Parcelize
@JsonObject
data class CapabilitiesOCS(
@JsonField(name = ["data"])
var data: CapabilitiesList?
) : GenericOCS(), Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View file

@ -1,73 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017-2018 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.capabilities;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class CapabilitiesOverall {
@JsonField(name = "ocs")
CapabilitiesOCS ocs;
public CapabilitiesOCS getOcs() {
return this.ocs;
}
public void setOcs(CapabilitiesOCS ocs) {
this.ocs = ocs;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof CapabilitiesOverall)) {
return false;
}
final CapabilitiesOverall other = (CapabilitiesOverall) 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 CapabilitiesOverall;
}
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 "CapabilitiesOverall(ocs=" + this.getOcs() + ")";
}
}

View file

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 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.capabilities
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 CapabilitiesOverall(
@JsonField(name = ["ocs"])
var ocs: CapabilitiesOCS? = null
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View file

@ -1,76 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017-2018 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.capabilities;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
import java.util.List;
@Parcel
@JsonObject
public class NotificationsCapability {
@JsonField(name = "ocs-endpoints")
List<String> features;
public List<String> getFeatures() {
return this.features;
}
public void setFeatures(List<String> features) {
this.features = features;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof NotificationsCapability)) {
return false;
}
final NotificationsCapability other = (NotificationsCapability) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$features = this.getFeatures();
final Object other$features = other.getFeatures();
return this$features == null ? other$features == null : this$features.equals(other$features);
}
protected boolean canEqual(final Object other) {
return other instanceof NotificationsCapability;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $features = this.getFeatures();
result = result * PRIME + ($features == null ? 43 : $features.hashCode());
return result;
}
public String toString() {
return "NotificationsCapability(features=" + this.getFeatures() + ")";
}
}

View file

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 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.capabilities
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 NotificationsCapability(
@JsonField(name = ["ocs-endpoints"])
var features: List<String>?
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View file

@ -1,74 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Tobias Kaminsky
* Copyright (C) 2021 Tobias Kaminsky <tobias.kaminsky@nextcloud.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.capabilities;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class ProvisioningCapability {
@JsonField(name = "AccountPropertyScopesVersion")
Integer accountPropertyScopesVersion;
public Integer getAccountPropertyScopesVersion() {
return this.accountPropertyScopesVersion;
}
public void setAccountPropertyScopesVersion(Integer accountPropertyScopesVersion) {
this.accountPropertyScopesVersion = accountPropertyScopesVersion;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ProvisioningCapability)) {
return false;
}
final ProvisioningCapability other = (ProvisioningCapability) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$accountPropertyScopesVersion = this.getAccountPropertyScopesVersion();
final Object other$accountPropertyScopesVersion = other.getAccountPropertyScopesVersion();
return this$accountPropertyScopesVersion == null ? other$accountPropertyScopesVersion == null : this$accountPropertyScopesVersion.equals(other$accountPropertyScopesVersion);
}
protected boolean canEqual(final Object other) {
return other instanceof ProvisioningCapability;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $accountPropertyScopesVersion = this.getAccountPropertyScopesVersion();
result = result * PRIME + ($accountPropertyScopesVersion == null ? 43 : $accountPropertyScopesVersion.hashCode());
return result;
}
public String toString() {
return "ProvisioningCapability(accountPropertyScopesVersion=" + this.getAccountPropertyScopesVersion() + ")";
}
}

View file

@ -0,0 +1,37 @@
/*
* Nextcloud Talk application
*
* @author Tobias Kaminsky
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2021 Tobias Kaminsky <tobias.kaminsky@nextcloud.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.capabilities
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 ProvisioningCapability(
@JsonField(name = ["AccountPropertyScopesVersion"])
var accountPropertyScopesVersion: Int?
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null)
}

View file

@ -1,95 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017-2018 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.capabilities;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
import java.util.HashMap;
import java.util.List;
@Parcel
@JsonObject
public class SpreedCapability {
@JsonField(name = "features")
List<String> features;
@JsonField(name = "config")
HashMap<String, HashMap<String, String>> config;
public List<String> getFeatures() {
return this.features;
}
public HashMap<String, HashMap<String, String>> getConfig() {
return this.config;
}
public void setFeatures(List<String> features) {
this.features = features;
}
public void setConfig(HashMap<String, HashMap<String, String>> config) {
this.config = config;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SpreedCapability)) {
return false;
}
final SpreedCapability other = (SpreedCapability) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$features = this.getFeatures();
final Object other$features = other.getFeatures();
if (this$features == null ? other$features != null : !this$features.equals(other$features)) {
return false;
}
final Object this$config = this.getConfig();
final Object other$config = other.getConfig();
return this$config == null ? other$config == null : this$config.equals(other$config);
}
protected boolean canEqual(final Object other) {
return other instanceof SpreedCapability;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $features = this.getFeatures();
result = result * PRIME + ($features == null ? 43 : $features.hashCode());
final Object $config = this.getConfig();
result = result * PRIME + ($config == null ? 43 : $config.hashCode());
return result;
}
public String toString() {
return "SpreedCapability(features=" + this.getFeatures() + ", config=" + this.getConfig() + ")";
}
}

View file

@ -0,0 +1,39 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2018 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.capabilities
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 SpreedCapability(
@JsonField(name = ["features"])
var features: List<String>?,
@JsonField(name = ["config"])
var config: HashMap<String, HashMap<String, String>>?
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null)
}

View file

@ -1,230 +0,0 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* Copyright (C) 2017-2019 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.capabilities;
import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import org.parceler.Parcel;
@Parcel
@JsonObject
public class ThemingCapability {
@JsonField(name = "name")
String name;
@JsonField(name = "url")
String url;
@JsonField(name = "slogan")
String slogan;
@JsonField(name = "color")
String color;
@JsonField(name = "color-text")
String colorText;
@JsonField(name = "color-element")
String colorElement;
@JsonField(name = "logo")
String logo;
@JsonField(name = "background")
String background;
@JsonField(name = "background-plain")
boolean backgroundPlain;
@JsonField(name = "background-default")
boolean backgroundDefault;
public String getName() {
return this.name;
}
public String getUrl() {
return this.url;
}
public String getSlogan() {
return this.slogan;
}
public String getColor() {
return this.color;
}
public String getColorText() {
return this.colorText;
}
public String getColorElement() {
return this.colorElement;
}
public String getLogo() {
return this.logo;
}
public String getBackground() {
return this.background;
}
public boolean isBackgroundPlain() {
return this.backgroundPlain;
}
public boolean isBackgroundDefault() {
return this.backgroundDefault;
}
public void setName(String name) {
this.name = name;
}
public void setUrl(String url) {
this.url = url;
}
public void setSlogan(String slogan) {
this.slogan = slogan;
}
public void setColor(String color) {
this.color = color;
}
public void setColorText(String colorText) {
this.colorText = colorText;
}
public void setColorElement(String colorElement) {
this.colorElement = colorElement;
}
public void setLogo(String logo) {
this.logo = logo;
}
public void setBackground(String background) {
this.background = background;
}
public void setBackgroundPlain(boolean backgroundPlain) {
this.backgroundPlain = backgroundPlain;
}
public void setBackgroundDefault(boolean backgroundDefault) {
this.backgroundDefault = backgroundDefault;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ThemingCapability)) {
return false;
}
final ThemingCapability other = (ThemingCapability) o;
if (!other.canEqual((Object) this)) {
return false;
}
final Object this$name = this.getName();
final Object other$name = other.getName();
if (this$name == null ? other$name != null : !this$name.equals(other$name)) {
return false;
}
final Object this$url = this.getUrl();
final Object other$url = other.getUrl();
if (this$url == null ? other$url != null : !this$url.equals(other$url)) {
return false;
}
final Object this$slogan = this.getSlogan();
final Object other$slogan = other.getSlogan();
if (this$slogan == null ? other$slogan != null : !this$slogan.equals(other$slogan)) {
return false;
}
final Object this$color = this.getColor();
final Object other$color = other.getColor();
if (this$color == null ? other$color != null : !this$color.equals(other$color)) {
return false;
}
final Object this$colorText = this.getColorText();
final Object other$colorText = other.getColorText();
if (this$colorText == null ? other$colorText != null : !this$colorText.equals(other$colorText)) {
return false;
}
final Object this$colorElement = this.getColorElement();
final Object other$colorElement = other.getColorElement();
if (this$colorElement == null ? other$colorElement != null : !this$colorElement.equals(other$colorElement)) {
return false;
}
final Object this$logo = this.getLogo();
final Object other$logo = other.getLogo();
if (this$logo == null ? other$logo != null : !this$logo.equals(other$logo)) {
return false;
}
final Object this$background = this.getBackground();
final Object other$background = other.getBackground();
if (this$background == null ? other$background != null : !this$background.equals(other$background)) {
return false;
}
if (this.isBackgroundPlain() != other.isBackgroundPlain()) {
return false;
}
return this.isBackgroundDefault() == other.isBackgroundDefault();
}
protected boolean canEqual(final Object other) {
return other instanceof ThemingCapability;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $name = this.getName();
result = result * PRIME + ($name == null ? 43 : $name.hashCode());
final Object $url = this.getUrl();
result = result * PRIME + ($url == null ? 43 : $url.hashCode());
final Object $slogan = this.getSlogan();
result = result * PRIME + ($slogan == null ? 43 : $slogan.hashCode());
final Object $color = this.getColor();
result = result * PRIME + ($color == null ? 43 : $color.hashCode());
final Object $colorText = this.getColorText();
result = result * PRIME + ($colorText == null ? 43 : $colorText.hashCode());
final Object $colorElement = this.getColorElement();
result = result * PRIME + ($colorElement == null ? 43 : $colorElement.hashCode());
final Object $logo = this.getLogo();
result = result * PRIME + ($logo == null ? 43 : $logo.hashCode());
final Object $background = this.getBackground();
result = result * PRIME + ($background == null ? 43 : $background.hashCode());
result = result * PRIME + (this.isBackgroundPlain() ? 79 : 97);
result = result * PRIME + (this.isBackgroundDefault() ? 79 : 97);
return result;
}
public String toString() {
return "ThemingCapability(name=" + this.getName() + ", url=" + this.getUrl() + ", slogan=" + this.getSlogan() + ", color=" + this.getColor() + ", colorText=" + this.getColorText() + ", colorElement=" + this.getColorElement() + ", logo=" + this.getLogo() + ", background=" + this.getBackground() + ", backgroundPlain=" + this.isBackgroundPlain() + ", backgroundDefault=" + this.isBackgroundDefault() + ")";
}
}

View file

@ -0,0 +1,55 @@
/*
* Nextcloud Talk application
*
* @author Mario Danic
* @author Tim Krüger
* Copyright (C) 2022 Tim Krüger <t@timkrueger.me>
* Copyright (C) 2017-2019 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.capabilities
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 ThemingCapability(
@JsonField(name = ["name"])
var name: String?,
@JsonField(name = ["url"])
var url: String?,
@JsonField(name = ["slogan"])
var slogan: String?,
@JsonField(name = ["color"])
var color: String?,
@JsonField(name = ["color-text"])
var colorText: String?,
@JsonField(name = ["color-element"])
var colorElement: String?,
@JsonField(name = ["logo"])
var logo: String?,
@JsonField(name = ["background"])
var background: String?,
@JsonField(name = ["background-plain"])
var backgroundPlain: Boolean?,
@JsonField(name = ["background-default"])
var backgroundDefault: Boolean?
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null, null, null, null, null, null, null, null, null)
}