All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.atlan.model.relations.UserDefRelationship Maven / Gradle / Ivy
// Generated by delombok at Wed Oct 16 22:16:03 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
Copyright 2024 Atlan Pte. Ltd. */
package com.atlan.model.relations;
import com.atlan.exception.InvalidRequestException;
import com.atlan.model.assets.Asset;
import com.atlan.model.assets.IAsset;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
/**
* A generic relationship to hold relationship between any type of asset
*/
@Generated("com.atlan.generators.ModelGeneratorV2")
public class UserDefRelationship extends RelationshipAttributes {
private static final long serialVersionUID = 2L;
public static final String TYPE_NAME = "UserDefRelationship";
/**
* Fixed typeName for UserDefRelationships.
*/
String typeName;
/**
* Name for the relationship when referring from endDef2 asset to endDef1 asset
*/
String fromTypeLabel;
/**
* Name for the relationship when referring from endDef1 asset to endDef2 asset
*/
String toTypeLabel;
/**
* {@inheritDoc}
*/
@Override
public Map getAll() {
Map map = new HashMap<>();
if (fromTypeLabel != null) {
map.put("fromTypeLabel", fromTypeLabel);
}
if (toTypeLabel != null) {
map.put("toTypeLabel", toTypeLabel);
}
return map;
}
/**
* A generic relationship to hold relationship between any type of asset
*/
@Generated("com.atlan.generators.ModelGeneratorV2")
public static final class UserDefRelationshipFrom extends Asset {
private static final long serialVersionUID = 2L;
/**
* Fixed typeName for UserDefRelationship.
*/
String relationshipType;
/**
* Relationship attributes specific to UserDefRelationship.
*/
UserDefRelationship relationshipAttributes;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static String $default$relationshipType() {
return UserDefRelationship.TYPE_NAME;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static abstract class UserDefRelationshipFromBuilder> extends Asset.AssetBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private boolean relationshipType$set;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String relationshipType$value;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private UserDefRelationship relationshipAttributes;
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected B $fillValuesFrom(final C instance) {
super.$fillValuesFrom(instance);
UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
return self();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static void $fillValuesFromInstanceIntoBuilder(final UserDefRelationship.UserDefRelationshipFrom instance, final UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilder, ?> b) {
b.relationshipType(instance.relationshipType);
b.relationshipAttributes(instance.relationshipAttributes);
}
/**
* Fixed typeName for UserDefRelationship.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B relationshipType(final String relationshipType) {
this.relationshipType$value = relationshipType;
relationshipType$set = true;
return self();
}
/**
* Relationship attributes specific to UserDefRelationship.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B relationshipAttributes(final UserDefRelationship relationshipAttributes) {
this.relationshipAttributes = relationshipAttributes;
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 "UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilder(super=" + super.toString() + ", relationshipType$value=" + this.relationshipType$value + ", relationshipAttributes=" + this.relationshipAttributes + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static final class UserDefRelationshipFromBuilderImpl extends UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private UserDefRelationshipFromBuilderImpl() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilderImpl self() {
return this;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship.UserDefRelationshipFrom build() {
return new UserDefRelationship.UserDefRelationshipFrom(this);
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected UserDefRelationshipFrom(final UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilder, ?> b) {
super(b);
if (b.relationshipType$set) this.relationshipType = b.relationshipType$value;
else this.relationshipType = UserDefRelationship.UserDefRelationshipFrom.$default$relationshipType();
this.relationshipAttributes = b.relationshipAttributes;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilder, ?> _internal() {
return new UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilderImpl();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilder, ?> toBuilder() {
return new UserDefRelationship.UserDefRelationshipFrom.UserDefRelationshipFromBuilderImpl().$fillValuesFrom(this);
}
/**
* Relationship attributes specific to UserDefRelationship.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship getRelationshipAttributes() {
return this.relationshipAttributes;
}
@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 UserDefRelationship.UserDefRelationshipFrom)) return false;
final UserDefRelationship.UserDefRelationshipFrom other = (UserDefRelationship.UserDefRelationshipFrom) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$relationshipType = this.getRelationshipType();
final java.lang.Object other$relationshipType = other.getRelationshipType();
if (this$relationshipType == null ? other$relationshipType != null : !this$relationshipType.equals(other$relationshipType)) return false;
final java.lang.Object this$relationshipAttributes = this.getRelationshipAttributes();
final java.lang.Object other$relationshipAttributes = other.getRelationshipAttributes();
if (this$relationshipAttributes == null ? other$relationshipAttributes != null : !this$relationshipAttributes.equals(other$relationshipAttributes)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof UserDefRelationship.UserDefRelationshipFrom;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final java.lang.Object $relationshipType = this.getRelationshipType();
result = result * PRIME + ($relationshipType == null ? 43 : $relationshipType.hashCode());
final java.lang.Object $relationshipAttributes = this.getRelationshipAttributes();
result = result * PRIME + ($relationshipAttributes == null ? 43 : $relationshipAttributes.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "UserDefRelationship.UserDefRelationshipFrom(super=" + super.toString() + ", relationshipType=" + this.getRelationshipType() + ", relationshipAttributes=" + this.getRelationshipAttributes() + ")";
}
/**
* Fixed typeName for UserDefRelationship.
*/
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getRelationshipType() {
return this.relationshipType;
}
}
/**
* A generic relationship to hold relationship between any type of asset
*/
@Generated("com.atlan.generators.ModelGeneratorV2")
public static final class UserDefRelationshipTo extends Asset {
private static final long serialVersionUID = 2L;
/**
* Fixed typeName for UserDefRelationship.
*/
String relationshipType;
/**
* Relationship attributes specific to UserDefRelationship.
*/
UserDefRelationship relationshipAttributes;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static String $default$relationshipType() {
return UserDefRelationship.TYPE_NAME;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static abstract class UserDefRelationshipToBuilder> extends Asset.AssetBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private boolean relationshipType$set;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String relationshipType$value;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private UserDefRelationship relationshipAttributes;
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected B $fillValuesFrom(final C instance) {
super.$fillValuesFrom(instance);
UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
return self();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static void $fillValuesFromInstanceIntoBuilder(final UserDefRelationship.UserDefRelationshipTo instance, final UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilder, ?> b) {
b.relationshipType(instance.relationshipType);
b.relationshipAttributes(instance.relationshipAttributes);
}
/**
* Fixed typeName for UserDefRelationship.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B relationshipType(final String relationshipType) {
this.relationshipType$value = relationshipType;
relationshipType$set = true;
return self();
}
/**
* Relationship attributes specific to UserDefRelationship.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B relationshipAttributes(final UserDefRelationship relationshipAttributes) {
this.relationshipAttributes = relationshipAttributes;
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 "UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilder(super=" + super.toString() + ", relationshipType$value=" + this.relationshipType$value + ", relationshipAttributes=" + this.relationshipAttributes + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static final class UserDefRelationshipToBuilderImpl extends UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private UserDefRelationshipToBuilderImpl() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilderImpl self() {
return this;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship.UserDefRelationshipTo build() {
return new UserDefRelationship.UserDefRelationshipTo(this);
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected UserDefRelationshipTo(final UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilder, ?> b) {
super(b);
if (b.relationshipType$set) this.relationshipType = b.relationshipType$value;
else this.relationshipType = UserDefRelationship.UserDefRelationshipTo.$default$relationshipType();
this.relationshipAttributes = b.relationshipAttributes;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilder, ?> _internal() {
return new UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilderImpl();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilder, ?> toBuilder() {
return new UserDefRelationship.UserDefRelationshipTo.UserDefRelationshipToBuilderImpl().$fillValuesFrom(this);
}
/**
* Relationship attributes specific to UserDefRelationship.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship getRelationshipAttributes() {
return this.relationshipAttributes;
}
@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 UserDefRelationship.UserDefRelationshipTo)) return false;
final UserDefRelationship.UserDefRelationshipTo other = (UserDefRelationship.UserDefRelationshipTo) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$relationshipType = this.getRelationshipType();
final java.lang.Object other$relationshipType = other.getRelationshipType();
if (this$relationshipType == null ? other$relationshipType != null : !this$relationshipType.equals(other$relationshipType)) return false;
final java.lang.Object this$relationshipAttributes = this.getRelationshipAttributes();
final java.lang.Object other$relationshipAttributes = other.getRelationshipAttributes();
if (this$relationshipAttributes == null ? other$relationshipAttributes != null : !this$relationshipAttributes.equals(other$relationshipAttributes)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof UserDefRelationship.UserDefRelationshipTo;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final java.lang.Object $relationshipType = this.getRelationshipType();
result = result * PRIME + ($relationshipType == null ? 43 : $relationshipType.hashCode());
final java.lang.Object $relationshipAttributes = this.getRelationshipAttributes();
result = result * PRIME + ($relationshipAttributes == null ? 43 : $relationshipAttributes.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "UserDefRelationship.UserDefRelationshipTo(super=" + super.toString() + ", relationshipType=" + this.getRelationshipType() + ", relationshipAttributes=" + this.getRelationshipAttributes() + ")";
}
/**
* Fixed typeName for UserDefRelationship.
*/
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getRelationshipType() {
return this.relationshipType;
}
}
public static abstract class UserDefRelationshipBuilder> extends RelationshipAttributes.RelationshipAttributesBuilder {
@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 fromTypeLabel;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private String toTypeLabel;
/**
* Build the UserDefRelationship relationship (with attributes) into a related object.
*
* @param related the related asset to which to build the detailed relationship
* @return a detailed Atlan relationship that conforms to the necessary interface for a related asset
* @throws InvalidRequestException if the asset provided is without a GUID or qualifiedName
*/
public IAsset userDefRelationshipFrom(IAsset related) throws InvalidRequestException {
UserDefRelationship attributes = build();
if (related.getGuid() != null && !related.getGuid().isBlank()) {
return UserDefRelationshipFrom._internal().guid(related.getGuid()).relationshipAttributes(attributes).build();
} else {
return UserDefRelationshipFrom._internal().uniqueAttributes(UniqueAttributes.builder().qualifiedName(related.getQualifiedName()).build()).relationshipAttributes(attributes).build();
}
}
/**
* Build the UserDefRelationship relationship (with attributes) into a related object.
*
* @param related the related asset to which to build the detailed relationship
* @return a detailed Atlan relationship that conforms to the necessary interface for a related asset
* @throws InvalidRequestException if the asset provided is without a GUID or qualifiedName
*/
public IAsset userDefRelationshipTo(IAsset related) throws InvalidRequestException {
UserDefRelationship attributes = build();
if (related.getGuid() != null && !related.getGuid().isBlank()) {
return UserDefRelationshipTo._internal().guid(related.getGuid()).relationshipAttributes(attributes).build();
} else {
return UserDefRelationshipTo._internal().uniqueAttributes(UniqueAttributes.builder().qualifiedName(related.getQualifiedName()).build()).relationshipAttributes(attributes).build();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected B $fillValuesFrom(final C instance) {
super.$fillValuesFrom(instance);
UserDefRelationship.UserDefRelationshipBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
return self();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static void $fillValuesFromInstanceIntoBuilder(final UserDefRelationship instance, final UserDefRelationship.UserDefRelationshipBuilder, ?> b) {
b.typeName(instance.typeName);
b.fromTypeLabel(instance.fromTypeLabel);
b.toTypeLabel(instance.toTypeLabel);
}
/**
* Fixed typeName for UserDefRelationships.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B typeName(final String typeName) {
this.typeName$value = typeName;
typeName$set = true;
return self();
}
/**
* Name for the relationship when referring from endDef2 asset to endDef1 asset
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B fromTypeLabel(final String fromTypeLabel) {
this.fromTypeLabel = fromTypeLabel;
return self();
}
/**
* Name for the relationship when referring from endDef1 asset to endDef2 asset
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public B toTypeLabel(final String toTypeLabel) {
this.toTypeLabel = toTypeLabel;
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 "UserDefRelationship.UserDefRelationshipBuilder(super=" + super.toString() + ", typeName$value=" + this.typeName$value + ", fromTypeLabel=" + this.fromTypeLabel + ", toTypeLabel=" + this.toTypeLabel + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static String $default$typeName() {
return TYPE_NAME;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
private static final class UserDefRelationshipBuilderImpl extends UserDefRelationship.UserDefRelationshipBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private UserDefRelationshipBuilderImpl() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected UserDefRelationship.UserDefRelationshipBuilderImpl self() {
return this;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship build() {
return new UserDefRelationship(this);
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected UserDefRelationship(final UserDefRelationship.UserDefRelationshipBuilder, ?> b) {
super(b);
if (b.typeName$set) this.typeName = b.typeName$value;
else this.typeName = UserDefRelationship.$default$typeName();
this.fromTypeLabel = b.fromTypeLabel;
this.toTypeLabel = b.toTypeLabel;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static UserDefRelationship.UserDefRelationshipBuilder, ?> builder() {
return new UserDefRelationship.UserDefRelationshipBuilderImpl();
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public UserDefRelationship.UserDefRelationshipBuilder, ?> toBuilder() {
return new UserDefRelationship.UserDefRelationshipBuilderImpl().$fillValuesFrom(this);
}
/**
* Name for the relationship when referring from endDef2 asset to endDef1 asset
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getFromTypeLabel() {
return this.fromTypeLabel;
}
/**
* Name for the relationship when referring from endDef1 asset to endDef2 asset
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getToTypeLabel() {
return this.toTypeLabel;
}
@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 UserDefRelationship)) return false;
final UserDefRelationship other = (UserDefRelationship) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) 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$fromTypeLabel = this.getFromTypeLabel();
final java.lang.Object other$fromTypeLabel = other.getFromTypeLabel();
if (this$fromTypeLabel == null ? other$fromTypeLabel != null : !this$fromTypeLabel.equals(other$fromTypeLabel)) return false;
final java.lang.Object this$toTypeLabel = this.getToTypeLabel();
final java.lang.Object other$toTypeLabel = other.getToTypeLabel();
if (this$toTypeLabel == null ? other$toTypeLabel != null : !this$toTypeLabel.equals(other$toTypeLabel)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof UserDefRelationship;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final java.lang.Object $typeName = this.getTypeName();
result = result * PRIME + ($typeName == null ? 43 : $typeName.hashCode());
final java.lang.Object $fromTypeLabel = this.getFromTypeLabel();
result = result * PRIME + ($fromTypeLabel == null ? 43 : $fromTypeLabel.hashCode());
final java.lang.Object $toTypeLabel = this.getToTypeLabel();
result = result * PRIME + ($toTypeLabel == null ? 43 : $toTypeLabel.hashCode());
return result;
}
/**
* Fixed typeName for UserDefRelationships.
*/
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getTypeName() {
return this.typeName;
}
}