|
| 1 | +package com.microsoft.graph.beta.app.calls.item.participants.item.reportsyntheticmedia; |
| 2 | + |
| 3 | +import com.microsoft.graph.beta.models.DetectionSeverity; |
| 4 | +import com.microsoft.graph.beta.models.MediaMetadata; |
| 5 | +import com.microsoft.graph.beta.models.SyntheticMediaDetectionDetail; |
| 6 | +import com.microsoft.kiota.serialization.AdditionalDataHolder; |
| 7 | +import com.microsoft.kiota.serialization.Parsable; |
| 8 | +import com.microsoft.kiota.serialization.ParseNode; |
| 9 | +import com.microsoft.kiota.serialization.SerializationWriter; |
| 10 | +import com.microsoft.kiota.store.BackedModel; |
| 11 | +import com.microsoft.kiota.store.BackingStore; |
| 12 | +import com.microsoft.kiota.store.BackingStoreFactorySingleton; |
| 13 | +import java.time.OffsetDateTime; |
| 14 | +import java.util.HashMap; |
| 15 | +import java.util.Map; |
| 16 | +import java.util.Objects; |
| 17 | +import java.util.UUID; |
| 18 | +@jakarta.annotation.Generated("com.microsoft.kiota") |
| 19 | +public class ReportSyntheticMediaPostRequestBody implements AdditionalDataHolder, BackedModel, Parsable { |
| 20 | + /** |
| 21 | + * Stores model information. |
| 22 | + */ |
| 23 | + @jakarta.annotation.Nonnull |
| 24 | + protected BackingStore backingStore; |
| 25 | + /** |
| 26 | + * Instantiates a new {@link ReportSyntheticMediaPostRequestBody} and sets the default values. |
| 27 | + */ |
| 28 | + public ReportSyntheticMediaPostRequestBody() { |
| 29 | + this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore(); |
| 30 | + this.setAdditionalData(new HashMap<>()); |
| 31 | + this.setIsMalicious(false); |
| 32 | + } |
| 33 | + /** |
| 34 | + * Creates a new instance of the appropriate class based on discriminator value |
| 35 | + * @param parseNode The parse node to use to read the discriminator value and create the object |
| 36 | + * @return a {@link ReportSyntheticMediaPostRequestBody} |
| 37 | + */ |
| 38 | + @jakarta.annotation.Nonnull |
| 39 | + public static ReportSyntheticMediaPostRequestBody createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) { |
| 40 | + Objects.requireNonNull(parseNode); |
| 41 | + return new ReportSyntheticMediaPostRequestBody(); |
| 42 | + } |
| 43 | + /** |
| 44 | + * Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. |
| 45 | + * @return a {@link Map<String, Object>} |
| 46 | + */ |
| 47 | + @jakarta.annotation.Nonnull |
| 48 | + public Map<String, Object> getAdditionalData() { |
| 49 | + Map<String, Object> value = this.backingStore.get("additionalData"); |
| 50 | + if(value == null) { |
| 51 | + value = new HashMap<>(); |
| 52 | + this.setAdditionalData(value); |
| 53 | + } |
| 54 | + return value; |
| 55 | + } |
| 56 | + /** |
| 57 | + * Gets the backingStore property value. Stores model information. |
| 58 | + * @return a {@link BackingStore} |
| 59 | + */ |
| 60 | + @jakarta.annotation.Nonnull |
| 61 | + public BackingStore getBackingStore() { |
| 62 | + return this.backingStore; |
| 63 | + } |
| 64 | + /** |
| 65 | + * Gets the contentMetadata property value. The contentMetadata property |
| 66 | + * @return a {@link MediaMetadata} |
| 67 | + */ |
| 68 | + @jakarta.annotation.Nullable |
| 69 | + public MediaMetadata getContentMetadata() { |
| 70 | + return this.backingStore.get("contentMetadata"); |
| 71 | + } |
| 72 | + /** |
| 73 | + * Gets the detectionDateTime property value. The detectionDateTime property |
| 74 | + * @return a {@link OffsetDateTime} |
| 75 | + */ |
| 76 | + @jakarta.annotation.Nullable |
| 77 | + public OffsetDateTime getDetectionDateTime() { |
| 78 | + return this.backingStore.get("detectionDateTime"); |
| 79 | + } |
| 80 | + /** |
| 81 | + * Gets the detections property value. The detections property |
| 82 | + * @return a {@link java.util.List<SyntheticMediaDetectionDetail>} |
| 83 | + */ |
| 84 | + @jakarta.annotation.Nullable |
| 85 | + public java.util.List<SyntheticMediaDetectionDetail> getDetections() { |
| 86 | + return this.backingStore.get("detections"); |
| 87 | + } |
| 88 | + /** |
| 89 | + * The deserialization information for the current model |
| 90 | + * @return a {@link Map<String, java.util.function.Consumer<ParseNode>>} |
| 91 | + */ |
| 92 | + @jakarta.annotation.Nonnull |
| 93 | + public Map<String, java.util.function.Consumer<ParseNode>> getFieldDeserializers() { |
| 94 | + final HashMap<String, java.util.function.Consumer<ParseNode>> deserializerMap = new HashMap<String, java.util.function.Consumer<ParseNode>>(7); |
| 95 | + deserializerMap.put("contentMetadata", (n) -> { this.setContentMetadata(n.getObjectValue(MediaMetadata::createFromDiscriminatorValue)); }); |
| 96 | + deserializerMap.put("detectionDateTime", (n) -> { this.setDetectionDateTime(n.getOffsetDateTimeValue()); }); |
| 97 | + deserializerMap.put("detections", (n) -> { this.setDetections(n.getCollectionOfObjectValues(SyntheticMediaDetectionDetail::createFromDiscriminatorValue)); }); |
| 98 | + deserializerMap.put("id", (n) -> { this.setId(n.getUUIDValue()); }); |
| 99 | + deserializerMap.put("isMalicious", (n) -> { this.setIsMalicious(n.getBooleanValue()); }); |
| 100 | + deserializerMap.put("overallConfidence", (n) -> { this.setOverallConfidence(n.getDoubleValue()); }); |
| 101 | + deserializerMap.put("severity", (n) -> { this.setSeverity(n.getEnumValue(DetectionSeverity::forValue)); }); |
| 102 | + return deserializerMap; |
| 103 | + } |
| 104 | + /** |
| 105 | + * Gets the id property value. The id property |
| 106 | + * @return a {@link UUID} |
| 107 | + */ |
| 108 | + @jakarta.annotation.Nullable |
| 109 | + public UUID getId() { |
| 110 | + return this.backingStore.get("id"); |
| 111 | + } |
| 112 | + /** |
| 113 | + * Gets the isMalicious property value. The isMalicious property |
| 114 | + * @return a {@link Boolean} |
| 115 | + */ |
| 116 | + @jakarta.annotation.Nullable |
| 117 | + public Boolean getIsMalicious() { |
| 118 | + return this.backingStore.get("isMalicious"); |
| 119 | + } |
| 120 | + /** |
| 121 | + * Gets the overallConfidence property value. The overallConfidence property |
| 122 | + * @return a {@link Double} |
| 123 | + */ |
| 124 | + @jakarta.annotation.Nullable |
| 125 | + public Double getOverallConfidence() { |
| 126 | + return this.backingStore.get("overallConfidence"); |
| 127 | + } |
| 128 | + /** |
| 129 | + * Gets the severity property value. The severity property |
| 130 | + * @return a {@link DetectionSeverity} |
| 131 | + */ |
| 132 | + @jakarta.annotation.Nullable |
| 133 | + public DetectionSeverity getSeverity() { |
| 134 | + return this.backingStore.get("severity"); |
| 135 | + } |
| 136 | + /** |
| 137 | + * Serializes information the current object |
| 138 | + * @param writer Serialization writer to use to serialize this model |
| 139 | + */ |
| 140 | + public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) { |
| 141 | + Objects.requireNonNull(writer); |
| 142 | + writer.writeObjectValue("contentMetadata", this.getContentMetadata()); |
| 143 | + writer.writeOffsetDateTimeValue("detectionDateTime", this.getDetectionDateTime()); |
| 144 | + writer.writeCollectionOfObjectValues("detections", this.getDetections()); |
| 145 | + writer.writeUUIDValue("id", this.getId()); |
| 146 | + writer.writeBooleanValue("isMalicious", this.getIsMalicious()); |
| 147 | + writer.writeDoubleValue("overallConfidence", this.getOverallConfidence()); |
| 148 | + writer.writeEnumValue("severity", this.getSeverity()); |
| 149 | + writer.writeAdditionalData(this.getAdditionalData()); |
| 150 | + } |
| 151 | + /** |
| 152 | + * Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. |
| 153 | + * @param value Value to set for the AdditionalData property. |
| 154 | + */ |
| 155 | + public void setAdditionalData(@jakarta.annotation.Nullable final Map<String, Object> value) { |
| 156 | + this.backingStore.set("additionalData", value); |
| 157 | + } |
| 158 | + /** |
| 159 | + * Sets the backingStore property value. Stores model information. |
| 160 | + * @param value Value to set for the backingStore property. |
| 161 | + */ |
| 162 | + public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) { |
| 163 | + Objects.requireNonNull(value); |
| 164 | + this.backingStore = value; |
| 165 | + } |
| 166 | + /** |
| 167 | + * Sets the contentMetadata property value. The contentMetadata property |
| 168 | + * @param value Value to set for the contentMetadata property. |
| 169 | + */ |
| 170 | + public void setContentMetadata(@jakarta.annotation.Nullable final MediaMetadata value) { |
| 171 | + this.backingStore.set("contentMetadata", value); |
| 172 | + } |
| 173 | + /** |
| 174 | + * Sets the detectionDateTime property value. The detectionDateTime property |
| 175 | + * @param value Value to set for the detectionDateTime property. |
| 176 | + */ |
| 177 | + public void setDetectionDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) { |
| 178 | + this.backingStore.set("detectionDateTime", value); |
| 179 | + } |
| 180 | + /** |
| 181 | + * Sets the detections property value. The detections property |
| 182 | + * @param value Value to set for the detections property. |
| 183 | + */ |
| 184 | + public void setDetections(@jakarta.annotation.Nullable final java.util.List<SyntheticMediaDetectionDetail> value) { |
| 185 | + this.backingStore.set("detections", value); |
| 186 | + } |
| 187 | + /** |
| 188 | + * Sets the id property value. The id property |
| 189 | + * @param value Value to set for the id property. |
| 190 | + */ |
| 191 | + public void setId(@jakarta.annotation.Nullable final UUID value) { |
| 192 | + this.backingStore.set("id", value); |
| 193 | + } |
| 194 | + /** |
| 195 | + * Sets the isMalicious property value. The isMalicious property |
| 196 | + * @param value Value to set for the isMalicious property. |
| 197 | + */ |
| 198 | + public void setIsMalicious(@jakarta.annotation.Nullable final Boolean value) { |
| 199 | + this.backingStore.set("isMalicious", value); |
| 200 | + } |
| 201 | + /** |
| 202 | + * Sets the overallConfidence property value. The overallConfidence property |
| 203 | + * @param value Value to set for the overallConfidence property. |
| 204 | + */ |
| 205 | + public void setOverallConfidence(@jakarta.annotation.Nullable final Double value) { |
| 206 | + this.backingStore.set("overallConfidence", value); |
| 207 | + } |
| 208 | + /** |
| 209 | + * Sets the severity property value. The severity property |
| 210 | + * @param value Value to set for the severity property. |
| 211 | + */ |
| 212 | + public void setSeverity(@jakarta.annotation.Nullable final DetectionSeverity value) { |
| 213 | + this.backingStore.set("severity", value); |
| 214 | + } |
| 215 | +} |
0 commit comments