
com.azure.resourcemanager.datafactory.models.AzureDataExplorerSink 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.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* A copy activity Azure Data Explorer sink.
*/
@Fluent
public final class AzureDataExplorerSink extends CopySink {
/*
* Copy sink type.
*/
private String type = "AzureDataExplorerSink";
/*
* A name of a pre-created csv mapping that was defined on the target Kusto table. Type: string.
*/
private Object ingestionMappingName;
/*
* An explicit column mapping description provided in a json format. Type: string.
*/
private Object ingestionMappingAsJson;
/*
* If set to true, any aggregation will be skipped. Default is false. Type: boolean.
*/
private Object flushImmediately;
/**
* Creates an instance of AzureDataExplorerSink class.
*/
public AzureDataExplorerSink() {
}
/**
* Get the type property: Copy sink type.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the ingestionMappingName property: A name of a pre-created csv mapping that was defined on the target Kusto
* table. Type: string.
*
* @return the ingestionMappingName value.
*/
public Object ingestionMappingName() {
return this.ingestionMappingName;
}
/**
* Set the ingestionMappingName property: A name of a pre-created csv mapping that was defined on the target Kusto
* table. Type: string.
*
* @param ingestionMappingName the ingestionMappingName value to set.
* @return the AzureDataExplorerSink object itself.
*/
public AzureDataExplorerSink withIngestionMappingName(Object ingestionMappingName) {
this.ingestionMappingName = ingestionMappingName;
return this;
}
/**
* Get the ingestionMappingAsJson property: An explicit column mapping description provided in a json format. Type:
* string.
*
* @return the ingestionMappingAsJson value.
*/
public Object ingestionMappingAsJson() {
return this.ingestionMappingAsJson;
}
/**
* Set the ingestionMappingAsJson property: An explicit column mapping description provided in a json format. Type:
* string.
*
* @param ingestionMappingAsJson the ingestionMappingAsJson value to set.
* @return the AzureDataExplorerSink object itself.
*/
public AzureDataExplorerSink withIngestionMappingAsJson(Object ingestionMappingAsJson) {
this.ingestionMappingAsJson = ingestionMappingAsJson;
return this;
}
/**
* Get the flushImmediately property: If set to true, any aggregation will be skipped. Default is false. Type:
* boolean.
*
* @return the flushImmediately value.
*/
public Object flushImmediately() {
return this.flushImmediately;
}
/**
* Set the flushImmediately property: If set to true, any aggregation will be skipped. Default is false. Type:
* boolean.
*
* @param flushImmediately the flushImmediately value to set.
* @return the AzureDataExplorerSink object itself.
*/
public AzureDataExplorerSink withFlushImmediately(Object flushImmediately) {
this.flushImmediately = flushImmediately;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureDataExplorerSink withWriteBatchSize(Object writeBatchSize) {
super.withWriteBatchSize(writeBatchSize);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureDataExplorerSink withWriteBatchTimeout(Object writeBatchTimeout) {
super.withWriteBatchTimeout(writeBatchTimeout);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureDataExplorerSink withSinkRetryCount(Object sinkRetryCount) {
super.withSinkRetryCount(sinkRetryCount);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureDataExplorerSink withSinkRetryWait(Object sinkRetryWait) {
super.withSinkRetryWait(sinkRetryWait);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureDataExplorerSink withMaxConcurrentConnections(Object maxConcurrentConnections) {
super.withMaxConcurrentConnections(maxConcurrentConnections);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureDataExplorerSink withDisableMetricsCollection(Object disableMetricsCollection) {
super.withDisableMetricsCollection(disableMetricsCollection);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeUntypedField("writeBatchSize", writeBatchSize());
jsonWriter.writeUntypedField("writeBatchTimeout", writeBatchTimeout());
jsonWriter.writeUntypedField("sinkRetryCount", sinkRetryCount());
jsonWriter.writeUntypedField("sinkRetryWait", sinkRetryWait());
jsonWriter.writeUntypedField("maxConcurrentConnections", maxConcurrentConnections());
jsonWriter.writeUntypedField("disableMetricsCollection", disableMetricsCollection());
jsonWriter.writeStringField("type", this.type);
jsonWriter.writeUntypedField("ingestionMappingName", this.ingestionMappingName);
jsonWriter.writeUntypedField("ingestionMappingAsJson", this.ingestionMappingAsJson);
jsonWriter.writeUntypedField("flushImmediately", this.flushImmediately);
if (additionalProperties() != null) {
for (Map.Entry additionalProperty : additionalProperties().entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AzureDataExplorerSink from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AzureDataExplorerSink 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 AzureDataExplorerSink.
*/
public static AzureDataExplorerSink fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AzureDataExplorerSink deserializedAzureDataExplorerSink = new AzureDataExplorerSink();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("writeBatchSize".equals(fieldName)) {
deserializedAzureDataExplorerSink.withWriteBatchSize(reader.readUntyped());
} else if ("writeBatchTimeout".equals(fieldName)) {
deserializedAzureDataExplorerSink.withWriteBatchTimeout(reader.readUntyped());
} else if ("sinkRetryCount".equals(fieldName)) {
deserializedAzureDataExplorerSink.withSinkRetryCount(reader.readUntyped());
} else if ("sinkRetryWait".equals(fieldName)) {
deserializedAzureDataExplorerSink.withSinkRetryWait(reader.readUntyped());
} else if ("maxConcurrentConnections".equals(fieldName)) {
deserializedAzureDataExplorerSink.withMaxConcurrentConnections(reader.readUntyped());
} else if ("disableMetricsCollection".equals(fieldName)) {
deserializedAzureDataExplorerSink.withDisableMetricsCollection(reader.readUntyped());
} else if ("type".equals(fieldName)) {
deserializedAzureDataExplorerSink.type = reader.getString();
} else if ("ingestionMappingName".equals(fieldName)) {
deserializedAzureDataExplorerSink.ingestionMappingName = reader.readUntyped();
} else if ("ingestionMappingAsJson".equals(fieldName)) {
deserializedAzureDataExplorerSink.ingestionMappingAsJson = reader.readUntyped();
} else if ("flushImmediately".equals(fieldName)) {
deserializedAzureDataExplorerSink.flushImmediately = reader.readUntyped();
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedAzureDataExplorerSink.withAdditionalProperties(additionalProperties);
return deserializedAzureDataExplorerSink;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy