001package com.box.sdkgen.schemas.termsofservices; 002 003import com.box.sdkgen.internal.NullableFieldTracker; 004import com.box.sdkgen.internal.SerializableObject; 005import com.box.sdkgen.schemas.termsofservice.TermsOfService; 006import com.fasterxml.jackson.annotation.JsonFilter; 007import com.fasterxml.jackson.annotation.JsonProperty; 008import java.util.List; 009import java.util.Objects; 010 011/** A list of terms of services. */ 012@JsonFilter("nullablePropertyFilter") 013public class TermsOfServices extends SerializableObject { 014 015 /** The total number of objects. */ 016 @JsonProperty("total_count") 017 protected Long totalCount; 018 019 /** A list of terms of service objects. */ 020 protected List<TermsOfService> entries; 021 022 public TermsOfServices() { 023 super(); 024 } 025 026 protected TermsOfServices(Builder builder) { 027 super(); 028 this.totalCount = builder.totalCount; 029 this.entries = builder.entries; 030 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 031 } 032 033 public Long getTotalCount() { 034 return totalCount; 035 } 036 037 public List<TermsOfService> getEntries() { 038 return entries; 039 } 040 041 @Override 042 public boolean equals(Object o) { 043 if (this == o) { 044 return true; 045 } 046 if (o == null || getClass() != o.getClass()) { 047 return false; 048 } 049 TermsOfServices casted = (TermsOfServices) o; 050 return Objects.equals(totalCount, casted.totalCount) && Objects.equals(entries, casted.entries); 051 } 052 053 @Override 054 public int hashCode() { 055 return Objects.hash(totalCount, entries); 056 } 057 058 @Override 059 public String toString() { 060 return "TermsOfServices{" 061 + "totalCount='" 062 + totalCount 063 + '\'' 064 + ", " 065 + "entries='" 066 + entries 067 + '\'' 068 + "}"; 069 } 070 071 public static class Builder extends NullableFieldTracker { 072 073 protected Long totalCount; 074 075 protected List<TermsOfService> entries; 076 077 public Builder totalCount(Long totalCount) { 078 this.totalCount = totalCount; 079 return this; 080 } 081 082 public Builder entries(List<TermsOfService> entries) { 083 this.entries = entries; 084 return this; 085 } 086 087 public TermsOfServices build() { 088 return new TermsOfServices(this); 089 } 090 } 091}