001package com.box.sdkgen.schemas.signtemplate; 002 003import com.box.sdkgen.internal.Nullable; 004import com.box.sdkgen.internal.NullableFieldTracker; 005import com.box.sdkgen.internal.SerializableObject; 006import com.fasterxml.jackson.annotation.JsonFilter; 007import com.fasterxml.jackson.annotation.JsonProperty; 008import java.util.Objects; 009 010@JsonFilter("nullablePropertyFilter") 011public class SignTemplateReadySignLinkField extends SerializableObject { 012 013 /** The URL that can be sent to signers. */ 014 protected String url; 015 016 /** Request name. */ 017 @Nullable protected String name; 018 019 /** Extra instructions for all signers. */ 020 @Nullable protected String instructions; 021 022 /** 023 * The destination folder to place final, signed document and signing log. Only `ID` and `type` 024 * fields are required. The root folder, folder ID `0`, cannot be used. 025 */ 026 @JsonProperty("folder_id") 027 @Nullable 028 protected String folderId; 029 030 /** Whether to disable notifications when a signer has signed. */ 031 @JsonProperty("is_notification_disabled") 032 protected Boolean isNotificationDisabled; 033 034 /** Whether the ready sign link is enabled or not. */ 035 @JsonProperty("is_active") 036 protected Boolean isActive; 037 038 public SignTemplateReadySignLinkField() { 039 super(); 040 } 041 042 protected SignTemplateReadySignLinkField(Builder builder) { 043 super(); 044 this.url = builder.url; 045 this.name = builder.name; 046 this.instructions = builder.instructions; 047 this.folderId = builder.folderId; 048 this.isNotificationDisabled = builder.isNotificationDisabled; 049 this.isActive = builder.isActive; 050 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 051 } 052 053 public String getUrl() { 054 return url; 055 } 056 057 public String getName() { 058 return name; 059 } 060 061 public String getInstructions() { 062 return instructions; 063 } 064 065 public String getFolderId() { 066 return folderId; 067 } 068 069 public Boolean getIsNotificationDisabled() { 070 return isNotificationDisabled; 071 } 072 073 public Boolean getIsActive() { 074 return isActive; 075 } 076 077 @Override 078 public boolean equals(Object o) { 079 if (this == o) { 080 return true; 081 } 082 if (o == null || getClass() != o.getClass()) { 083 return false; 084 } 085 SignTemplateReadySignLinkField casted = (SignTemplateReadySignLinkField) o; 086 return Objects.equals(url, casted.url) 087 && Objects.equals(name, casted.name) 088 && Objects.equals(instructions, casted.instructions) 089 && Objects.equals(folderId, casted.folderId) 090 && Objects.equals(isNotificationDisabled, casted.isNotificationDisabled) 091 && Objects.equals(isActive, casted.isActive); 092 } 093 094 @Override 095 public int hashCode() { 096 return Objects.hash(url, name, instructions, folderId, isNotificationDisabled, isActive); 097 } 098 099 @Override 100 public String toString() { 101 return "SignTemplateReadySignLinkField{" 102 + "url='" 103 + url 104 + '\'' 105 + ", " 106 + "name='" 107 + name 108 + '\'' 109 + ", " 110 + "instructions='" 111 + instructions 112 + '\'' 113 + ", " 114 + "folderId='" 115 + folderId 116 + '\'' 117 + ", " 118 + "isNotificationDisabled='" 119 + isNotificationDisabled 120 + '\'' 121 + ", " 122 + "isActive='" 123 + isActive 124 + '\'' 125 + "}"; 126 } 127 128 public static class Builder extends NullableFieldTracker { 129 130 protected String url; 131 132 protected String name; 133 134 protected String instructions; 135 136 protected String folderId; 137 138 protected Boolean isNotificationDisabled; 139 140 protected Boolean isActive; 141 142 public Builder url(String url) { 143 this.url = url; 144 return this; 145 } 146 147 public Builder name(String name) { 148 this.name = name; 149 this.markNullableFieldAsSet("name"); 150 return this; 151 } 152 153 public Builder instructions(String instructions) { 154 this.instructions = instructions; 155 this.markNullableFieldAsSet("instructions"); 156 return this; 157 } 158 159 public Builder folderId(String folderId) { 160 this.folderId = folderId; 161 this.markNullableFieldAsSet("folder_id"); 162 return this; 163 } 164 165 public Builder isNotificationDisabled(Boolean isNotificationDisabled) { 166 this.isNotificationDisabled = isNotificationDisabled; 167 return this; 168 } 169 170 public Builder isActive(Boolean isActive) { 171 this.isActive = isActive; 172 return this; 173 } 174 175 public SignTemplateReadySignLinkField build() { 176 return new SignTemplateReadySignLinkField(this); 177 } 178 } 179}