com.atlan.model.structs.StarredDetails 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.structs;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.annotation.processing.Generated;
import lombok.*;
/**
* Detailed information about the users who have starred an asset.
*/
@Generated("com.atlan.generators.ModelGeneratorV2")
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = StarredDetails.StarredDetailsBuilderImpl.class)
public class StarredDetails extends AtlanStruct {
private static final long serialVersionUID = 2L;
public static final String TYPE_NAME = "StarredDetails";
/**
* Fixed typeName for StarredDetails.
*/
@JsonIgnore
String typeName;
/**
* Username of the user who starred the asset.
*/
String assetStarredBy;
/**
* Time at which the user starred the asset.
*/
Long assetStarredAt;
/**
* Quickly create a new StarredDetails.
* @param assetStarredBy Username of the user who starred the asset.
* @param assetStarredAt Time at which the user starred the asset.
* @return a StarredDetails with the provided information
*/
public static StarredDetails of(String assetStarredBy, Long assetStarredAt) {
return StarredDetails.builder().assetStarredBy(assetStarredBy).assetStarredAt(assetStarredAt).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 StarredDetailsBuilder> 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 assetStarredBy;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long assetStarredAt;
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected B $fillValuesFrom(final C instance) {
super.$fillValuesFrom(instance);
StarredDetails.StarredDetailsBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
return self();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static void $fillValuesFromInstanceIntoBuilder(final StarredDetails instance, final StarredDetails.StarredDetailsBuilder, ?> b) {
b.typeName(instance.typeName);
b.assetStarredBy(instance.assetStarredBy);
b.assetStarredAt(instance.assetStarredAt);
}
/**
* Fixed typeName for StarredDetails.
* @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 of the user who starred the asset.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B assetStarredBy(final String assetStarredBy) {
this.assetStarredBy = assetStarredBy;
return self();
}
/**
* Time at which the user starred the asset.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B assetStarredAt(final Long assetStarredAt) {
this.assetStarredAt = assetStarredAt;
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 "StarredDetails.StarredDetailsBuilder(super=" + super.toString() + ", typeName$value=" + this.typeName$value + ", assetStarredBy=" + this.assetStarredBy + ", assetStarredAt=" + this.assetStarredAt + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
static final class StarredDetailsBuilderImpl extends StarredDetails.StarredDetailsBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private StarredDetailsBuilderImpl() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected StarredDetails.StarredDetailsBuilderImpl self() {
return this;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public StarredDetails build() {
return new StarredDetails(this);
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected StarredDetails(final StarredDetails.StarredDetailsBuilder, ?> b) {
super(b);
if (b.typeName$set) this.typeName = b.typeName$value;
else this.typeName = StarredDetails.$default$typeName();
this.assetStarredBy = b.assetStarredBy;
this.assetStarredAt = b.assetStarredAt;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static StarredDetails.StarredDetailsBuilder, ?> builder() {
return new StarredDetails.StarredDetailsBuilderImpl();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public StarredDetails.StarredDetailsBuilder, ?> toBuilder() {
return new StarredDetails.StarredDetailsBuilderImpl().$fillValuesFrom(this);
}
/**
* Username of the user who starred the asset.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getAssetStarredBy() {
return this.assetStarredBy;
}
/**
* Time at which the user starred the asset.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getAssetStarredAt() {
return this.assetStarredAt;
}
@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 StarredDetails)) return false;
final StarredDetails other = (StarredDetails) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$assetStarredAt = this.getAssetStarredAt();
final java.lang.Object other$assetStarredAt = other.getAssetStarredAt();
if (this$assetStarredAt == null ? other$assetStarredAt != null : !this$assetStarredAt.equals(other$assetStarredAt)) 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$assetStarredBy = this.getAssetStarredBy();
final java.lang.Object other$assetStarredBy = other.getAssetStarredBy();
if (this$assetStarredBy == null ? other$assetStarredBy != null : !this$assetStarredBy.equals(other$assetStarredBy)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof StarredDetails;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final java.lang.Object $assetStarredAt = this.getAssetStarredAt();
result = result * PRIME + ($assetStarredAt == null ? 43 : $assetStarredAt.hashCode());
final java.lang.Object $typeName = this.getTypeName();
result = result * PRIME + ($typeName == null ? 43 : $typeName.hashCode());
final java.lang.Object $assetStarredBy = this.getAssetStarredBy();
result = result * PRIME + ($assetStarredBy == null ? 43 : $assetStarredBy.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "StarredDetails(super=" + super.toString() + ", typeName=" + this.getTypeName() + ", assetStarredBy=" + this.getAssetStarredBy() + ", assetStarredAt=" + this.getAssetStarredAt() + ")";
}
/**
* Fixed typeName for StarredDetails.
*/
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getTypeName() {
return this.typeName;
}
}