001package com.box.sdkgen.schemas.integrationmappingpartneritemteams;
002
003import com.box.sdkgen.internal.SerializableObject;
004import com.box.sdkgen.serialization.json.EnumWrapper;
005import com.fasterxml.jackson.annotation.JsonFilter;
006import com.fasterxml.jackson.annotation.JsonProperty;
007import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
008import com.fasterxml.jackson.databind.annotation.JsonSerialize;
009import java.util.Objects;
010
011/** The schema for an integration mapping mapped item object for type Teams. */
012@JsonFilter("nullablePropertyFilter")
013public class IntegrationMappingPartnerItemTeams extends SerializableObject {
014
015  /** Type of the mapped item referenced in `id`. */
016  @JsonDeserialize(
017      using =
018          IntegrationMappingPartnerItemTeamsTypeField
019              .IntegrationMappingPartnerItemTeamsTypeFieldDeserializer.class)
020  @JsonSerialize(
021      using =
022          IntegrationMappingPartnerItemTeamsTypeField
023              .IntegrationMappingPartnerItemTeamsTypeFieldSerializer.class)
024  protected final EnumWrapper<IntegrationMappingPartnerItemTeamsTypeField> type;
025
026  /** ID of the mapped item (of type referenced in `type`). */
027  protected final String id;
028
029  /** ID of the tenant that is registered with Microsoft Teams. */
030  @JsonProperty("tenant_id")
031  protected final String tenantId;
032
033  public IntegrationMappingPartnerItemTeams(
034      IntegrationMappingPartnerItemTeamsTypeField type, String id, String tenantId) {
035    super();
036    this.type = new EnumWrapper<IntegrationMappingPartnerItemTeamsTypeField>(type);
037    this.id = id;
038    this.tenantId = tenantId;
039  }
040
041  public IntegrationMappingPartnerItemTeams(
042      @JsonProperty("type") EnumWrapper<IntegrationMappingPartnerItemTeamsTypeField> type,
043      @JsonProperty("id") String id,
044      @JsonProperty("tenant_id") String tenantId) {
045    super();
046    this.type = type;
047    this.id = id;
048    this.tenantId = tenantId;
049  }
050
051  public EnumWrapper<IntegrationMappingPartnerItemTeamsTypeField> getType() {
052    return type;
053  }
054
055  public String getId() {
056    return id;
057  }
058
059  public String getTenantId() {
060    return tenantId;
061  }
062
063  @Override
064  public boolean equals(Object o) {
065    if (this == o) {
066      return true;
067    }
068    if (o == null || getClass() != o.getClass()) {
069      return false;
070    }
071    IntegrationMappingPartnerItemTeams casted = (IntegrationMappingPartnerItemTeams) o;
072    return Objects.equals(type, casted.type)
073        && Objects.equals(id, casted.id)
074        && Objects.equals(tenantId, casted.tenantId);
075  }
076
077  @Override
078  public int hashCode() {
079    return Objects.hash(type, id, tenantId);
080  }
081
082  @Override
083  public String toString() {
084    return "IntegrationMappingPartnerItemTeams{"
085        + "type='"
086        + type
087        + '\''
088        + ", "
089        + "id='"
090        + id
091        + '\''
092        + ", "
093        + "tenantId='"
094        + tenantId
095        + '\''
096        + "}";
097  }
098}