
com.amazonaws.services.imagebuilder.model.transform.ComponentVersionMarshaller 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.imagebuilder.model.transform;
import java.util.List;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.imagebuilder.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* ComponentVersionMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class ComponentVersionMarshaller {
private static final MarshallingInfo ARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("arn").build();
private static final MarshallingInfo NAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("name").build();
private static final MarshallingInfo VERSION_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("version").build();
private static final MarshallingInfo DESCRIPTION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("description").build();
private static final MarshallingInfo PLATFORM_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("platform").build();
private static final MarshallingInfo SUPPORTEDOSVERSIONS_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("supportedOsVersions").build();
private static final MarshallingInfo TYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("type").build();
private static final MarshallingInfo OWNER_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("owner").build();
private static final MarshallingInfo DATECREATED_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("dateCreated").build();
private static final ComponentVersionMarshaller instance = new ComponentVersionMarshaller();
public static ComponentVersionMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(ComponentVersion componentVersion, ProtocolMarshaller protocolMarshaller) {
if (componentVersion == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(componentVersion.getArn(), ARN_BINDING);
protocolMarshaller.marshall(componentVersion.getName(), NAME_BINDING);
protocolMarshaller.marshall(componentVersion.getVersion(), VERSION_BINDING);
protocolMarshaller.marshall(componentVersion.getDescription(), DESCRIPTION_BINDING);
protocolMarshaller.marshall(componentVersion.getPlatform(), PLATFORM_BINDING);
protocolMarshaller.marshall(componentVersion.getSupportedOsVersions(), SUPPORTEDOSVERSIONS_BINDING);
protocolMarshaller.marshall(componentVersion.getType(), TYPE_BINDING);
protocolMarshaller.marshall(componentVersion.getOwner(), OWNER_BINDING);
protocolMarshaller.marshall(componentVersion.getDateCreated(), DATECREATED_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy