
models.List Maven / Gradle / Ivy
package com.openshift.cloud.api.connector.models;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class List implements AdditionalDataHolder, Parsable {
/** Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. */
private Map additionalData;
/** The items property */
private java.util.List items;
/** The kind property */
private String kind;
/** The page property */
private Integer page;
/** The size property */
private Integer size;
/** The total property */
private Integer total;
/**
* Instantiates a new List and sets the default values.
* @return a void
*/
@javax.annotation.Nullable
public List() {
this.setAdditionalData(new HashMap<>());
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a List
*/
@javax.annotation.Nonnull
public static List createFromDiscriminatorValue(@javax.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new List();
}
/**
* Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map
*/
@javax.annotation.Nonnull
public Map getAdditionalData() {
return this.additionalData;
}
/**
* The deserialization information for the current model
* @return a Map>
*/
@javax.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(5);
deserializerMap.put("items", (n) -> { this.setItems(n.getCollectionOfObjectValues(ObjectReference::createFromDiscriminatorValue)); });
deserializerMap.put("kind", (n) -> { this.setKind(n.getStringValue()); });
deserializerMap.put("page", (n) -> { this.setPage(n.getIntegerValue()); });
deserializerMap.put("size", (n) -> { this.setSize(n.getIntegerValue()); });
deserializerMap.put("total", (n) -> { this.setTotal(n.getIntegerValue()); });
return deserializerMap;
}
/**
* Gets the items property value. The items property
* @return a ObjectReference
*/
@javax.annotation.Nullable
public java.util.List getItems() {
return this.items;
}
/**
* Gets the kind property value. The kind property
* @return a string
*/
@javax.annotation.Nullable
public String getKind() {
return this.kind;
}
/**
* Gets the page property value. The page property
* @return a integer
*/
@javax.annotation.Nullable
public Integer getPage() {
return this.page;
}
/**
* Gets the size property value. The size property
* @return a integer
*/
@javax.annotation.Nullable
public Integer getSize() {
return this.size;
}
/**
* Gets the total property value. The total property
* @return a integer
*/
@javax.annotation.Nullable
public Integer getTotal() {
return this.total;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
@javax.annotation.Nonnull
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeCollectionOfObjectValues("items", this.getItems());
writer.writeStringValue("kind", this.getKind());
writer.writeIntegerValue("page", this.getPage());
writer.writeIntegerValue("size", this.getSize());
writer.writeIntegerValue("total", this.getTotal());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
* @return a void
*/
@javax.annotation.Nonnull
public void setAdditionalData(@javax.annotation.Nullable final Map value) {
this.additionalData = value;
}
/**
* Sets the items property value. The items property
* @param value Value to set for the items property.
* @return a void
*/
@javax.annotation.Nonnull
public void setItems(@javax.annotation.Nullable final java.util.List value) {
this.items = value;
}
/**
* Sets the kind property value. The kind property
* @param value Value to set for the kind property.
* @return a void
*/
@javax.annotation.Nonnull
public void setKind(@javax.annotation.Nullable final String value) {
this.kind = value;
}
/**
* Sets the page property value. The page property
* @param value Value to set for the page property.
* @return a void
*/
@javax.annotation.Nonnull
public void setPage(@javax.annotation.Nullable final Integer value) {
this.page = value;
}
/**
* Sets the size property value. The size property
* @param value Value to set for the size property.
* @return a void
*/
@javax.annotation.Nonnull
public void setSize(@javax.annotation.Nullable final Integer value) {
this.size = value;
}
/**
* Sets the total property value. The total property
* @param value Value to set for the total property.
* @return a void
*/
@javax.annotation.Nonnull
public void setTotal(@javax.annotation.Nullable final Integer value) {
this.total = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy