001package com.box.sdkgen.managers.chunkeduploads; 002 003import com.box.sdkgen.internal.SerializableObject; 004import com.fasterxml.jackson.annotation.JsonFilter; 005import com.fasterxml.jackson.annotation.JsonProperty; 006import java.util.Objects; 007 008@JsonFilter("nullablePropertyFilter") 009public class CreateFileUploadSessionRequestBody extends SerializableObject { 010 011 /** The ID of the folder to upload the new file to. */ 012 @JsonProperty("folder_id") 013 protected final String folderId; 014 015 /** The total number of bytes of the file to be uploaded. */ 016 @JsonProperty("file_size") 017 protected final long fileSize; 018 019 /** The name of new file. */ 020 @JsonProperty("file_name") 021 protected final String fileName; 022 023 public CreateFileUploadSessionRequestBody( 024 @JsonProperty("folder_id") String folderId, 025 @JsonProperty("file_size") long fileSize, 026 @JsonProperty("file_name") String fileName) { 027 super(); 028 this.folderId = folderId; 029 this.fileSize = fileSize; 030 this.fileName = fileName; 031 } 032 033 public String getFolderId() { 034 return folderId; 035 } 036 037 public long getFileSize() { 038 return fileSize; 039 } 040 041 public String getFileName() { 042 return fileName; 043 } 044 045 @Override 046 public boolean equals(Object o) { 047 if (this == o) { 048 return true; 049 } 050 if (o == null || getClass() != o.getClass()) { 051 return false; 052 } 053 CreateFileUploadSessionRequestBody casted = (CreateFileUploadSessionRequestBody) o; 054 return Objects.equals(folderId, casted.folderId) 055 && Objects.equals(fileSize, casted.fileSize) 056 && Objects.equals(fileName, casted.fileName); 057 } 058 059 @Override 060 public int hashCode() { 061 return Objects.hash(folderId, fileSize, fileName); 062 } 063 064 @Override 065 public String toString() { 066 return "CreateFileUploadSessionRequestBody{" 067 + "folderId='" 068 + folderId 069 + '\'' 070 + ", " 071 + "fileSize='" 072 + fileSize 073 + '\'' 074 + ", " 075 + "fileName='" 076 + fileName 077 + '\'' 078 + "}"; 079 } 080}