/** Marshall the given parameter object, and output to a JSONWriter */ public void marshall(FileSystemDescription fileSystemDescription, JSONWriter jsonWriter) { if (fileSystemDescription == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } try { jsonWriter.object(); if (fileSystemDescription.getOwnerId() != null) { jsonWriter.key("OwnerId").value(fileSystemDescription.getOwnerId()); } if (fileSystemDescription.getCreationToken() != null) { jsonWriter.key("CreationToken").value(fileSystemDescription.getCreationToken()); } if (fileSystemDescription.getFileSystemId() != null) { jsonWriter.key("FileSystemId").value(fileSystemDescription.getFileSystemId()); } if (fileSystemDescription.getCreationTime() != null) { jsonWriter.key("CreationTime").value(fileSystemDescription.getCreationTime()); } if (fileSystemDescription.getLifeCycleState() != null) { jsonWriter.key("LifeCycleState").value(fileSystemDescription.getLifeCycleState()); } if (fileSystemDescription.getName() != null) { jsonWriter.key("Name").value(fileSystemDescription.getName()); } if (fileSystemDescription.getNumberOfMountTargets() != null) { jsonWriter .key("NumberOfMountTargets") .value(fileSystemDescription.getNumberOfMountTargets()); } if (fileSystemDescription.getSizeInBytes() != null) { jsonWriter.key("SizeInBytes"); FileSystemSizeJsonMarshaller.getInstance() .marshall(fileSystemDescription.getSizeInBytes(), jsonWriter); } jsonWriter.endObject(); } catch (Throwable t) { throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t); } }
/** Marshall the given parameter object, and output to a JSONWriter */ public void marshall(MountTargetDescription mountTargetDescription, JSONWriter jsonWriter) { if (mountTargetDescription == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } try { jsonWriter.object(); if (mountTargetDescription.getOwnerId() != null) { jsonWriter.key("OwnerId").value(mountTargetDescription.getOwnerId()); } if (mountTargetDescription.getMountTargetId() != null) { jsonWriter.key("MountTargetId").value(mountTargetDescription.getMountTargetId()); } if (mountTargetDescription.getFileSystemId() != null) { jsonWriter.key("FileSystemId").value(mountTargetDescription.getFileSystemId()); } if (mountTargetDescription.getSubnetId() != null) { jsonWriter.key("SubnetId").value(mountTargetDescription.getSubnetId()); } if (mountTargetDescription.getLifeCycleState() != null) { jsonWriter.key("LifeCycleState").value(mountTargetDescription.getLifeCycleState()); } if (mountTargetDescription.getIpAddress() != null) { jsonWriter.key("IpAddress").value(mountTargetDescription.getIpAddress()); } if (mountTargetDescription.getNetworkInterfaceId() != null) { jsonWriter.key("NetworkInterfaceId").value(mountTargetDescription.getNetworkInterfaceId()); } jsonWriter.endObject(); } catch (Throwable t) { throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t); } }