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

com.amazonaws.services.quicksight.model.transform.VisualMarshaller Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.quicksight.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.quicksight.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * VisualMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class VisualMarshaller {

    private static final MarshallingInfo TABLEVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TableVisual").build();
    private static final MarshallingInfo PIVOTTABLEVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PivotTableVisual").build();
    private static final MarshallingInfo BARCHARTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BarChartVisual").build();
    private static final MarshallingInfo KPIVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("KPIVisual").build();
    private static final MarshallingInfo PIECHARTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PieChartVisual").build();
    private static final MarshallingInfo GAUGECHARTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("GaugeChartVisual").build();
    private static final MarshallingInfo LINECHARTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("LineChartVisual").build();
    private static final MarshallingInfo HEATMAPVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("HeatMapVisual").build();
    private static final MarshallingInfo TREEMAPVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TreeMapVisual").build();
    private static final MarshallingInfo GEOSPATIALMAPVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("GeospatialMapVisual").build();
    private static final MarshallingInfo FILLEDMAPVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("FilledMapVisual").build();
    private static final MarshallingInfo FUNNELCHARTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("FunnelChartVisual").build();
    private static final MarshallingInfo SCATTERPLOTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ScatterPlotVisual").build();
    private static final MarshallingInfo COMBOCHARTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ComboChartVisual").build();
    private static final MarshallingInfo BOXPLOTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BoxPlotVisual").build();
    private static final MarshallingInfo WATERFALLVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("WaterfallVisual").build();
    private static final MarshallingInfo HISTOGRAMVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("HistogramVisual").build();
    private static final MarshallingInfo WORDCLOUDVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("WordCloudVisual").build();
    private static final MarshallingInfo INSIGHTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("InsightVisual").build();
    private static final MarshallingInfo SANKEYDIAGRAMVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SankeyDiagramVisual").build();
    private static final MarshallingInfo CUSTOMCONTENTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CustomContentVisual").build();
    private static final MarshallingInfo EMPTYVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("EmptyVisual").build();
    private static final MarshallingInfo RADARCHARTVISUAL_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("RadarChartVisual").build();

    private static final VisualMarshaller instance = new VisualMarshaller();

    public static VisualMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(Visual visual, ProtocolMarshaller protocolMarshaller) {

        if (visual == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(visual.getTableVisual(), TABLEVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getPivotTableVisual(), PIVOTTABLEVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getBarChartVisual(), BARCHARTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getKPIVisual(), KPIVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getPieChartVisual(), PIECHARTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getGaugeChartVisual(), GAUGECHARTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getLineChartVisual(), LINECHARTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getHeatMapVisual(), HEATMAPVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getTreeMapVisual(), TREEMAPVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getGeospatialMapVisual(), GEOSPATIALMAPVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getFilledMapVisual(), FILLEDMAPVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getFunnelChartVisual(), FUNNELCHARTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getScatterPlotVisual(), SCATTERPLOTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getComboChartVisual(), COMBOCHARTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getBoxPlotVisual(), BOXPLOTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getWaterfallVisual(), WATERFALLVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getHistogramVisual(), HISTOGRAMVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getWordCloudVisual(), WORDCLOUDVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getInsightVisual(), INSIGHTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getSankeyDiagramVisual(), SANKEYDIAGRAMVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getCustomContentVisual(), CUSTOMCONTENTVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getEmptyVisual(), EMPTYVISUAL_BINDING);
            protocolMarshaller.marshall(visual.getRadarChartVisual(), RADARCHARTVISUAL_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy