All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lob.model.BillingGroup Maven / Gradle / Ivy

The newest version!
/*
 * Lob
 * The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. 

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? * * The version of the OpenAPI document: 1.3.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.lob.model; import java.util.Objects; import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; import com.google.gson.Gson; import java.util.HashMap; import java.util.Map; /** * BillingGroup */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class BillingGroup { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; /** * Description of the billing group. * @return description **/ @javax.annotation.Nullable @ApiModelProperty(value = "Description of the billing group.") public String getDescription() { return description; } public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; /** * Name of the billing group. * @return name **/ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Name of the billing group.") public String getName() { return name; } public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private String id; /** * Unique identifier prefixed with `bg_`. * @return id **/ @javax.annotation.Nonnull public String getId() { return id; } public void setId (String id) throws IllegalArgumentException { if(!id.matches("^bg_[a-zA-Z0-9]+$")) { throw new IllegalArgumentException("Invalid id provided"); } this.id = id; } public static final String SERIALIZED_NAME_DATE_CREATED = "date_created"; @SerializedName(SERIALIZED_NAME_DATE_CREATED) private OffsetDateTime dateCreated; /** * A timestamp in ISO 8601 format of the date the resource was created. * @return dateCreated **/ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "A timestamp in ISO 8601 format of the date the resource was created.") public OffsetDateTime getDateCreated() { return dateCreated; } public static final String SERIALIZED_NAME_DATE_MODIFIED = "date_modified"; @SerializedName(SERIALIZED_NAME_DATE_MODIFIED) private OffsetDateTime dateModified; /** * A timestamp in ISO 8601 format of the date the resource was last modified. * @return dateModified **/ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "A timestamp in ISO 8601 format of the date the resource was last modified.") public OffsetDateTime getDateModified() { return dateModified; } /** * Value is resource type. */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { BILLING_GROUP("billing_group"); private String value; ObjectEnum(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return String.valueOf(value); } public static ObjectEnum fromValue(String value) { for (ObjectEnum b : ObjectEnum.values()) { if (b.value.equals(value)) { return b; } } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @Override public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override public ObjectEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); return ObjectEnum.fromValue(value); } } } public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) private ObjectEnum _object = ObjectEnum.BILLING_GROUP; /** * Value is resource type. * @return _object **/ @javax.annotation.Nonnull @ApiModelProperty(required = true, value = "Value is resource type.") public ObjectEnum getObject() { return _object; } /* public BillingGroup description(String description) { this.description = description; return this; } */ public void setDescription(String description) { this.description = description; } /* public BillingGroup name(String name) { this.name = name; return this; } */ public void setName(String name) { this.name = name; } /* public BillingGroup id(String id) { this.id = id; return this; } */ /* public BillingGroup dateCreated(OffsetDateTime dateCreated) { this.dateCreated = dateCreated; return this; } */ public void setDateCreated(OffsetDateTime dateCreated) { this.dateCreated = dateCreated; } /* public BillingGroup dateModified(OffsetDateTime dateModified) { this.dateModified = dateModified; return this; } */ public void setDateModified(OffsetDateTime dateModified) { this.dateModified = dateModified; } /* public BillingGroup _object(ObjectEnum _object) { this._object = _object; return this; } */ public void setObject(ObjectEnum _object) { this._object = _object; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BillingGroup billingGroup = (BillingGroup) o; return Objects.equals(this.description, billingGroup.description) && Objects.equals(this.name, billingGroup.name) && Objects.equals(this.id, billingGroup.id) && Objects.equals(this.dateCreated, billingGroup.dateCreated) && Objects.equals(this.dateModified, billingGroup.dateModified) && Objects.equals(this._object, billingGroup._object); } @Override public int hashCode() { return Objects.hash(description, name, id, dateCreated, dateModified, _object); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" dateCreated: ").append(toIndentedString(dateCreated)).append("\n"); sb.append(" dateModified: ").append(toIndentedString(dateModified)).append("\n"); sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); sb.append("}"); return sb.toString(); } public Map toMap() { Map localMap = new HashMap(); localMap.put("description", description); localMap.put("name", name); localMap.put("id", id); localMap.put("date_created", dateCreated); localMap.put("date_modified", dateModified); localMap.put("object", _object); return localMap; } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy