导航菜单

页面标题

页面副标题

Kreate v1.5.0 - Context.java 源代码

正在查看: Kreate v1.5.0 应用的 Context.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package me.knighthat.innertube.request.body;

import java.util.Locale;
import me.knighthat.innertube.Constants;
import me.knighthat.innertube.UserAgents;

public class Context {
    public final Client client;
    public static final Context WEB_REMIX_DEFAULT = new Context(Client.WEB_REMIX);
    public static final Context IOS_DEFAULT = new Context(Client.IOS);
    public static final Context WEB_DEFAULT = new Context(Client.WEB);

    public Context(Client client) {
        if (client == null) {
            throw new NullPointerException("client is marked non-null but is null");
        }
        this.client = client;
    }

    protected boolean canEqual(Object obj) {
        return obj instanceof Context;
    }

    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Context)) {
            return false;
        }
        Context context = (Context) obj;
        if (!context.canEqual(this)) {
            return false;
        }
        Client client = getClient();
        Client client2 = context.getClient();
        return client != null ? client.equals(client2) : client2 == null;
    }

    public int hashCode() {
        Client client = getClient();
        return 59 + (client == null ? 43 : client.hashCode());
    }

    public String toString() {
        return "Context(client=" + getClient() + ")";
    }

    public Client getClient() {
        return this.client;
    }

    public static class Client {
        public final String acceptHeader;
        public final Integer androidSdkVersion;
        public final String clientName;
        public final String clientVersion;
        public final String deviceMake;
        public final String deviceModel;
        public final String gl;
        public final String hl;
        public final String originalUrl;
        public final String osName;
        public final String osVersion;
        public final String platform;
        public final String referer;
        public final String userAgent;
        public final String visitorData;
        public final int xClientName;
        public static final Client WEB_REMIX = new Client("WEB_REMIX", "1.20250416.01.00", "DESKTOP", Locale.getDefault().getLanguage(), Locale.getDefault().getCountry(), Constants.VISITOR_DATA, UserAgents.CHROME_WINDOWS, Constants.YOUTUBE_MUSIC_URL, 67, "", "", "", "", "https://www.youtube.com/watch?v=dQw4w9WgXcQ", Constants.ACCEPT_HEADERS, null);
        public static final Client IOS = new Client("IOS", "20.14.2", "MOBILE", Locale.getDefault().getLanguage(), Locale.getDefault().getCountry(), Constants.VISITOR_DATA, UserAgents.IOS, Constants.YOUTUBE_MUSIC_URL, 5, "Apple", "iPhone15,4", "iOS", "17.4.1.21E237", "https://www.youtube.com/watch?v=dQw4w9WgXcQ", Constants.ACCEPT_HEADERS, null);
        public static final Client WEB = new Client("WEB", "2.20250523.01.00", "DESKTOP", Locale.getDefault().getLanguage(), Locale.getDefault().getCountry(), Constants.VISITOR_DATA, UserAgents.CHROME_WINDOWS, Constants.YOUTUBE_URL, 1, "", "", "Windows", "", "https://www.youtube.com/watch?v=dQw4w9WgXcQ", Constants.ACCEPT_HEADERS, null);

        public Client(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, int i, String str9, String str10, String str11, String str12, String str13, String str14, Integer num) {
            if (str == null) {
                throw new NullPointerException("clientName is marked non-null but is null");
            }
            if (str2 == null) {
                throw new NullPointerException("clientVersion is marked non-null but is null");
            }
            if (str3 == null) {
                throw new NullPointerException("platform is marked non-null but is null");
            }
            if (str4 == null) {
                throw new NullPointerException("hl is marked non-null but is null");
            }
            if (str5 == null) {
                throw new NullPointerException("gl is marked non-null but is null");
            }
            if (str6 == null) {
                throw new NullPointerException("visitorData is marked non-null but is null");
            }
            if (str9 == null) {
                throw new NullPointerException("deviceMake is marked non-null but is null");
            }
            if (str10 == null) {
                throw new NullPointerException("deviceModel is marked non-null but is null");
            }
            if (str11 == null) {
                throw new NullPointerException("osName is marked non-null but is null");
            }
            if (str12 == null) {
                throw new NullPointerException("osVersion is marked non-null but is null");
            }
            this.clientName = str;
            this.clientVersion = str2;
            this.platform = str3;
            this.hl = str4;
            this.gl = str5;
            this.visitorData = str6;
            this.userAgent = str7;
            this.referer = str8;
            this.xClientName = i;
            this.deviceMake = str9;
            this.deviceModel = str10;
            this.osName = str11;
            this.osVersion = str12;
            this.originalUrl = str13;
            this.acceptHeader = str14;
            this.androidSdkVersion = num;
        }

        protected boolean canEqual(Object obj) {
            return obj instanceof Client;
        }

        public boolean equals(Object obj) {
            if (obj == this) {
                return true;
            }
            if (!(obj instanceof Client)) {
                return false;
            }
            Client client = (Client) obj;
            if (!client.canEqual(this) || getXClientName() != client.getXClientName()) {
                return false;
            }
            Integer androidSdkVersion = getAndroidSdkVersion();
            Integer androidSdkVersion2 = client.getAndroidSdkVersion();
            if (androidSdkVersion != null ? !androidSdkVersion.equals(androidSdkVersion2) : androidSdkVersion2 != null) {
                return false;
            }
            String clientName = getClientName();
            String clientName2 = client.getClientName();
            if (clientName != null ? !clientName.equals(clientName2) : clientName2 != null) {
                return false;
            }
            String clientVersion = getClientVersion();
            String clientVersion2 = client.getClientVersion();
            if (clientVersion != null ? !clientVersion.equals(clientVersion2) : clientVersion2 != null) {
                return false;
            }
            String platform = getPlatform();
            String platform2 = client.getPlatform();
            if (platform != null ? !platform.equals(platform2) : platform2 != null) {
                return false;
            }
            String hl = getHl();
            String hl2 = client.getHl();
            if (hl != null ? !hl.equals(hl2) : hl2 != null) {
                return false;
            }
            String gl = getGl();
            String gl2 = client.getGl();
            if (gl != null ? !gl.equals(gl2) : gl2 != null) {
                return false;
            }
            String visitorData = getVisitorData();
            String visitorData2 = client.getVisitorData();
            if (visitorData != null ? !visitorData.equals(visitorData2) : visitorData2 != null) {
                return false;
            }
            String userAgent = getUserAgent();
            String userAgent2 = client.getUserAgent();
            if (userAgent != null ? !userAgent.equals(userAgent2) : userAgent2 != null) {
                return false;
            }
            String referer = getReferer();
            String referer2 = client.getReferer();
            if (referer != null ? !referer.equals(referer2) : referer2 != null) {
                return false;
            }
            String deviceMake = getDeviceMake();
            String deviceMake2 = client.getDeviceMake();
            if (deviceMake != null ? !deviceMake.equals(deviceMake2) : deviceMake2 != null) {
                return false;
            }
            String deviceModel = getDeviceModel();
            String deviceModel2 = client.getDeviceModel();
            if (deviceModel != null ? !deviceModel.equals(deviceModel2) : deviceModel2 != null) {
                return false;
            }
            String osName = getOsName();
            String osName2 = client.getOsName();
            if (osName != null ? !osName.equals(osName2) : osName2 != null) {
                return false;
            }
            String osVersion = getOsVersion();
            String osVersion2 = client.getOsVersion();
            if (osVersion != null ? !osVersion.equals(osVersion2) : osVersion2 != null) {
                return false;
            }
            String originalUrl = getOriginalUrl();
            String originalUrl2 = client.getOriginalUrl();
            if (originalUrl != null ? !originalUrl.equals(originalUrl2) : originalUrl2 != null) {
                return false;
            }
            String acceptHeader = getAcceptHeader();
            String acceptHeader2 = client.getAcceptHeader();
            return acceptHeader != null ? acceptHeader.equals(acceptHeader2) : acceptHeader2 == null;
        }

        public int hashCode() {
            int xClientName = getXClientName() + 59;
            Integer androidSdkVersion = getAndroidSdkVersion();
            int hashCode = (xClientName * 59) + (androidSdkVersion == null ? 43 : androidSdkVersion.hashCode());
            String clientName = getClientName();
            int hashCode2 = (hashCode * 59) + (clientName == null ? 43 : clientName.hashCode());
            String clientVersion = getClientVersion();
            int hashCode3 = (hashCode2 * 59) + (clientVersion == null ? 43 : clientVersion.hashCode());
            String platform = getPlatform();
            int hashCode4 = (hashCode3 * 59) + (platform == null ? 43 : platform.hashCode());
            String hl = getHl();
            int hashCode5 = (hashCode4 * 59) + (hl == null ? 43 : hl.hashCode());
            String gl = getGl();
            int hashCode6 = (hashCode5 * 59) + (gl == null ? 43 : gl.hashCode());
            String visitorData = getVisitorData();
            int hashCode7 = (hashCode6 * 59) + (visitorData == null ? 43 : visitorData.hashCode());
            String userAgent = getUserAgent();
            int hashCode8 = (hashCode7 * 59) + (userAgent == null ? 43 : userAgent.hashCode());
            String referer = getReferer();
            int hashCode9 = (hashCode8 * 59) + (referer == null ? 43 : referer.hashCode());
            String deviceMake = getDeviceMake();
            int hashCode10 = (hashCode9 * 59) + (deviceMake == null ? 43 : deviceMake.hashCode());
            String deviceModel = getDeviceModel();
            int hashCode11 = (hashCode10 * 59) + (deviceModel == null ? 43 : deviceModel.hashCode());
            String osName = getOsName();
            int hashCode12 = (hashCode11 * 59) + (osName == null ? 43 : osName.hashCode());
            String osVersion = getOsVersion();
            int hashCode13 = (hashCode12 * 59) + (osVersion == null ? 43 : osVersion.hashCode());
            String originalUrl = getOriginalUrl();
            int hashCode14 = (hashCode13 * 59) + (originalUrl == null ? 43 : originalUrl.hashCode());
            String acceptHeader = getAcceptHeader();
            return (hashCode14 * 59) + (acceptHeader != null ? acceptHeader.hashCode() : 43);
        }

        public String toString() {
            return "Context.Client(clientName=" + getClientName() + ", clientVersion=" + getClientVersion() + ", platform=" + getPlatform() + ", hl=" + getHl() + ", gl=" + getGl() + ", visitorData=" + getVisitorData() + ", userAgent=" + getUserAgent() + ", referer=" + getReferer() + ", xClientName=" + getXClientName() + ", deviceMake=" + getDeviceMake() + ", deviceModel=" + getDeviceModel() + ", osName=" + getOsName() + ", osVersion=" + getOsVersion() + ", originalUrl=" + getOriginalUrl() + ", acceptHeader=" + getAcceptHeader() + ", androidSdkVersion=" + getAndroidSdkVersion() + ")";
        }

        public String getClientName() {
            return this.clientName;
        }

        public String getClientVersion() {
            return this.clientVersion;
        }

        public String getPlatform() {
            return this.platform;
        }

        public String getHl() {
            return this.hl;
        }

        public String getGl() {
            return this.gl;
        }

        public String getVisitorData() {
            return this.visitorData;
        }

        public String getUserAgent() {
            return this.userAgent;
        }

        public String getReferer() {
            return this.referer;
        }

        public int getXClientName() {
            return this.xClientName;
        }

        public String getDeviceMake() {
            return this.deviceMake;
        }

        public String getDeviceModel() {
            return this.deviceModel;
        }

        public String getOsName() {
            return this.osName;
        }

        public String getOsVersion() {
            return this.osVersion;
        }

        public String getOriginalUrl() {
            return this.originalUrl;
        }

        public String getAcceptHeader() {
            return this.acceptHeader;
        }

        public Integer getAndroidSdkVersion() {
            return this.androidSdkVersion;
        }
    }
}