001package com.box.sdkgen.schemas.integrationmappings; 002 003import com.box.sdkgen.internal.Nullable; 004import com.box.sdkgen.internal.NullableFieldTracker; 005import com.box.sdkgen.internal.SerializableObject; 006import com.box.sdkgen.schemas.integrationmapping.IntegrationMapping; 007import com.fasterxml.jackson.annotation.JsonFilter; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import java.util.List; 010import java.util.Objects; 011 012/** A list of integration mapping objects. */ 013@JsonFilter("nullablePropertyFilter") 014public class IntegrationMappings extends SerializableObject { 015 016 /** 017 * The limit that was used for these entries. This will be the same as the `limit` query parameter 018 * unless that value exceeded the maximum value allowed. The maximum value varies by API. 019 */ 020 protected Long limit; 021 022 /** The marker for the start of the next page of results. */ 023 @JsonProperty("next_marker") 024 @Nullable 025 protected String nextMarker; 026 027 /** A list of integration mappings. */ 028 protected List<IntegrationMapping> entries; 029 030 public IntegrationMappings() { 031 super(); 032 } 033 034 protected IntegrationMappings(Builder builder) { 035 super(); 036 this.limit = builder.limit; 037 this.nextMarker = builder.nextMarker; 038 this.entries = builder.entries; 039 markNullableFieldsAsSet(builder.getExplicitlySetNullableFields()); 040 } 041 042 public Long getLimit() { 043 return limit; 044 } 045 046 public String getNextMarker() { 047 return nextMarker; 048 } 049 050 public List<IntegrationMapping> getEntries() { 051 return entries; 052 } 053 054 @Override 055 public boolean equals(Object o) { 056 if (this == o) { 057 return true; 058 } 059 if (o == null || getClass() != o.getClass()) { 060 return false; 061 } 062 IntegrationMappings casted = (IntegrationMappings) o; 063 return Objects.equals(limit, casted.limit) 064 && Objects.equals(nextMarker, casted.nextMarker) 065 && Objects.equals(entries, casted.entries); 066 } 067 068 @Override 069 public int hashCode() { 070 return Objects.hash(limit, nextMarker, entries); 071 } 072 073 @Override 074 public String toString() { 075 return "IntegrationMappings{" 076 + "limit='" 077 + limit 078 + '\'' 079 + ", " 080 + "nextMarker='" 081 + nextMarker 082 + '\'' 083 + ", " 084 + "entries='" 085 + entries 086 + '\'' 087 + "}"; 088 } 089 090 public static class Builder extends NullableFieldTracker { 091 092 protected Long limit; 093 094 protected String nextMarker; 095 096 protected List<IntegrationMapping> entries; 097 098 public Builder limit(Long limit) { 099 this.limit = limit; 100 return this; 101 } 102 103 public Builder nextMarker(String nextMarker) { 104 this.nextMarker = nextMarker; 105 this.markNullableFieldAsSet("next_marker"); 106 return this; 107 } 108 109 public Builder entries(List<IntegrationMapping> entries) { 110 this.entries = entries; 111 return this; 112 } 113 114 public IntegrationMappings build() { 115 return new IntegrationMappings(this); 116 } 117 } 118}