001package com.box.sdkgen.managers.avatars; 002 003import java.io.InputStream; 004 005public class CreateUserAvatarRequestBody { 006 007 /** 008 * The image file to be uploaded to Box. Accepted file extensions are `.jpg` or `.png`. The 009 * maximum file size is 1MB. 010 */ 011 public final InputStream pic; 012 013 public String picFileName; 014 015 public String picContentType; 016 017 public CreateUserAvatarRequestBody(InputStream pic) { 018 this.pic = pic; 019 } 020 021 protected CreateUserAvatarRequestBody(Builder builder) { 022 this.pic = builder.pic; 023 this.picFileName = builder.picFileName; 024 this.picContentType = builder.picContentType; 025 } 026 027 public InputStream getPic() { 028 return pic; 029 } 030 031 public String getPicFileName() { 032 return picFileName; 033 } 034 035 public String getPicContentType() { 036 return picContentType; 037 } 038 039 public static class Builder { 040 041 protected final InputStream pic; 042 043 protected String picFileName; 044 045 protected String picContentType; 046 047 public Builder(InputStream pic) { 048 this.pic = pic; 049 } 050 051 public Builder picFileName(String picFileName) { 052 this.picFileName = picFileName; 053 return this; 054 } 055 056 public Builder picContentType(String picContentType) { 057 this.picContentType = picContentType; 058 return this; 059 } 060 061 public CreateUserAvatarRequestBody build() { 062 return new CreateUserAvatarRequestBody(this); 063 } 064 } 065}