All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.datafactory.models.NetezzaPartitionSettings 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 settings that will be leveraged for Netezza source partitioning.
 */
@Fluent
public final class NetezzaPartitionSettings implements JsonSerializable {
    /*
     * The name of the column in integer type that will be used for proceeding range partitioning. Type: string (or
     * Expression with resultType string).
     */
    private Object partitionColumnName;

    /*
     * The maximum value of column specified in partitionColumnName that will be used for proceeding range partitioning.
     * Type: string (or Expression with resultType string).
     */
    private Object partitionUpperBound;

    /*
     * The minimum value of column specified in partitionColumnName that will be used for proceeding range partitioning.
     * Type: string (or Expression with resultType string).
     */
    private Object partitionLowerBound;

    /**
     * Creates an instance of NetezzaPartitionSettings class.
     */
    public NetezzaPartitionSettings() {
    }

    /**
     * Get the partitionColumnName property: The name of the column in integer type that will be used for proceeding
     * range partitioning. Type: string (or Expression with resultType string).
     * 
     * @return the partitionColumnName value.
     */
    public Object partitionColumnName() {
        return this.partitionColumnName;
    }

    /**
     * Set the partitionColumnName property: The name of the column in integer type that will be used for proceeding
     * range partitioning. Type: string (or Expression with resultType string).
     * 
     * @param partitionColumnName the partitionColumnName value to set.
     * @return the NetezzaPartitionSettings object itself.
     */
    public NetezzaPartitionSettings withPartitionColumnName(Object partitionColumnName) {
        this.partitionColumnName = partitionColumnName;
        return this;
    }

    /**
     * Get the partitionUpperBound property: The maximum value of column specified in partitionColumnName that will be
     * used for proceeding range partitioning. Type: string (or Expression with resultType string).
     * 
     * @return the partitionUpperBound value.
     */
    public Object partitionUpperBound() {
        return this.partitionUpperBound;
    }

    /**
     * Set the partitionUpperBound property: The maximum value of column specified in partitionColumnName that will be
     * used for proceeding range partitioning. Type: string (or Expression with resultType string).
     * 
     * @param partitionUpperBound the partitionUpperBound value to set.
     * @return the NetezzaPartitionSettings object itself.
     */
    public NetezzaPartitionSettings withPartitionUpperBound(Object partitionUpperBound) {
        this.partitionUpperBound = partitionUpperBound;
        return this;
    }

    /**
     * Get the partitionLowerBound property: The minimum value of column specified in partitionColumnName that will be
     * used for proceeding range partitioning. Type: string (or Expression with resultType string).
     * 
     * @return the partitionLowerBound value.
     */
    public Object partitionLowerBound() {
        return this.partitionLowerBound;
    }

    /**
     * Set the partitionLowerBound property: The minimum value of column specified in partitionColumnName that will be
     * used for proceeding range partitioning. Type: string (or Expression with resultType string).
     * 
     * @param partitionLowerBound the partitionLowerBound value to set.
     * @return the NetezzaPartitionSettings object itself.
     */
    public NetezzaPartitionSettings withPartitionLowerBound(Object partitionLowerBound) {
        this.partitionLowerBound = partitionLowerBound;
        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("partitionColumnName", this.partitionColumnName);
        jsonWriter.writeUntypedField("partitionUpperBound", this.partitionUpperBound);
        jsonWriter.writeUntypedField("partitionLowerBound", this.partitionLowerBound);
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of NetezzaPartitionSettings from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of NetezzaPartitionSettings 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 NetezzaPartitionSettings.
     */
    public static NetezzaPartitionSettings fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            NetezzaPartitionSettings deserializedNetezzaPartitionSettings = new NetezzaPartitionSettings();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("partitionColumnName".equals(fieldName)) {
                    deserializedNetezzaPartitionSettings.partitionColumnName = reader.readUntyped();
                } else if ("partitionUpperBound".equals(fieldName)) {
                    deserializedNetezzaPartitionSettings.partitionUpperBound = reader.readUntyped();
                } else if ("partitionLowerBound".equals(fieldName)) {
                    deserializedNetezzaPartitionSettings.partitionLowerBound = reader.readUntyped();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedNetezzaPartitionSettings;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy