
com.azure.resourcemanager.datafactory.models.SkipErrorFile 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;
/**
* Skip error file.
*/
@Fluent
public final class SkipErrorFile implements JsonSerializable {
/*
* Skip if file is deleted by other client during copy. Default is true. Type: boolean (or Expression with
* resultType boolean).
*/
private Object fileMissing;
/*
* Skip if source/sink file changed by other concurrent write. Default is false. Type: boolean (or Expression with
* resultType boolean).
*/
private Object dataInconsistency;
/**
* Creates an instance of SkipErrorFile class.
*/
public SkipErrorFile() {
}
/**
* Get the fileMissing property: Skip if file is deleted by other client during copy. Default is true. Type: boolean
* (or Expression with resultType boolean).
*
* @return the fileMissing value.
*/
public Object fileMissing() {
return this.fileMissing;
}
/**
* Set the fileMissing property: Skip if file is deleted by other client during copy. Default is true. Type: boolean
* (or Expression with resultType boolean).
*
* @param fileMissing the fileMissing value to set.
* @return the SkipErrorFile object itself.
*/
public SkipErrorFile withFileMissing(Object fileMissing) {
this.fileMissing = fileMissing;
return this;
}
/**
* Get the dataInconsistency property: Skip if source/sink file changed by other concurrent write. Default is false.
* Type: boolean (or Expression with resultType boolean).
*
* @return the dataInconsistency value.
*/
public Object dataInconsistency() {
return this.dataInconsistency;
}
/**
* Set the dataInconsistency property: Skip if source/sink file changed by other concurrent write. Default is false.
* Type: boolean (or Expression with resultType boolean).
*
* @param dataInconsistency the dataInconsistency value to set.
* @return the SkipErrorFile object itself.
*/
public SkipErrorFile withDataInconsistency(Object dataInconsistency) {
this.dataInconsistency = dataInconsistency;
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("fileMissing", this.fileMissing);
jsonWriter.writeUntypedField("dataInconsistency", this.dataInconsistency);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SkipErrorFile from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SkipErrorFile 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 SkipErrorFile.
*/
public static SkipErrorFile fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SkipErrorFile deserializedSkipErrorFile = new SkipErrorFile();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("fileMissing".equals(fieldName)) {
deserializedSkipErrorFile.fileMissing = reader.readUntyped();
} else if ("dataInconsistency".equals(fieldName)) {
deserializedSkipErrorFile.dataInconsistency = reader.readUntyped();
} else {
reader.skipChildren();
}
}
return deserializedSkipErrorFile;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy