com.amazonaws.services.outposts.model.transform.LineItemMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-outposts Show documentation
Show all versions of aws-java-sdk-outposts Show documentation
The AWS Java SDK for AWS Outposts module holds the client classes that are used for communicating with AWS Outposts Service
The newest version!
/*
* 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.outposts.model.transform;
import java.util.List;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.outposts.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* LineItemMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class LineItemMarshaller {
private static final MarshallingInfo CATALOGITEMID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CatalogItemId").build();
private static final MarshallingInfo LINEITEMID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("LineItemId").build();
private static final MarshallingInfo QUANTITY_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Quantity").build();
private static final MarshallingInfo STATUS_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("Status").build();
private static final MarshallingInfo SHIPMENTINFORMATION_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ShipmentInformation").build();
private static final MarshallingInfo ASSETINFORMATIONLIST_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AssetInformationList").build();
private static final MarshallingInfo PREVIOUSLINEITEMID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PreviousLineItemId").build();
private static final MarshallingInfo PREVIOUSORDERID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PreviousOrderId").build();
private static final LineItemMarshaller instance = new LineItemMarshaller();
public static LineItemMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(LineItem lineItem, ProtocolMarshaller protocolMarshaller) {
if (lineItem == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(lineItem.getCatalogItemId(), CATALOGITEMID_BINDING);
protocolMarshaller.marshall(lineItem.getLineItemId(), LINEITEMID_BINDING);
protocolMarshaller.marshall(lineItem.getQuantity(), QUANTITY_BINDING);
protocolMarshaller.marshall(lineItem.getStatus(), STATUS_BINDING);
protocolMarshaller.marshall(lineItem.getShipmentInformation(), SHIPMENTINFORMATION_BINDING);
protocolMarshaller.marshall(lineItem.getAssetInformationList(), ASSETINFORMATIONLIST_BINDING);
protocolMarshaller.marshall(lineItem.getPreviousLineItemId(), PREVIOUSLINEITEMID_BINDING);
protocolMarshaller.marshall(lineItem.getPreviousOrderId(), PREVIOUSORDERID_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy