|
| 1 | +package com.microsoft.graph.core.testModels; |
| 2 | + |
| 3 | +import java.util.HashMap; |
| 4 | +import java.util.Map; |
| 5 | +import java.util.Objects; |
| 6 | + |
| 7 | +import com.microsoft.kiota.serialization.AdditionalDataHolder; |
| 8 | +import com.microsoft.kiota.serialization.Parsable; |
| 9 | +import com.microsoft.kiota.serialization.ParseNode; |
| 10 | +import com.microsoft.kiota.serialization.SerializationWriter; |
| 11 | + |
| 12 | +public class BaseCollectionPaginationCountResponse implements AdditionalDataHolder, Parsable { |
| 13 | + public Map<String, Object> additionalData; |
| 14 | + private String odataNextLink; |
| 15 | + private Long odataCount; |
| 16 | + /** |
| 17 | + * Instantiates a new BaseCollectionPaginationCountResponse and sets the default values. |
| 18 | + */ |
| 19 | + public BaseCollectionPaginationCountResponse() { |
| 20 | + this.setAdditionalData(new HashMap<>()); |
| 21 | + } |
| 22 | + /** |
| 23 | + * Creates a new instance of the appropriate class based on discriminator value |
| 24 | + * @param parseNode The parse node to use to read the discriminator value and create the object |
| 25 | + * @return a BaseCollectionPaginationCountResponse |
| 26 | + */ |
| 27 | + @jakarta.annotation.Nonnull |
| 28 | + public static BaseCollectionPaginationCountResponse createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) { |
| 29 | + Objects.requireNonNull(parseNode); |
| 30 | + return new BaseCollectionPaginationCountResponse(); |
| 31 | + } |
| 32 | + /** |
| 33 | + * Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. |
| 34 | + * @return a Map<String, Object> |
| 35 | + */ |
| 36 | + @jakarta.annotation.Nonnull |
| 37 | + public Map<String, Object> getAdditionalData() { |
| 38 | + return this.additionalData; |
| 39 | + } |
| 40 | + /** |
| 41 | + * The deserialization information for the current model |
| 42 | + * @return a Map<String, java.util.function.Consumer<ParseNode>> |
| 43 | + */ |
| 44 | + @jakarta.annotation.Nonnull |
| 45 | + public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() { |
| 46 | + final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(2); |
| 47 | + deserializerMap.put("@odata.count", (n) -> { this.setOdataCount(n.getLongValue()); }); |
| 48 | + deserializerMap.put("@odata.nextLink", (n) -> { this.setOdataNextLink(n.getStringValue()); }); |
| 49 | + return deserializerMap; |
| 50 | + } |
| 51 | + /** |
| 52 | + * Gets the @odata.count property value. The OdataCount property |
| 53 | + * @return a Long |
| 54 | + */ |
| 55 | + @jakarta.annotation.Nullable |
| 56 | + public Long getOdataCount() { |
| 57 | + return this.odataCount; |
| 58 | + } |
| 59 | + /** |
| 60 | + * Gets the @odata.nextLink property value. The OdataNextLink property |
| 61 | + * @return a String |
| 62 | + */ |
| 63 | + @jakarta.annotation.Nullable |
| 64 | + public String getOdataNextLink() { |
| 65 | + return this.odataNextLink; |
| 66 | + } |
| 67 | + /** |
| 68 | + * Serializes information the current object |
| 69 | + * @param writer Serialization writer to use to serialize this model |
| 70 | + */ |
| 71 | + public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) { |
| 72 | + Objects.requireNonNull(writer); |
| 73 | + writer.writeLongValue("@odata.count", this.getOdataCount()); |
| 74 | + writer.writeStringValue("@odata.nextLink", this.getOdataNextLink()); |
| 75 | + writer.writeAdditionalData(this.getAdditionalData()); |
| 76 | + } |
| 77 | + /** |
| 78 | + * Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. |
| 79 | + * @param value Value to set for the AdditionalData property. |
| 80 | + */ |
| 81 | + public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) { |
| 82 | + this.additionalData = value; |
| 83 | + } |
| 84 | + /** |
| 85 | + * Sets the @odata.count property value. The OdataCount property |
| 86 | + * @param value Value to set for the @odata.count property. |
| 87 | + */ |
| 88 | + public void setOdataCount(@jakarta.annotation.Nullable final Long value) { |
| 89 | + this.odataCount = value; |
| 90 | + } |
| 91 | + /** |
| 92 | + * Sets the @odata.nextLink property value. The OdataNextLink property |
| 93 | + * @param value Value to set for the @odata.nextLink property. |
| 94 | + */ |
| 95 | + public void setOdataNextLink(@jakarta.annotation.Nullable final String value) { |
| 96 | + this.odataNextLink = value; |
| 97 | + } |
| 98 | +} |
0 commit comments