com.hopper.cloud.airlines.model.CfarContents Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloud-airlines-java Show documentation
Show all versions of cloud-airlines-java Show documentation
Use the Hopper cloud airlines Web Services in Java!
The newest version!
/*
* Airline API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.0
*
*
* 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.hopper.cloud.airlines.model;
import com.google.gson.*;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.hopper.cloud.airlines.JSON;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.*;
import java.util.Map.Entry;
/**
* An object detailing CFAR contents
*/
@ApiModel(description = "An object detailing CFAR contents")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-06-28T12:18:49.517876+02:00[Europe/Paris]")
public class CfarContents {
public static final String SERIALIZED_NAME_BULLET_POINTS = "bullet_points";
@SerializedName(SERIALIZED_NAME_BULLET_POINTS)
private List bulletPoints = new ArrayList<>();
public static final String SERIALIZED_NAME_LABELS = "labels";
@SerializedName(SERIALIZED_NAME_LABELS)
private Map labels = new HashMap<>();
public CfarContents bulletPoints(List bulletPoints) {
this.bulletPoints = bulletPoints;
return this;
}
public CfarContents addBulletPointsItem(String bulletPointsItem) {
this.bulletPoints.add(bulletPointsItem);
return this;
}
/**
* An array containing the bullet points to be displayed
*
* @return bulletPoints
**/
@ApiModelProperty(required = true, value = "An array containing the bullet points to be displayed")
public List getBulletPoints() {
return bulletPoints;
}
public void setBulletPoints(List bulletPoints) {
this.bulletPoints = bulletPoints;
}
public CfarContents labels(Map labels) {
this.labels = labels;
return this;
}
/**
* Get labels
*
* @return labels
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "A map of key-value pairs for storing all labels to be displayed")
public Map getLabels() {
return labels;
}
public void setLabels(Map labels) {
this.labels = labels;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CfarContents cfarContents = (CfarContents) o;
return Objects.equals(this.bulletPoints, cfarContents.bulletPoints) &&
Objects.equals(this.labels, cfarContents.labels);
}
@Override
public int hashCode() {
return Objects.hash(bulletPoints, labels);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CfarContents {\n");
sb.append(" bulletPoints: ").append(toIndentedString(bulletPoints)).append("\n");
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!CfarContents.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'CfarContents' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(CfarContents.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, CfarContents value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}
@Override
public CfarContents read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
return thisAdapter.fromJsonTree(jsonObj);
}
}.nullSafe();
}
}
/**
* Create an instance of CfarContents given an JSON string
*
* @param jsonString JSON string
* @return An instance of CfarContents
* @throws IOException if the JSON string is invalid with respect to CfarContents
*/
public static CfarContents fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, CfarContents.class);
}
/**
* Convert an instance of CfarContents to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy