com.stripe.model.FileLink Maven / Gradle / Ivy
// Generated by delombok at Thu Nov 08 14:01:03 PST 2018
package com.stripe.model;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import java.util.Map;
public class FileLink extends ApiResource implements MetadataStore, HasId {
String id;
String object;
Long created;
Boolean expired;
Long expiresAt;
ExpandableField file;
Boolean livemode;
Map metadata;
String url;
//
public String getFile() {
return (this.file != null) ? this.file.getId() : null;
}
public void setFile(String fileId) {
this.file = setExpandableFieldId(fileId, this.file);
}
public File getFileObject() {
return (this.file != null) ? this.file.getExpanded() : null;
}
public void setFileObject(File file) {
this.file = new ExpandableField(file.getId(), file);
}
//
//
/**
* Create a file link.
*/
public static FileLink create(Map params) throws StripeException {
return create(params, (RequestOptions) null);
}
/**
* Create a file link.
*/
public static FileLink create(Map params, RequestOptions options) throws StripeException {
return request(RequestMethod.POST, classUrl(FileLink.class), params, FileLink.class, options);
}
//
//
/**
* List all file links.
*/
public static FileLinkCollection list(Map params) throws StripeException {
return list(params, null);
}
/**
* List all file links.
*/
public static FileLinkCollection list(Map params, RequestOptions options) throws StripeException {
return requestCollection(classUrl(FileLink.class), params, FileLinkCollection.class, options);
}
//
//
/**
* Retrieve a file link.
*/
public static FileLink retrieve(String id) throws StripeException {
return retrieve(id, (RequestOptions) null);
}
/**
* Retrieve a file link.
*/
public static FileLink retrieve(String id, RequestOptions options) throws StripeException {
return retrieve(id, null, options);
}
/**
* Retrieve a file link.
*/
public static FileLink retrieve(String id, Map params, RequestOptions options) throws StripeException {
return request(RequestMethod.GET, instanceUrl(FileLink.class, id), params, FileLink.class, options);
}
//
//
/**
* Update a file link.
*/
@Override
public FileLink update(Map params) throws StripeException {
return update(params, (RequestOptions) null);
}
/**
* Update a file link.
*/
@Override
public FileLink update(Map params, RequestOptions options) throws StripeException {
return request(RequestMethod.POST, instanceUrl(FileLink.class, this.id), params, FileLink.class, options);
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getObject() {
return this.object;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getCreated() {
return this.created;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getExpired() {
return this.expired;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getExpiresAt() {
return this.expiresAt;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getLivemode() {
return this.livemode;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getUrl() {
return this.url;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setId(final String id) {
this.id = id;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setObject(final String object) {
this.object = object;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setCreated(final Long created) {
this.created = created;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setExpired(final Boolean expired) {
this.expired = expired;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setExpiresAt(final Long expiresAt) {
this.expiresAt = expiresAt;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setLivemode(final Boolean livemode) {
this.livemode = livemode;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setMetadata(final Map metadata) {
this.metadata = metadata;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setUrl(final String url) {
this.url = url;
}
@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 FileLink)) return false;
final FileLink other = (FileLink) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$id = this.getId();
final java.lang.Object other$id = other.getId();
if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
final java.lang.Object this$object = this.getObject();
final java.lang.Object other$object = other.getObject();
if (this$object == null ? other$object != null : !this$object.equals(other$object)) return false;
final java.lang.Object this$created = this.getCreated();
final java.lang.Object other$created = other.getCreated();
if (this$created == null ? other$created != null : !this$created.equals(other$created)) return false;
final java.lang.Object this$expired = this.getExpired();
final java.lang.Object other$expired = other.getExpired();
if (this$expired == null ? other$expired != null : !this$expired.equals(other$expired)) return false;
final java.lang.Object this$expiresAt = this.getExpiresAt();
final java.lang.Object other$expiresAt = other.getExpiresAt();
if (this$expiresAt == null ? other$expiresAt != null : !this$expiresAt.equals(other$expiresAt)) return false;
final java.lang.Object this$file = this.getFile();
final java.lang.Object other$file = other.getFile();
if (this$file == null ? other$file != null : !this$file.equals(other$file)) return false;
final java.lang.Object this$livemode = this.getLivemode();
final java.lang.Object other$livemode = other.getLivemode();
if (this$livemode == null ? other$livemode != null : !this$livemode.equals(other$livemode)) return false;
final java.lang.Object this$metadata = this.getMetadata();
final java.lang.Object other$metadata = other.getMetadata();
if (this$metadata == null ? other$metadata != null : !this$metadata.equals(other$metadata)) return false;
final java.lang.Object this$url = this.getUrl();
final java.lang.Object other$url = other.getUrl();
if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof FileLink;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $id = this.getId();
result = result * PRIME + ($id == null ? 43 : $id.hashCode());
final java.lang.Object $object = this.getObject();
result = result * PRIME + ($object == null ? 43 : $object.hashCode());
final java.lang.Object $created = this.getCreated();
result = result * PRIME + ($created == null ? 43 : $created.hashCode());
final java.lang.Object $expired = this.getExpired();
result = result * PRIME + ($expired == null ? 43 : $expired.hashCode());
final java.lang.Object $expiresAt = this.getExpiresAt();
result = result * PRIME + ($expiresAt == null ? 43 : $expiresAt.hashCode());
final java.lang.Object $file = this.getFile();
result = result * PRIME + ($file == null ? 43 : $file.hashCode());
final java.lang.Object $livemode = this.getLivemode();
result = result * PRIME + ($livemode == null ? 43 : $livemode.hashCode());
final java.lang.Object $metadata = this.getMetadata();
result = result * PRIME + ($metadata == null ? 43 : $metadata.hashCode());
final java.lang.Object $url = this.getUrl();
result = result * PRIME + ($url == null ? 43 : $url.hashCode());
return result;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getId() {
return this.id;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getMetadata() {
return this.metadata;
}
//
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy