001package com.box.sdkgen.schemas.filefull; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.fasterxml.jackson.annotation.JsonFilter; 006import com.fasterxml.jackson.annotation.JsonProperty; 007import java.util.Objects; 008 009@JsonFilter("nullablePropertyFilter") 010public class FileFullRepresentationsEntriesContentField extends SerializableObject { 011 012 /** 013 * The download URL that can be used to fetch the representation. Make sure to make an 014 * authenticated API call to this endpoint. 015 * 016 * <p>This URL is a template and will require the `{+asset_path}` to be replaced by a path. In 017 * general, for unpaged representations it can be replaced by an empty string. 018 * 019 * <p>For paged representations, replace the `{+asset_path}` with the page to request plus the 020 * extension for the file, for example `1.pdf`. 021 * 022 * <p>When requesting the download URL the following additional query params can be passed along. 023 * 024 * <p>* `set_content_disposition_type` - Sets the `Content-Disposition` header in the API response 025 * with the specified disposition type of either `inline` or `attachment`. If not supplied, the 026 * `Content-Disposition` header is not included in the response. 027 * 028 * <p>* `set_content_disposition_filename` - Allows the application to define the representation's 029 * file name used in the `Content-Disposition` header. If not defined, the filename is derived 030 * from the source file name in Box combined with the extension of the representation. 031 */ 032 @JsonProperty("url_template") 033 protected String urlTemplate; 034 035 public FileFullRepresentationsEntriesContentField() { 036 super(); 037 } 038 039 protected FileFullRepresentationsEntriesContentField(Builder builder) { 040 super(); 041 this.urlTemplate = builder.urlTemplate; 042 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 043 } 044 045 public String getUrlTemplate() { 046 return urlTemplate; 047 } 048 049 @Override 050 public boolean equals(Object o) { 051 if (this == o) { 052 return true; 053 } 054 if (o == null || getClass() != o.getClass()) { 055 return false; 056 } 057 FileFullRepresentationsEntriesContentField casted = 058 (FileFullRepresentationsEntriesContentField) o; 059 return Objects.equals(urlTemplate, casted.urlTemplate); 060 } 061 062 @Override 063 public int hashCode() { 064 return Objects.hash(urlTemplate); 065 } 066 067 @Override 068 public String toString() { 069 return "FileFullRepresentationsEntriesContentField{" 070 + "urlTemplate='" 071 + urlTemplate 072 + '\'' 073 + "}"; 074 } 075 076 public static class Builder extends NullableFieldTracker { 077 078 protected String urlTemplate; 079 080 public Builder urlTemplate(String urlTemplate) { 081 this.urlTemplate = urlTemplate; 082 return this; 083 } 084 085 public FileFullRepresentationsEntriesContentField build() { 086 return new FileFullRepresentationsEntriesContentField(this); 087 } 088 } 089}