
com.azure.resourcemanager.datafactory.models.DataFlowFolder 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;
/**
* The folder that this data flow is in. If not specified, Data flow will appear at the root level.
*/
@Fluent
public final class DataFlowFolder implements JsonSerializable {
/*
* The name of the folder that this data flow is in.
*/
private String name;
/**
* Creates an instance of DataFlowFolder class.
*/
public DataFlowFolder() {
}
/**
* Get the name property: The name of the folder that this data flow is in.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: The name of the folder that this data flow is in.
*
* @param name the name value to set.
* @return the DataFlowFolder object itself.
*/
public DataFlowFolder withName(String name) {
this.name = name;
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.writeStringField("name", this.name);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DataFlowFolder from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DataFlowFolder 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 DataFlowFolder.
*/
public static DataFlowFolder fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DataFlowFolder deserializedDataFlowFolder = new DataFlowFolder();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
deserializedDataFlowFolder.name = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedDataFlowFolder;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy