com.amazonaws.services.backup.model.transform.RecoveryPointByResourceMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-backup Show documentation
Show all versions of aws-java-sdk-backup Show documentation
The AWS Java SDK for AWS Backup module holds the client classes that are used for communicating with AWS Backup Service
/*
* 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.backup.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.backup.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* RecoveryPointByResourceMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class RecoveryPointByResourceMarshaller {
private static final MarshallingInfo RECOVERYPOINTARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("RecoveryPointArn").build();
private static final MarshallingInfo CREATIONDATE_BINDING = MarshallingInfo.builder(MarshallingType.DATE)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CreationDate").timestampFormat("unixTimestamp").build();
private static final MarshallingInfo STATUS_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("Status").build();
private static final MarshallingInfo STATUSMESSAGE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("StatusMessage").build();
private static final MarshallingInfo ENCRYPTIONKEYARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("EncryptionKeyArn").build();
private static final MarshallingInfo BACKUPSIZEBYTES_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupSizeBytes").build();
private static final MarshallingInfo BACKUPVAULTNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupVaultName").build();
private static final MarshallingInfo ISPARENT_BINDING = MarshallingInfo.builder(MarshallingType.BOOLEAN)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("IsParent").build();
private static final MarshallingInfo PARENTRECOVERYPOINTARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ParentRecoveryPointArn").build();
private static final MarshallingInfo RESOURCENAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ResourceName").build();
private static final MarshallingInfo VAULTTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("VaultType").build();
private static final RecoveryPointByResourceMarshaller instance = new RecoveryPointByResourceMarshaller();
public static RecoveryPointByResourceMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(RecoveryPointByResource recoveryPointByResource, ProtocolMarshaller protocolMarshaller) {
if (recoveryPointByResource == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(recoveryPointByResource.getRecoveryPointArn(), RECOVERYPOINTARN_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getCreationDate(), CREATIONDATE_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getStatus(), STATUS_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getStatusMessage(), STATUSMESSAGE_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getEncryptionKeyArn(), ENCRYPTIONKEYARN_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getBackupSizeBytes(), BACKUPSIZEBYTES_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getBackupVaultName(), BACKUPVAULTNAME_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getIsParent(), ISPARENT_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getParentRecoveryPointArn(), PARENTRECOVERYPOINTARN_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getResourceName(), RESOURCENAME_BINDING);
protocolMarshaller.marshall(recoveryPointByResource.getVaultType(), VAULTTYPE_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy