
com.azure.resourcemanager.datafactory.models.AzureDatabricksDeltaLakeImportCommand 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;
/**
* Azure Databricks Delta Lake import command settings.
*/
@Fluent
public final class AzureDatabricksDeltaLakeImportCommand extends ImportSettings {
/*
* The import setting type.
*/
private String type = "AzureDatabricksDeltaLakeImportCommand";
/*
* Specify the date format for csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with resultType
* string).
*/
private Object dateFormat;
/*
* Specify the timestamp format for csv in Azure Databricks Delta Lake Copy. Type: string (or Expression with
* resultType string).
*/
private Object timestampFormat;
/**
* Creates an instance of AzureDatabricksDeltaLakeImportCommand class.
*/
public AzureDatabricksDeltaLakeImportCommand() {
}
/**
* Get the type property: The import setting type.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the dateFormat property: Specify the date format for csv in Azure Databricks Delta Lake Copy. Type: string
* (or Expression with resultType string).
*
* @return the dateFormat value.
*/
public Object dateFormat() {
return this.dateFormat;
}
/**
* Set the dateFormat property: Specify the date format for csv in Azure Databricks Delta Lake Copy. Type: string
* (or Expression with resultType string).
*
* @param dateFormat the dateFormat value to set.
* @return the AzureDatabricksDeltaLakeImportCommand object itself.
*/
public AzureDatabricksDeltaLakeImportCommand withDateFormat(Object dateFormat) {
this.dateFormat = dateFormat;
return this;
}
/**
* Get the timestampFormat property: Specify the timestamp format for csv in Azure Databricks Delta Lake Copy. Type:
* string (or Expression with resultType string).
*
* @return the timestampFormat value.
*/
public Object timestampFormat() {
return this.timestampFormat;
}
/**
* Set the timestampFormat property: Specify the timestamp format for csv in Azure Databricks Delta Lake Copy. Type:
* string (or Expression with resultType string).
*
* @param timestampFormat the timestampFormat value to set.
* @return the AzureDatabricksDeltaLakeImportCommand object itself.
*/
public AzureDatabricksDeltaLakeImportCommand withTimestampFormat(Object timestampFormat) {
this.timestampFormat = timestampFormat;
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.writeUntypedField("dateFormat", this.dateFormat);
jsonWriter.writeUntypedField("timestampFormat", this.timestampFormat);
if (additionalProperties() != null) {
for (Map.Entry additionalProperty : additionalProperties().entrySet()) {
jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue());
}
}
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AzureDatabricksDeltaLakeImportCommand from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AzureDatabricksDeltaLakeImportCommand 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 AzureDatabricksDeltaLakeImportCommand.
*/
public static AzureDatabricksDeltaLakeImportCommand fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AzureDatabricksDeltaLakeImportCommand deserializedAzureDatabricksDeltaLakeImportCommand
= new AzureDatabricksDeltaLakeImportCommand();
Map additionalProperties = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("type".equals(fieldName)) {
deserializedAzureDatabricksDeltaLakeImportCommand.type = reader.getString();
} else if ("dateFormat".equals(fieldName)) {
deserializedAzureDatabricksDeltaLakeImportCommand.dateFormat = reader.readUntyped();
} else if ("timestampFormat".equals(fieldName)) {
deserializedAzureDatabricksDeltaLakeImportCommand.timestampFormat = reader.readUntyped();
} else {
if (additionalProperties == null) {
additionalProperties = new LinkedHashMap<>();
}
additionalProperties.put(fieldName, reader.readUntyped());
}
}
deserializedAzureDatabricksDeltaLakeImportCommand.withAdditionalProperties(additionalProperties);
return deserializedAzureDatabricksDeltaLakeImportCommand;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy