com.amazonaws.services.licensemanagerlinuxsubscriptions.model.transform.InstanceMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-licensemanagerlinuxsubscriptions Show documentation
Show all versions of aws-java-sdk-licensemanagerlinuxsubscriptions Show documentation
The AWS Java SDK for AWS License Manager Linux Subscriptions module holds the client classes that are used for communicating with AWS License Manager Linux Subscriptions 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.licensemanagerlinuxsubscriptions.model.transform;
import java.util.List;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.licensemanagerlinuxsubscriptions.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* InstanceMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class InstanceMarshaller {
private static final MarshallingInfo ACCOUNTID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("AccountID").build();
private static final MarshallingInfo AMIID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("AmiId").build();
private static final MarshallingInfo DUALSUBSCRIPTION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("DualSubscription").build();
private static final MarshallingInfo INSTANCEID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("InstanceID").build();
private static final MarshallingInfo INSTANCETYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("InstanceType").build();
private static final MarshallingInfo LASTUPDATEDTIME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("LastUpdatedTime").build();
private static final MarshallingInfo OSVERSION_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("OsVersion").build();
private static final MarshallingInfo PRODUCTCODE_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("ProductCode").build();
private static final MarshallingInfo REGION_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("Region").build();
private static final MarshallingInfo REGISTEREDWITHSUBSCRIPTIONPROVIDER_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("RegisteredWithSubscriptionProvider").build();
private static final MarshallingInfo STATUS_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("Status").build();
private static final MarshallingInfo SUBSCRIPTIONNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SubscriptionName").build();
private static final MarshallingInfo SUBSCRIPTIONPROVIDERCREATETIME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SubscriptionProviderCreateTime").build();
private static final MarshallingInfo SUBSCRIPTIONPROVIDERUPDATETIME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SubscriptionProviderUpdateTime").build();
private static final MarshallingInfo USAGEOPERATION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("UsageOperation").build();
private static final InstanceMarshaller instance = new InstanceMarshaller();
public static InstanceMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(Instance instance, ProtocolMarshaller protocolMarshaller) {
if (instance == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(instance.getAccountID(), ACCOUNTID_BINDING);
protocolMarshaller.marshall(instance.getAmiId(), AMIID_BINDING);
protocolMarshaller.marshall(instance.getDualSubscription(), DUALSUBSCRIPTION_BINDING);
protocolMarshaller.marshall(instance.getInstanceID(), INSTANCEID_BINDING);
protocolMarshaller.marshall(instance.getInstanceType(), INSTANCETYPE_BINDING);
protocolMarshaller.marshall(instance.getLastUpdatedTime(), LASTUPDATEDTIME_BINDING);
protocolMarshaller.marshall(instance.getOsVersion(), OSVERSION_BINDING);
protocolMarshaller.marshall(instance.getProductCode(), PRODUCTCODE_BINDING);
protocolMarshaller.marshall(instance.getRegion(), REGION_BINDING);
protocolMarshaller.marshall(instance.getRegisteredWithSubscriptionProvider(), REGISTEREDWITHSUBSCRIPTIONPROVIDER_BINDING);
protocolMarshaller.marshall(instance.getStatus(), STATUS_BINDING);
protocolMarshaller.marshall(instance.getSubscriptionName(), SUBSCRIPTIONNAME_BINDING);
protocolMarshaller.marshall(instance.getSubscriptionProviderCreateTime(), SUBSCRIPTIONPROVIDERCREATETIME_BINDING);
protocolMarshaller.marshall(instance.getSubscriptionProviderUpdateTime(), SUBSCRIPTIONPROVIDERUPDATETIME_BINDING);
protocolMarshaller.marshall(instance.getUsageOperation(), USAGEOPERATION_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy