
com.azure.resourcemanager.datafactory.models.SqlDWUpsertSettings 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;
/**
* Sql DW upsert option settings.
*/
@Fluent
public final class SqlDWUpsertSettings implements JsonSerializable {
/*
* Schema name for interim table. Type: string (or Expression with resultType string).
*/
private Object interimSchemaName;
/*
* Key column names for unique row identification. Type: array of strings (or Expression with resultType array of
* strings).
*/
private Object keys;
/**
* Creates an instance of SqlDWUpsertSettings class.
*/
public SqlDWUpsertSettings() {
}
/**
* Get the interimSchemaName property: Schema name for interim table. Type: string (or Expression with resultType
* string).
*
* @return the interimSchemaName value.
*/
public Object interimSchemaName() {
return this.interimSchemaName;
}
/**
* Set the interimSchemaName property: Schema name for interim table. Type: string (or Expression with resultType
* string).
*
* @param interimSchemaName the interimSchemaName value to set.
* @return the SqlDWUpsertSettings object itself.
*/
public SqlDWUpsertSettings withInterimSchemaName(Object interimSchemaName) {
this.interimSchemaName = interimSchemaName;
return this;
}
/**
* Get the keys property: Key column names for unique row identification. Type: array of strings (or Expression with
* resultType array of strings).
*
* @return the keys value.
*/
public Object keys() {
return this.keys;
}
/**
* Set the keys property: Key column names for unique row identification. Type: array of strings (or Expression with
* resultType array of strings).
*
* @param keys the keys value to set.
* @return the SqlDWUpsertSettings object itself.
*/
public SqlDWUpsertSettings withKeys(Object keys) {
this.keys = keys;
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.writeUntypedField("interimSchemaName", this.interimSchemaName);
jsonWriter.writeUntypedField("keys", this.keys);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SqlDWUpsertSettings from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SqlDWUpsertSettings 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 SqlDWUpsertSettings.
*/
public static SqlDWUpsertSettings fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SqlDWUpsertSettings deserializedSqlDWUpsertSettings = new SqlDWUpsertSettings();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("interimSchemaName".equals(fieldName)) {
deserializedSqlDWUpsertSettings.interimSchemaName = reader.readUntyped();
} else if ("keys".equals(fieldName)) {
deserializedSqlDWUpsertSettings.keys = reader.readUntyped();
} else {
reader.skipChildren();
}
}
return deserializedSqlDWUpsertSettings;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy