
com.azure.resourcemanager.datafactory.models.AzureTableSink 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 Table sink.
*/
@Fluent
public final class AzureTableSink extends CopySink {
/*
* Copy sink type.
*/
private String type = "AzureTableSink";
/*
* Azure Table default partition key value. Type: string (or Expression with resultType string).
*/
private Object azureTableDefaultPartitionKeyValue;
/*
* Azure Table partition key name. Type: string (or Expression with resultType string).
*/
private Object azureTablePartitionKeyName;
/*
* Azure Table row key name. Type: string (or Expression with resultType string).
*/
private Object azureTableRowKeyName;
/*
* Azure Table insert type. Type: string (or Expression with resultType string).
*/
private Object azureTableInsertType;
/**
* Creates an instance of AzureTableSink class.
*/
public AzureTableSink() {
}
/**
* Get the type property: Copy sink type.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the azureTableDefaultPartitionKeyValue property: Azure Table default partition key value. Type: string (or
* Expression with resultType string).
*
* @return the azureTableDefaultPartitionKeyValue value.
*/
public Object azureTableDefaultPartitionKeyValue() {
return this.azureTableDefaultPartitionKeyValue;
}
/**
* Set the azureTableDefaultPartitionKeyValue property: Azure Table default partition key value. Type: string (or
* Expression with resultType string).
*
* @param azureTableDefaultPartitionKeyValue the azureTableDefaultPartitionKeyValue value to set.
* @return the AzureTableSink object itself.
*/
public AzureTableSink withAzureTableDefaultPartitionKeyValue(Object azureTableDefaultPartitionKeyValue) {
this.azureTableDefaultPartitionKeyValue = azureTableDefaultPartitionKeyValue;
return this;
}
/**
* Get the azureTablePartitionKeyName property: Azure Table partition key name. Type: string (or Expression with
* resultType string).
*
* @return the azureTablePartitionKeyName value.
*/
public Object azureTablePartitionKeyName() {
return this.azureTablePartitionKeyName;
}
/**
* Set the azureTablePartitionKeyName property: Azure Table partition key name. Type: string (or Expression with
* resultType string).
*
* @param azureTablePartitionKeyName the azureTablePartitionKeyName value to set.
* @return the AzureTableSink object itself.
*/
public AzureTableSink withAzureTablePartitionKeyName(Object azureTablePartitionKeyName) {
this.azureTablePartitionKeyName = azureTablePartitionKeyName;
return this;
}
/**
* Get the azureTableRowKeyName property: Azure Table row key name. Type: string (or Expression with resultType
* string).
*
* @return the azureTableRowKeyName value.
*/
public Object azureTableRowKeyName() {
return this.azureTableRowKeyName;
}
/**
* Set the azureTableRowKeyName property: Azure Table row key name. Type: string (or Expression with resultType
* string).
*
* @param azureTableRowKeyName the azureTableRowKeyName value to set.
* @return the AzureTableSink object itself.
*/
public AzureTableSink withAzureTableRowKeyName(Object azureTableRowKeyName) {
this.azureTableRowKeyName = azureTableRowKeyName;
return this;
}
/**
* Get the azureTableInsertType property: Azure Table insert type. Type: string (or Expression with resultType
* string).
*
* @return the azureTableInsertType value.
*/
public Object azureTableInsertType() {
return this.azureTableInsertType;
}
/**
* Set the azureTableInsertType property: Azure Table insert type. Type: string (or Expression with resultType
* string).
*
* @param azureTableInsertType the azureTableInsertType value to set.
* @return the AzureTableSink object itself.
*/
public AzureTableSink withAzureTableInsertType(Object azureTableInsertType) {
this.azureTableInsertType = azureTableInsertType;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSink withWriteBatchSize(Object writeBatchSize) {
super.withWriteBatchSize(writeBatchSize);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSink withWriteBatchTimeout(Object writeBatchTimeout) {
super.withWriteBatchTimeout(writeBatchTimeout);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSink withSinkRetryCount(Object sinkRetryCount) {
super.withSinkRetryCount(sinkRetryCount);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSink withSinkRetryWait(Object sinkRetryWait) {
super.withSinkRetryWait(sinkRetryWait);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSink withMaxConcurrentConnections(Object maxConcurrentConnections) {
super.withMaxConcurrentConnections(maxConcurrentConnections);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSink 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("azureTableDefaultPartitionKeyValue", this.azureTableDefaultPartitionKeyValue);
jsonWriter.writeUntypedField("azureTablePartitionKeyName", this.azureTablePartitionKeyName);
jsonWriter.writeUntypedField("azureTableRowKeyName", this.azureTableRowKeyName);
jsonWriter.writeUntypedField("azureTableInsertType", this.azureTableInsertType);
if (additionalProperties() != null) {
for (Map.Entry additionalProperty : additionalProperties().entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AzureTableSink from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AzureTableSink 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 AzureTableSink.
*/
public static AzureTableSink fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AzureTableSink deserializedAzureTableSink = new AzureTableSink();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("writeBatchSize".equals(fieldName)) {
deserializedAzureTableSink.withWriteBatchSize(reader.readUntyped());
} else if ("writeBatchTimeout".equals(fieldName)) {
deserializedAzureTableSink.withWriteBatchTimeout(reader.readUntyped());
} else if ("sinkRetryCount".equals(fieldName)) {
deserializedAzureTableSink.withSinkRetryCount(reader.readUntyped());
} else if ("sinkRetryWait".equals(fieldName)) {
deserializedAzureTableSink.withSinkRetryWait(reader.readUntyped());
} else if ("maxConcurrentConnections".equals(fieldName)) {
deserializedAzureTableSink.withMaxConcurrentConnections(reader.readUntyped());
} else if ("disableMetricsCollection".equals(fieldName)) {
deserializedAzureTableSink.withDisableMetricsCollection(reader.readUntyped());
} else if ("type".equals(fieldName)) {
deserializedAzureTableSink.type = reader.getString();
} else if ("azureTableDefaultPartitionKeyValue".equals(fieldName)) {
deserializedAzureTableSink.azureTableDefaultPartitionKeyValue = reader.readUntyped();
} else if ("azureTablePartitionKeyName".equals(fieldName)) {
deserializedAzureTableSink.azureTablePartitionKeyName = reader.readUntyped();
} else if ("azureTableRowKeyName".equals(fieldName)) {
deserializedAzureTableSink.azureTableRowKeyName = reader.readUntyped();
} else if ("azureTableInsertType".equals(fieldName)) {
deserializedAzureTableSink.azureTableInsertType = reader.readUntyped();
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedAzureTableSink.withAdditionalProperties(additionalProperties);
return deserializedAzureTableSink;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy