code: public void marshall(WorkspaceDirectory workspaceDirectory, ProtocolMarshaller protocolMarshaller) {
  
          if (workspaceDirectory == null) {
              throw new SdkClientException("Invalid argument passed to marshall(...)");
          }
  
          try {
              protocolMarshaller.marshall(workspaceDirectory.getDirectoryId(), DIRECTORYID_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getAlias(), ALIAS_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getDirectoryName(), DIRECTORYNAME_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getRegistrationCode(), REGISTRATIONCODE_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getSubnetIds(), SUBNETIDS_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getDnsIpAddresses(), DNSIPADDRESSES_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getCustomerUserName(), CUSTOMERUSERNAME_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getIamRoleId(), IAMROLEID_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getDirectoryType(), DIRECTORYTYPE_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getWorkspaceSecurityGroupId(), WORKSPACESECURITYGROUPID_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getState(), STATE_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getWorkspaceCreationProperties(), WORKSPACECREATIONPROPERTIES_BINDING);
              protocolMarshaller.marshall(workspaceDirectory.getIpGroupIds(), IPGROUPIDS_BINDING);
          } catch (Exception e) {
              throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
          }
      }
docs: Marshall the given parameter object.