com.atlan.model.search.aggregates.AssetViews Maven / Gradle / Ivy
// Generated by delombok at Wed Oct 16 22:16:04 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
Copyright 2022 Atlan Pte. Ltd. */
package com.atlan.model.search.aggregates;
/**
* Captures a specific aggregate result of assets and the views on that asset.
*/
public class AssetViews {
/**
* GUID of the asset that was viewed.
*/
String guid;
/**
* Number of times the asset has been viewed (in total).
*/
Long totalViews;
/**
* Number of distinct users that have viewed the asset.
*/
Long distinctUsers;
@java.lang.SuppressWarnings("all")
@lombok.Generated
AssetViews(final String guid, final Long totalViews, final Long distinctUsers) {
this.guid = guid;
this.totalViews = totalViews;
this.distinctUsers = distinctUsers;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static class AssetViewsBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String guid;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long totalViews;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long distinctUsers;
@java.lang.SuppressWarnings("all")
@lombok.Generated
AssetViewsBuilder() {
}
/**
* GUID of the asset that was viewed.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AssetViews.AssetViewsBuilder guid(final String guid) {
this.guid = guid;
return this;
}
/**
* Number of times the asset has been viewed (in total).
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AssetViews.AssetViewsBuilder totalViews(final Long totalViews) {
this.totalViews = totalViews;
return this;
}
/**
* Number of distinct users that have viewed the asset.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AssetViews.AssetViewsBuilder distinctUsers(final Long distinctUsers) {
this.distinctUsers = distinctUsers;
return this;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AssetViews build() {
return new AssetViews(this.guid, this.totalViews, this.distinctUsers);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "AssetViews.AssetViewsBuilder(guid=" + this.guid + ", totalViews=" + this.totalViews + ", distinctUsers=" + this.distinctUsers + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static AssetViews.AssetViewsBuilder builder() {
return new AssetViews.AssetViewsBuilder();
}
/**
* GUID of the asset that was viewed.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getGuid() {
return this.guid;
}
/**
* Number of times the asset has been viewed (in total).
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getTotalViews() {
return this.totalViews;
}
/**
* Number of distinct users that have viewed the asset.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getDistinctUsers() {
return this.distinctUsers;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof AssetViews)) return false;
final AssetViews other = (AssetViews) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$totalViews = this.getTotalViews();
final java.lang.Object other$totalViews = other.getTotalViews();
if (this$totalViews == null ? other$totalViews != null : !this$totalViews.equals(other$totalViews)) return false;
final java.lang.Object this$distinctUsers = this.getDistinctUsers();
final java.lang.Object other$distinctUsers = other.getDistinctUsers();
if (this$distinctUsers == null ? other$distinctUsers != null : !this$distinctUsers.equals(other$distinctUsers)) return false;
final java.lang.Object this$guid = this.getGuid();
final java.lang.Object other$guid = other.getGuid();
if (this$guid == null ? other$guid != null : !this$guid.equals(other$guid)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof AssetViews;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $totalViews = this.getTotalViews();
result = result * PRIME + ($totalViews == null ? 43 : $totalViews.hashCode());
final java.lang.Object $distinctUsers = this.getDistinctUsers();
result = result * PRIME + ($distinctUsers == null ? 43 : $distinctUsers.hashCode());
final java.lang.Object $guid = this.getGuid();
result = result * PRIME + ($guid == null ? 43 : $guid.hashCode());
return result;
}
}