
com.atlan.model.structs.PopularityInsights Maven / Gradle / Ivy
// Generated by delombok at Thu Oct 10 18:56:33 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
Copyright 2022 Atlan Pte. Ltd. */
package com.atlan.model.structs;
import com.atlan.model.enums.SourceCostUnitType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.annotation.processing.Generated;
import lombok.*;
/**
* Detailed information about an asset's usage or popularity based on aggregated queries.
*/
@Generated("com.atlan.generators.ModelGeneratorV2")
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PopularityInsights.PopularityInsightsBuilderImpl.class)
public class PopularityInsights extends AtlanStruct {
private static final long serialVersionUID = 2L;
public static final String TYPE_NAME = "PopularityInsights";
/**
* Fixed typeName for PopularityInsights.
*/
@JsonIgnore
String typeName;
/**
* Username or email of the user who ran the queries.
*/
String recordUser;
/**
* Query run at source.
*/
String recordQuery;
/**
* Duration for which the query ran at source.
*/
Long recordQueryDuration;
/**
* Number of queries run by the user.
*/
Long recordQueryCount;
/**
* Total number of users who ran queries.
*/
Long recordTotalUserCount;
/**
* Total compute cost for running all queries.
*/
Double recordComputeCost;
/**
* Maximum compute cost across all query runs.
*/
Double recordMaxComputeCost;
/**
* Unit of measure for recordComputeCost.
*/
SourceCostUnitType recordComputeCostUnit;
/**
* Timestamp of last operation or query run by the user.
*/
Long recordLastTimestamp;
/**
* Name of the warehouse on which the queries were run.
*/
String recordWarehouse;
/**
* Quickly create a new PopularityInsights.
* @param recordUser Username or email of the user who ran the queries.
* @param recordQuery Query run at source.
* @param recordQueryDuration Duration for which the query ran at source.
* @param recordQueryCount Number of queries run by the user.
* @param recordTotalUserCount Total number of users who ran queries.
* @param recordComputeCost Total compute cost for running all queries.
* @param recordMaxComputeCost Maximum compute cost across all query runs.
* @param recordComputeCostUnit Unit of measure for recordComputeCost.
* @param recordLastTimestamp Timestamp of last operation or query run by the user.
* @param recordWarehouse Name of the warehouse on which the queries were run.
* @return a PopularityInsights with the provided information
*/
public static PopularityInsights of(String recordUser, String recordQuery, Long recordQueryDuration, Long recordQueryCount, Long recordTotalUserCount, Double recordComputeCost, Double recordMaxComputeCost, SourceCostUnitType recordComputeCostUnit, Long recordLastTimestamp, String recordWarehouse) {
return PopularityInsights.builder().recordUser(recordUser).recordQuery(recordQuery).recordQueryDuration(recordQueryDuration).recordQueryCount(recordQueryCount).recordTotalUserCount(recordTotalUserCount).recordComputeCost(recordComputeCost).recordMaxComputeCost(recordMaxComputeCost).recordComputeCostUnit(recordComputeCostUnit).recordLastTimestamp(recordLastTimestamp).recordWarehouse(recordWarehouse).build();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static String $default$typeName() {
return TYPE_NAME;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static abstract class PopularityInsightsBuilder> extends AtlanStruct.AtlanStructBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private boolean typeName$set;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String typeName$value;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String recordUser;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String recordQuery;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long recordQueryDuration;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long recordQueryCount;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long recordTotalUserCount;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Double recordComputeCost;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Double recordMaxComputeCost;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private SourceCostUnitType recordComputeCostUnit;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long recordLastTimestamp;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String recordWarehouse;
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected B $fillValuesFrom(final C instance) {
super.$fillValuesFrom(instance);
PopularityInsights.PopularityInsightsBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
return self();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static void $fillValuesFromInstanceIntoBuilder(final PopularityInsights instance, final PopularityInsights.PopularityInsightsBuilder, ?> b) {
b.typeName(instance.typeName);
b.recordUser(instance.recordUser);
b.recordQuery(instance.recordQuery);
b.recordQueryDuration(instance.recordQueryDuration);
b.recordQueryCount(instance.recordQueryCount);
b.recordTotalUserCount(instance.recordTotalUserCount);
b.recordComputeCost(instance.recordComputeCost);
b.recordMaxComputeCost(instance.recordMaxComputeCost);
b.recordComputeCostUnit(instance.recordComputeCostUnit);
b.recordLastTimestamp(instance.recordLastTimestamp);
b.recordWarehouse(instance.recordWarehouse);
}
/**
* Fixed typeName for PopularityInsights.
* @return {@code this}.
*/
@JsonIgnore
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B typeName(final String typeName) {
this.typeName$value = typeName;
typeName$set = true;
return self();
}
/**
* Username or email of the user who ran the queries.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordUser(final String recordUser) {
this.recordUser = recordUser;
return self();
}
/**
* Query run at source.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordQuery(final String recordQuery) {
this.recordQuery = recordQuery;
return self();
}
/**
* Duration for which the query ran at source.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordQueryDuration(final Long recordQueryDuration) {
this.recordQueryDuration = recordQueryDuration;
return self();
}
/**
* Number of queries run by the user.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordQueryCount(final Long recordQueryCount) {
this.recordQueryCount = recordQueryCount;
return self();
}
/**
* Total number of users who ran queries.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordTotalUserCount(final Long recordTotalUserCount) {
this.recordTotalUserCount = recordTotalUserCount;
return self();
}
/**
* Total compute cost for running all queries.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordComputeCost(final Double recordComputeCost) {
this.recordComputeCost = recordComputeCost;
return self();
}
/**
* Maximum compute cost across all query runs.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordMaxComputeCost(final Double recordMaxComputeCost) {
this.recordMaxComputeCost = recordMaxComputeCost;
return self();
}
/**
* Unit of measure for recordComputeCost.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordComputeCostUnit(final SourceCostUnitType recordComputeCostUnit) {
this.recordComputeCostUnit = recordComputeCostUnit;
return self();
}
/**
* Timestamp of last operation or query run by the user.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordLastTimestamp(final Long recordLastTimestamp) {
this.recordLastTimestamp = recordLastTimestamp;
return self();
}
/**
* Name of the warehouse on which the queries were run.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B recordWarehouse(final String recordWarehouse) {
this.recordWarehouse = recordWarehouse;
return self();
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected abstract B self();
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public abstract C build();
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "PopularityInsights.PopularityInsightsBuilder(super=" + super.toString() + ", typeName$value=" + this.typeName$value + ", recordUser=" + this.recordUser + ", recordQuery=" + this.recordQuery + ", recordQueryDuration=" + this.recordQueryDuration + ", recordQueryCount=" + this.recordQueryCount + ", recordTotalUserCount=" + this.recordTotalUserCount + ", recordComputeCost=" + this.recordComputeCost + ", recordMaxComputeCost=" + this.recordMaxComputeCost + ", recordComputeCostUnit=" + this.recordComputeCostUnit + ", recordLastTimestamp=" + this.recordLastTimestamp + ", recordWarehouse=" + this.recordWarehouse + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
static final class PopularityInsightsBuilderImpl extends PopularityInsights.PopularityInsightsBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private PopularityInsightsBuilderImpl() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected PopularityInsights.PopularityInsightsBuilderImpl self() {
return this;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PopularityInsights build() {
return new PopularityInsights(this);
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected PopularityInsights(final PopularityInsights.PopularityInsightsBuilder, ?> b) {
super(b);
if (b.typeName$set) this.typeName = b.typeName$value;
else this.typeName = PopularityInsights.$default$typeName();
this.recordUser = b.recordUser;
this.recordQuery = b.recordQuery;
this.recordQueryDuration = b.recordQueryDuration;
this.recordQueryCount = b.recordQueryCount;
this.recordTotalUserCount = b.recordTotalUserCount;
this.recordComputeCost = b.recordComputeCost;
this.recordMaxComputeCost = b.recordMaxComputeCost;
this.recordComputeCostUnit = b.recordComputeCostUnit;
this.recordLastTimestamp = b.recordLastTimestamp;
this.recordWarehouse = b.recordWarehouse;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static PopularityInsights.PopularityInsightsBuilder, ?> builder() {
return new PopularityInsights.PopularityInsightsBuilderImpl();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PopularityInsights.PopularityInsightsBuilder, ?> toBuilder() {
return new PopularityInsights.PopularityInsightsBuilderImpl().$fillValuesFrom(this);
}
/**
* Username or email of the user who ran the queries.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getRecordUser() {
return this.recordUser;
}
/**
* Query run at source.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getRecordQuery() {
return this.recordQuery;
}
/**
* Duration for which the query ran at source.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getRecordQueryDuration() {
return this.recordQueryDuration;
}
/**
* Number of queries run by the user.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getRecordQueryCount() {
return this.recordQueryCount;
}
/**
* Total number of users who ran queries.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getRecordTotalUserCount() {
return this.recordTotalUserCount;
}
/**
* Total compute cost for running all queries.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Double getRecordComputeCost() {
return this.recordComputeCost;
}
/**
* Maximum compute cost across all query runs.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Double getRecordMaxComputeCost() {
return this.recordMaxComputeCost;
}
/**
* Unit of measure for recordComputeCost.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public SourceCostUnitType getRecordComputeCostUnit() {
return this.recordComputeCostUnit;
}
/**
* Timestamp of last operation or query run by the user.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getRecordLastTimestamp() {
return this.recordLastTimestamp;
}
/**
* Name of the warehouse on which the queries were run.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getRecordWarehouse() {
return this.recordWarehouse;
}
@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 PopularityInsights)) return false;
final PopularityInsights other = (PopularityInsights) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$recordQueryDuration = this.getRecordQueryDuration();
final java.lang.Object other$recordQueryDuration = other.getRecordQueryDuration();
if (this$recordQueryDuration == null ? other$recordQueryDuration != null : !this$recordQueryDuration.equals(other$recordQueryDuration)) return false;
final java.lang.Object this$recordQueryCount = this.getRecordQueryCount();
final java.lang.Object other$recordQueryCount = other.getRecordQueryCount();
if (this$recordQueryCount == null ? other$recordQueryCount != null : !this$recordQueryCount.equals(other$recordQueryCount)) return false;
final java.lang.Object this$recordTotalUserCount = this.getRecordTotalUserCount();
final java.lang.Object other$recordTotalUserCount = other.getRecordTotalUserCount();
if (this$recordTotalUserCount == null ? other$recordTotalUserCount != null : !this$recordTotalUserCount.equals(other$recordTotalUserCount)) return false;
final java.lang.Object this$recordComputeCost = this.getRecordComputeCost();
final java.lang.Object other$recordComputeCost = other.getRecordComputeCost();
if (this$recordComputeCost == null ? other$recordComputeCost != null : !this$recordComputeCost.equals(other$recordComputeCost)) return false;
final java.lang.Object this$recordMaxComputeCost = this.getRecordMaxComputeCost();
final java.lang.Object other$recordMaxComputeCost = other.getRecordMaxComputeCost();
if (this$recordMaxComputeCost == null ? other$recordMaxComputeCost != null : !this$recordMaxComputeCost.equals(other$recordMaxComputeCost)) return false;
final java.lang.Object this$recordLastTimestamp = this.getRecordLastTimestamp();
final java.lang.Object other$recordLastTimestamp = other.getRecordLastTimestamp();
if (this$recordLastTimestamp == null ? other$recordLastTimestamp != null : !this$recordLastTimestamp.equals(other$recordLastTimestamp)) return false;
final java.lang.Object this$typeName = this.getTypeName();
final java.lang.Object other$typeName = other.getTypeName();
if (this$typeName == null ? other$typeName != null : !this$typeName.equals(other$typeName)) return false;
final java.lang.Object this$recordUser = this.getRecordUser();
final java.lang.Object other$recordUser = other.getRecordUser();
if (this$recordUser == null ? other$recordUser != null : !this$recordUser.equals(other$recordUser)) return false;
final java.lang.Object this$recordQuery = this.getRecordQuery();
final java.lang.Object other$recordQuery = other.getRecordQuery();
if (this$recordQuery == null ? other$recordQuery != null : !this$recordQuery.equals(other$recordQuery)) return false;
final java.lang.Object this$recordComputeCostUnit = this.getRecordComputeCostUnit();
final java.lang.Object other$recordComputeCostUnit = other.getRecordComputeCostUnit();
if (this$recordComputeCostUnit == null ? other$recordComputeCostUnit != null : !this$recordComputeCostUnit.equals(other$recordComputeCostUnit)) return false;
final java.lang.Object this$recordWarehouse = this.getRecordWarehouse();
final java.lang.Object other$recordWarehouse = other.getRecordWarehouse();
if (this$recordWarehouse == null ? other$recordWarehouse != null : !this$recordWarehouse.equals(other$recordWarehouse)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof PopularityInsights;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final java.lang.Object $recordQueryDuration = this.getRecordQueryDuration();
result = result * PRIME + ($recordQueryDuration == null ? 43 : $recordQueryDuration.hashCode());
final java.lang.Object $recordQueryCount = this.getRecordQueryCount();
result = result * PRIME + ($recordQueryCount == null ? 43 : $recordQueryCount.hashCode());
final java.lang.Object $recordTotalUserCount = this.getRecordTotalUserCount();
result = result * PRIME + ($recordTotalUserCount == null ? 43 : $recordTotalUserCount.hashCode());
final java.lang.Object $recordComputeCost = this.getRecordComputeCost();
result = result * PRIME + ($recordComputeCost == null ? 43 : $recordComputeCost.hashCode());
final java.lang.Object $recordMaxComputeCost = this.getRecordMaxComputeCost();
result = result * PRIME + ($recordMaxComputeCost == null ? 43 : $recordMaxComputeCost.hashCode());
final java.lang.Object $recordLastTimestamp = this.getRecordLastTimestamp();
result = result * PRIME + ($recordLastTimestamp == null ? 43 : $recordLastTimestamp.hashCode());
final java.lang.Object $typeName = this.getTypeName();
result = result * PRIME + ($typeName == null ? 43 : $typeName.hashCode());
final java.lang.Object $recordUser = this.getRecordUser();
result = result * PRIME + ($recordUser == null ? 43 : $recordUser.hashCode());
final java.lang.Object $recordQuery = this.getRecordQuery();
result = result * PRIME + ($recordQuery == null ? 43 : $recordQuery.hashCode());
final java.lang.Object $recordComputeCostUnit = this.getRecordComputeCostUnit();
result = result * PRIME + ($recordComputeCostUnit == null ? 43 : $recordComputeCostUnit.hashCode());
final java.lang.Object $recordWarehouse = this.getRecordWarehouse();
result = result * PRIME + ($recordWarehouse == null ? 43 : $recordWarehouse.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "PopularityInsights(super=" + super.toString() + ", typeName=" + this.getTypeName() + ", recordUser=" + this.getRecordUser() + ", recordQuery=" + this.getRecordQuery() + ", recordQueryDuration=" + this.getRecordQueryDuration() + ", recordQueryCount=" + this.getRecordQueryCount() + ", recordTotalUserCount=" + this.getRecordTotalUserCount() + ", recordComputeCost=" + this.getRecordComputeCost() + ", recordMaxComputeCost=" + this.getRecordMaxComputeCost() + ", recordComputeCostUnit=" + this.getRecordComputeCostUnit() + ", recordLastTimestamp=" + this.getRecordLastTimestamp() + ", recordWarehouse=" + this.getRecordWarehouse() + ")";
}
/**
* Fixed typeName for PopularityInsights.
*/
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getTypeName() {
return this.typeName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy