001package com.box.sdkgen.schemas.workflow; 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 WorkflowFlowsTriggerScopeField extends SerializableObject { 013 014 /** The trigger scope's resource type. */ 015 @JsonDeserialize( 016 using = 017 WorkflowFlowsTriggerScopeTypeField.WorkflowFlowsTriggerScopeTypeFieldDeserializer.class) 018 @JsonSerialize( 019 using = WorkflowFlowsTriggerScopeTypeField.WorkflowFlowsTriggerScopeTypeFieldSerializer.class) 020 protected EnumWrapper<WorkflowFlowsTriggerScopeTypeField> type; 021 022 /** Indicates the path of the condition value to check. */ 023 protected String ref; 024 025 /** The object the `ref` points to. */ 026 protected WorkflowFlowsTriggerScopeObjectField object; 027 028 public WorkflowFlowsTriggerScopeField() { 029 super(); 030 } 031 032 protected WorkflowFlowsTriggerScopeField(Builder builder) { 033 super(); 034 this.type = builder.type; 035 this.ref = builder.ref; 036 this.object = builder.object; 037 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 038 } 039 040 public EnumWrapper<WorkflowFlowsTriggerScopeTypeField> getType() { 041 return type; 042 } 043 044 public String getRef() { 045 return ref; 046 } 047 048 public WorkflowFlowsTriggerScopeObjectField getObject() { 049 return object; 050 } 051 052 @Override 053 public boolean equals(Object o) { 054 if (this == o) { 055 return true; 056 } 057 if (o == null || getClass() != o.getClass()) { 058 return false; 059 } 060 WorkflowFlowsTriggerScopeField casted = (WorkflowFlowsTriggerScopeField) o; 061 return Objects.equals(type, casted.type) 062 && Objects.equals(ref, casted.ref) 063 && Objects.equals(object, casted.object); 064 } 065 066 @Override 067 public int hashCode() { 068 return Objects.hash(type, ref, object); 069 } 070 071 @Override 072 public String toString() { 073 return "WorkflowFlowsTriggerScopeField{" 074 + "type='" 075 + type 076 + '\'' 077 + ", " 078 + "ref='" 079 + ref 080 + '\'' 081 + ", " 082 + "object='" 083 + object 084 + '\'' 085 + "}"; 086 } 087 088 public static class Builder extends NullableFieldTracker { 089 090 protected EnumWrapper<WorkflowFlowsTriggerScopeTypeField> type; 091 092 protected String ref; 093 094 protected WorkflowFlowsTriggerScopeObjectField object; 095 096 public Builder type(WorkflowFlowsTriggerScopeTypeField type) { 097 this.type = new EnumWrapper<WorkflowFlowsTriggerScopeTypeField>(type); 098 return this; 099 } 100 101 public Builder type(EnumWrapper<WorkflowFlowsTriggerScopeTypeField> type) { 102 this.type = type; 103 return this; 104 } 105 106 public Builder ref(String ref) { 107 this.ref = ref; 108 return this; 109 } 110 111 public Builder object(WorkflowFlowsTriggerScopeObjectField object) { 112 this.object = object; 113 return this; 114 } 115 116 public WorkflowFlowsTriggerScopeField build() { 117 return new WorkflowFlowsTriggerScopeField(this); 118 } 119 } 120}