
com.azure.resourcemanager.datafactory.models.CopyComputeScaleProperties Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.datafactory.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* CopyComputeScale properties for managed integration runtime.
*/
@Fluent
public final class CopyComputeScaleProperties implements JsonSerializable {
/*
* DIU number setting reserved for copy activity execution. Supported values are multiples of 4 in range 4-256.
*/
private Integer dataIntegrationUnit;
/*
* Time to live (in minutes) setting of integration runtime which will execute copy activity.
*/
private Integer timeToLive;
/*
* CopyComputeScale properties for managed integration runtime.
*/
private Map additionalProperties;
/**
* Creates an instance of CopyComputeScaleProperties class.
*/
public CopyComputeScaleProperties() {
}
/**
* Get the dataIntegrationUnit property: DIU number setting reserved for copy activity execution. Supported values
* are multiples of 4 in range 4-256.
*
* @return the dataIntegrationUnit value.
*/
public Integer dataIntegrationUnit() {
return this.dataIntegrationUnit;
}
/**
* Set the dataIntegrationUnit property: DIU number setting reserved for copy activity execution. Supported values
* are multiples of 4 in range 4-256.
*
* @param dataIntegrationUnit the dataIntegrationUnit value to set.
* @return the CopyComputeScaleProperties object itself.
*/
public CopyComputeScaleProperties withDataIntegrationUnit(Integer dataIntegrationUnit) {
this.dataIntegrationUnit = dataIntegrationUnit;
return this;
}
/**
* Get the timeToLive property: Time to live (in minutes) setting of integration runtime which will execute copy
* activity.
*
* @return the timeToLive value.
*/
public Integer timeToLive() {
return this.timeToLive;
}
/**
* Set the timeToLive property: Time to live (in minutes) setting of integration runtime which will execute copy
* activity.
*
* @param timeToLive the timeToLive value to set.
* @return the CopyComputeScaleProperties object itself.
*/
public CopyComputeScaleProperties withTimeToLive(Integer timeToLive) {
this.timeToLive = timeToLive;
return this;
}
/**
* Get the additionalProperties property: CopyComputeScale properties for managed integration runtime.
*
* @return the additionalProperties value.
*/
public Map additionalProperties() {
return this.additionalProperties;
}
/**
* Set the additionalProperties property: CopyComputeScale properties for managed integration runtime.
*
* @param additionalProperties the additionalProperties value to set.
* @return the CopyComputeScaleProperties object itself.
*/
public CopyComputeScaleProperties withAdditionalProperties(Map additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeNumberField("dataIntegrationUnit", this.dataIntegrationUnit);
jsonWriter.writeNumberField("timeToLive", this.timeToLive);
if (additionalProperties != null) {
for (Map.Entry additionalProperty : additionalProperties.entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of CopyComputeScaleProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of CopyComputeScaleProperties if the JsonReader was pointing to an instance of it, or null if
* it was pointing to JSON null.
* @throws IOException If an error occurs while reading the CopyComputeScaleProperties.
*/
public static CopyComputeScaleProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
CopyComputeScaleProperties deserializedCopyComputeScaleProperties = new CopyComputeScaleProperties();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("dataIntegrationUnit".equals(fieldName)) {
deserializedCopyComputeScaleProperties.dataIntegrationUnit = reader.getNullable(JsonReader::getInt);
} else if ("timeToLive".equals(fieldName)) {
deserializedCopyComputeScaleProperties.timeToLive = reader.getNullable(JsonReader::getInt);
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedCopyComputeScaleProperties.additionalProperties = additionalProperties;
return deserializedCopyComputeScaleProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy