
com.azure.resourcemanager.datafactory.models.AzureTableSource 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 source.
*/
@Fluent
public final class AzureTableSource extends TabularSource {
/*
* Copy source type.
*/
private String type = "AzureTableSource";
/*
* Azure Table source query. Type: string (or Expression with resultType string).
*/
private Object azureTableSourceQuery;
/*
* Azure Table source ignore table not found. Type: boolean (or Expression with resultType boolean).
*/
private Object azureTableSourceIgnoreTableNotFound;
/**
* Creates an instance of AzureTableSource class.
*/
public AzureTableSource() {
}
/**
* Get the type property: Copy source type.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the azureTableSourceQuery property: Azure Table source query. Type: string (or Expression with resultType
* string).
*
* @return the azureTableSourceQuery value.
*/
public Object azureTableSourceQuery() {
return this.azureTableSourceQuery;
}
/**
* Set the azureTableSourceQuery property: Azure Table source query. Type: string (or Expression with resultType
* string).
*
* @param azureTableSourceQuery the azureTableSourceQuery value to set.
* @return the AzureTableSource object itself.
*/
public AzureTableSource withAzureTableSourceQuery(Object azureTableSourceQuery) {
this.azureTableSourceQuery = azureTableSourceQuery;
return this;
}
/**
* Get the azureTableSourceIgnoreTableNotFound property: Azure Table source ignore table not found. Type: boolean
* (or Expression with resultType boolean).
*
* @return the azureTableSourceIgnoreTableNotFound value.
*/
public Object azureTableSourceIgnoreTableNotFound() {
return this.azureTableSourceIgnoreTableNotFound;
}
/**
* Set the azureTableSourceIgnoreTableNotFound property: Azure Table source ignore table not found. Type: boolean
* (or Expression with resultType boolean).
*
* @param azureTableSourceIgnoreTableNotFound the azureTableSourceIgnoreTableNotFound value to set.
* @return the AzureTableSource object itself.
*/
public AzureTableSource withAzureTableSourceIgnoreTableNotFound(Object azureTableSourceIgnoreTableNotFound) {
this.azureTableSourceIgnoreTableNotFound = azureTableSourceIgnoreTableNotFound;
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSource withQueryTimeout(Object queryTimeout) {
super.withQueryTimeout(queryTimeout);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSource withAdditionalColumns(Object additionalColumns) {
super.withAdditionalColumns(additionalColumns);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSource withSourceRetryCount(Object sourceRetryCount) {
super.withSourceRetryCount(sourceRetryCount);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSource withSourceRetryWait(Object sourceRetryWait) {
super.withSourceRetryWait(sourceRetryWait);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSource withMaxConcurrentConnections(Object maxConcurrentConnections) {
super.withMaxConcurrentConnections(maxConcurrentConnections);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AzureTableSource 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("sourceRetryCount", sourceRetryCount());
jsonWriter.writeUntypedField("sourceRetryWait", sourceRetryWait());
jsonWriter.writeUntypedField("maxConcurrentConnections", maxConcurrentConnections());
jsonWriter.writeUntypedField("disableMetricsCollection", disableMetricsCollection());
jsonWriter.writeUntypedField("queryTimeout", queryTimeout());
jsonWriter.writeUntypedField("additionalColumns", additionalColumns());
jsonWriter.writeStringField("type", this.type);
jsonWriter.writeUntypedField("azureTableSourceQuery", this.azureTableSourceQuery);
jsonWriter.writeUntypedField("azureTableSourceIgnoreTableNotFound", this.azureTableSourceIgnoreTableNotFound);
if (additionalProperties() != null) {
for (Map.Entry additionalProperty : additionalProperties().entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AzureTableSource from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AzureTableSource 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 AzureTableSource.
*/
public static AzureTableSource fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AzureTableSource deserializedAzureTableSource = new AzureTableSource();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("sourceRetryCount".equals(fieldName)) {
deserializedAzureTableSource.withSourceRetryCount(reader.readUntyped());
} else if ("sourceRetryWait".equals(fieldName)) {
deserializedAzureTableSource.withSourceRetryWait(reader.readUntyped());
} else if ("maxConcurrentConnections".equals(fieldName)) {
deserializedAzureTableSource.withMaxConcurrentConnections(reader.readUntyped());
} else if ("disableMetricsCollection".equals(fieldName)) {
deserializedAzureTableSource.withDisableMetricsCollection(reader.readUntyped());
} else if ("queryTimeout".equals(fieldName)) {
deserializedAzureTableSource.withQueryTimeout(reader.readUntyped());
} else if ("additionalColumns".equals(fieldName)) {
deserializedAzureTableSource.withAdditionalColumns(reader.readUntyped());
} else if ("type".equals(fieldName)) {
deserializedAzureTableSource.type = reader.getString();
} else if ("azureTableSourceQuery".equals(fieldName)) {
deserializedAzureTableSource.azureTableSourceQuery = reader.readUntyped();
} else if ("azureTableSourceIgnoreTableNotFound".equals(fieldName)) {
deserializedAzureTableSource.azureTableSourceIgnoreTableNotFound = reader.readUntyped();
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedAzureTableSource.withAdditionalProperties(additionalProperties);
return deserializedAzureTableSource;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy