
com.azure.resourcemanager.datafactory.models.SnowflakeExportCopyCommand 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;
/**
* Snowflake export command settings.
*/
@Fluent
public final class SnowflakeExportCopyCommand extends ExportSettings {
/*
* The export setting type.
*/
private String type = "SnowflakeExportCopyCommand";
/*
* Additional copy options directly passed to snowflake Copy Command. Type: key value pairs (value should be string
* type) (or Expression with resultType object). Example: "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY",
* "TIME_FORMAT": "'HH24:MI:SS.FF'" }
*/
private Map additionalCopyOptions;
/*
* Additional format options directly passed to snowflake Copy Command. Type: key value pairs (value should be
* string type) (or Expression with resultType object). Example: "additionalFormatOptions": { "OVERWRITE": "TRUE",
* "MAX_FILE_SIZE": "'FALSE'" }
*/
private Map additionalFormatOptions;
/*
* The name of the snowflake storage integration to use for the copy operation. Type: string (or Expression with
* resultType string).
*/
private Object storageIntegration;
/**
* Creates an instance of SnowflakeExportCopyCommand class.
*/
public SnowflakeExportCopyCommand() {
}
/**
* Get the type property: The export setting type.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the additionalCopyOptions property: Additional copy options directly passed to snowflake Copy Command. Type:
* key value pairs (value should be string type) (or Expression with resultType object). Example:
* "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" }.
*
* @return the additionalCopyOptions value.
*/
public Map additionalCopyOptions() {
return this.additionalCopyOptions;
}
/**
* Set the additionalCopyOptions property: Additional copy options directly passed to snowflake Copy Command. Type:
* key value pairs (value should be string type) (or Expression with resultType object). Example:
* "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" }.
*
* @param additionalCopyOptions the additionalCopyOptions value to set.
* @return the SnowflakeExportCopyCommand object itself.
*/
public SnowflakeExportCopyCommand withAdditionalCopyOptions(Map additionalCopyOptions) {
this.additionalCopyOptions = additionalCopyOptions;
return this;
}
/**
* Get the additionalFormatOptions property: Additional format options directly passed to snowflake Copy Command.
* Type: key value pairs (value should be string type) (or Expression with resultType object). Example:
* "additionalFormatOptions": { "OVERWRITE": "TRUE", "MAX_FILE_SIZE": "'FALSE'" }.
*
* @return the additionalFormatOptions value.
*/
public Map additionalFormatOptions() {
return this.additionalFormatOptions;
}
/**
* Set the additionalFormatOptions property: Additional format options directly passed to snowflake Copy Command.
* Type: key value pairs (value should be string type) (or Expression with resultType object). Example:
* "additionalFormatOptions": { "OVERWRITE": "TRUE", "MAX_FILE_SIZE": "'FALSE'" }.
*
* @param additionalFormatOptions the additionalFormatOptions value to set.
* @return the SnowflakeExportCopyCommand object itself.
*/
public SnowflakeExportCopyCommand withAdditionalFormatOptions(Map additionalFormatOptions) {
this.additionalFormatOptions = additionalFormatOptions;
return this;
}
/**
* Get the storageIntegration property: The name of the snowflake storage integration to use for the copy operation.
* Type: string (or Expression with resultType string).
*
* @return the storageIntegration value.
*/
public Object storageIntegration() {
return this.storageIntegration;
}
/**
* Set the storageIntegration property: The name of the snowflake storage integration to use for the copy operation.
* Type: string (or Expression with resultType string).
*
* @param storageIntegration the storageIntegration value to set.
* @return the SnowflakeExportCopyCommand object itself.
*/
public SnowflakeExportCopyCommand withStorageIntegration(Object storageIntegration) {
this.storageIntegration = storageIntegration;
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.writeStringField("type", this.type);
jsonWriter.writeMapField("additionalCopyOptions", this.additionalCopyOptions,
(writer, element) -> writer.writeUntyped(element));
jsonWriter.writeMapField("additionalFormatOptions", this.additionalFormatOptions,
(writer, element) -> writer.writeUntyped(element));
jsonWriter.writeUntypedField("storageIntegration", this.storageIntegration);
if (additionalProperties() != null) {
for (Map.Entry additionalProperty : additionalProperties().entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SnowflakeExportCopyCommand from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SnowflakeExportCopyCommand 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 SnowflakeExportCopyCommand.
*/
public static SnowflakeExportCopyCommand fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SnowflakeExportCopyCommand deserializedSnowflakeExportCopyCommand = new SnowflakeExportCopyCommand();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("type".equals(fieldName)) {
deserializedSnowflakeExportCopyCommand.type = reader.getString();
} else if ("additionalCopyOptions".equals(fieldName)) {
Map additionalCopyOptions = reader.readMap(reader1 -> reader1.readUntyped());
deserializedSnowflakeExportCopyCommand.additionalCopyOptions = additionalCopyOptions;
} else if ("additionalFormatOptions".equals(fieldName)) {
Map additionalFormatOptions = reader.readMap(reader1 -> reader1.readUntyped());
deserializedSnowflakeExportCopyCommand.additionalFormatOptions = additionalFormatOptions;
} else if ("storageIntegration".equals(fieldName)) {
deserializedSnowflakeExportCopyCommand.storageIntegration = reader.readUntyped();
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedSnowflakeExportCopyCommand.withAdditionalProperties(additionalProperties);
return deserializedSnowflakeExportCopyCommand;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy