API/Autodoc/Files/RuStoreInstallReferrer.cs.en.md


Namespaces

Name

Classes

Name
class RuStore::UnityInstallReferrer::InstallReferrer — Class representing information about the application installation referrer from RuStore.

Source code

#nullable enable

namespace RuStore.UnityInstallReferrer {

    public class InstallReferrer {

        public long installAppTimestamp { get; }

        public string packageName { get; }

        public long receivedTimestamp { get; }

        public string referrerId { get; }

        public long? versionCode { get; }

        public string? utmCampaign { get; }

        public string? utmGroup { get; }

        public string? utmBanner { get; }

        public InstallReferrer(
            long installAppTimestamp,
            string packageName,
            long receivedTimestamp,
            string referrerId,
            long? versionCode,
            string? utmCampaign = null,
            string? utmGroup = null,
            string? utmBanner = null) {

            this.packageName = packageName;
            this.referrerId = referrerId;
            this.receivedTimestamp = receivedTimestamp;
            this.installAppTimestamp = installAppTimestamp;
            this.versionCode = versionCode;
            this.utmCampaign = utmCampaign;
            this.utmGroup = utmGroup;
            this.utmBanner = utmBanner;
        }

        public override bool Equals(object obj) {
            if (obj is InstallReferrer other) {
                return packageName == other.packageName &&
                       referrerId == other.referrerId &&
                       receivedTimestamp == other.receivedTimestamp &&
                       installAppTimestamp == other.installAppTimestamp &&
                       versionCode == other.versionCode &&
                       utmCampaign == other.utmCampaign &&
                       utmGroup == other.utmGroup &&
                       utmBanner == other.utmBanner;
            }

            return false;
        }

        public override int GetHashCode() {
            unchecked {
                int hash = packageName.GetHashCode();
                hash = (hash * 31) + referrerId.GetHashCode();
                hash = (hash * 31) + receivedTimestamp.GetHashCode();
                hash = (hash * 31) + installAppTimestamp.GetHashCode();
                hash = (hash * 31) + (versionCode?.GetHashCode() ?? 0);
                hash = (hash * 31) + (utmCampaign?.GetHashCode() ?? 0);
                hash = (hash * 31) + (utmGroup?.GetHashCode() ?? 0);
                hash = (hash * 31) + (utmBanner?.GetHashCode() ?? 0);

                return hash;
            }
        }
    }
}