001package com.box.sdkgen.managers.workflows; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.box.sdkgen.serialization.json.EnumWrapper; 006import com.fasterxml.jackson.annotation.JsonFilter; 007import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 008import com.fasterxml.jackson.databind.annotation.JsonSerialize; 009import java.util.Objects; 010 011@JsonFilter("nullablePropertyFilter") 012public class StartWorkflowRequestBodyFilesField extends SerializableObject { 013 014 /** The type of the file object. */ 015 @JsonDeserialize( 016 using = 017 StartWorkflowRequestBodyFilesTypeField.StartWorkflowRequestBodyFilesTypeFieldDeserializer 018 .class) 019 @JsonSerialize( 020 using = 021 StartWorkflowRequestBodyFilesTypeField.StartWorkflowRequestBodyFilesTypeFieldSerializer 022 .class) 023 protected EnumWrapper<StartWorkflowRequestBodyFilesTypeField> type; 024 025 /** The id of the file. */ 026 protected String id; 027 028 public StartWorkflowRequestBodyFilesField() { 029 super(); 030 } 031 032 protected StartWorkflowRequestBodyFilesField(Builder builder) { 033 super(); 034 this.type = builder.type; 035 this.id = builder.id; 036 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 037 } 038 039 public EnumWrapper<StartWorkflowRequestBodyFilesTypeField> getType() { 040 return type; 041 } 042 043 public String getId() { 044 return id; 045 } 046 047 @Override 048 public boolean equals(Object o) { 049 if (this == o) { 050 return true; 051 } 052 if (o == null || getClass() != o.getClass()) { 053 return false; 054 } 055 StartWorkflowRequestBodyFilesField casted = (StartWorkflowRequestBodyFilesField) o; 056 return Objects.equals(type, casted.type) && Objects.equals(id, casted.id); 057 } 058 059 @Override 060 public int hashCode() { 061 return Objects.hash(type, id); 062 } 063 064 @Override 065 public String toString() { 066 return "StartWorkflowRequestBodyFilesField{" 067 + "type='" 068 + type 069 + '\'' 070 + ", " 071 + "id='" 072 + id 073 + '\'' 074 + "}"; 075 } 076 077 public static class Builder extends NullableFieldTracker { 078 079 protected EnumWrapper<StartWorkflowRequestBodyFilesTypeField> type; 080 081 protected String id; 082 083 public Builder type(StartWorkflowRequestBodyFilesTypeField type) { 084 this.type = new EnumWrapper<StartWorkflowRequestBodyFilesTypeField>(type); 085 return this; 086 } 087 088 public Builder type(EnumWrapper<StartWorkflowRequestBodyFilesTypeField> type) { 089 this.type = type; 090 return this; 091 } 092 093 public Builder id(String id) { 094 this.id = id; 095 return this; 096 } 097 098 public StartWorkflowRequestBodyFilesField build() { 099 return new StartWorkflowRequestBodyFilesField(this); 100 } 101 } 102}